Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring dasharo+heads MSI boards (msi_z690a_ddr4 / msi_z690a_ddr5 / msi_z790p_ddr4 / msi_z790p_ddr5) from downstream Dasharo/heads to upstream #1753

Conversation

tlaurion
Copy link
Collaborator

@tlaurion tlaurion commented Aug 9, 2024

  • files: boards + coreboot + linux, borrowed directly from Dasharo@cb43039 tip
  • cbfs-init modified as per downstream fork dasharo+heads used modifications (flashrom)
  • ash_functions modified as per downstream fork dasharo+heads used modifications (CBFS)
  • network-init-recovery modified as per downstream fork dasharo+heads used modifications (igc)
  • modules/linux modified as per downstream fork dasharo+heads used modifications (igc)
  • modules/coreboot modified as per downstream fork dasharo+heads used modifications (also impact nv41/ns50: coreboot version bump)
  • modules/flashrom modified to user flashrom 1.4 + https://review.coreboot.org/c/flashrom/+/83854
  • Circleci: added boards being dependent of nv41

NOTES:

  • This requires Nk3 firmware to be 1.7.1+
  • Requires external programmer in case of bricking, untested and not owning the platforms.
  • dGPU support known problematic
  • kgpe-d16 patch that was still under master was unapplied on master (permitting to flash openbmc from Heads)

DISCLAIMER: UNTESTED
Sorry, not gonna cherry-pick commits from dahsharo/heads here, way too messy.


after merge, WILL superseed #1489 abandonned effort.


TODO:


OLD
DO NOT FLASH YET IF NO EXTERNAL PROGRAMMER. THIS VERSION BUMP FLASHROM SO FLASHING MASTER FROM THIS IS NEEDED Edit: fixed with #1755 commit cherry-picked.

@tlaurion tlaurion marked this pull request as draft August 9, 2024 13:28
@tlaurion

This comment was marked as outdated.

@tlaurion tlaurion force-pushed the bring_downstream_Dasharo-Heads_msi_to_upstream branch 2 times, most recently from c02898d to 785d4e3 Compare August 9, 2024 13:51
@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@macpijan and others: not sure what this CONFIG_CBFS_VIA_FLASHROM in board configs is about as of now, most probably this PR totally invalid as of now, have not followed that white rabbit yet.

1- @macpijan : commit log should be clear enough: Please validate this matches all required changes downstream please.
2- Also, can you tell why/what version of flashrom this is based on? 1.3.0+ with all WP + needed chipsets/spi chips needed? Is this expected to create regression on other boards support?

@tlaurion tlaurion force-pushed the bring_downstream_Dasharo-Heads_msi_to_upstream branch from 785d4e3 to b2c4351 Compare August 9, 2024 14:02
@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@macpijan I see this contains a coreboot version bump impacting nv41/ns50/MSI.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

I think I picked all files based changes from master...Dasharo:heads:master visual queues, without rebasing nor cherry-picking, simply applying changes directly in files

Not gentle reminder, but requirement: changes should be proposed upstream, not forced like that or for upstream to pick up, even less when security vuln lingering

@mkopec
Copy link
Contributor

mkopec commented Aug 9, 2024

2- Also, can you tell why/what version of flashrom this is based on?

The flashrom fork is based from this version: flashrom/flashrom@053d319

with added:

  • support for ITE EC running closed source firmware (irrelevant)
  • miscellaneous improvements for APU2 (irrelevant)
  • fixes for yocto? @macpijan if you could confirm.
  • RaptorPoint PCH support (relevant for MSI Z790)

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@macpijan updated op with commit logs sourced info, need comment on those changes and insights on impacts for other boards, most specifically:

  • coreboot version bump: nv41/ns50 tested for regressions?
  • flashrom: regressionss expected for other Heads supported boards: version based? Do we finally have a --progress bar? What's in it?

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@JonathonHall-Purism would need your eyes on this too, including regression testing for your boards since flashrom version bump

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

053d319

So flashrom 1.3.0-rc1 + patches, dating from upstream commit of ~2 years ago (cc @mkopec)

commit 053d319141db5954ab1ad34cb9db61983d238134
Author: Edward O'Callaghan [email protected]
Date: Fri Aug 12 21:27:41 2022 +1000

@JonathonHall-Purism: is this a problem?
Seems like we could hit regressions here... Heads master was more recent.

@mkopec patches were not merged upstream in 1.4.0 now released? @macpijan ?

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

053d319

So flashrom 1.3.0-rc1 + patches, dating from upstream commit of ~2 years ago (cc @mkopec)

commit 053d319141db5954ab1ad34cb9db61983d238134
Author: Edward O'Callaghan [email protected]
Date: Fri Aug 12 21:27:41 2022 +1000

@JonathonHall-Purism: is this a problem? Seems like we could hit regressions here... Heads master was more recent.

@mkopec patches were not merged upstream in 1.4.0 now released? @macpijan ?

1.4.0 was released 2 weeks ago https://github.com/flashrom/flashrom/releases/tag/v1.4.0

@mkopec @macpijan is everything you need under 1.4.0?
See flashrom/flashrom@053d319...eace095

@macpijan
Copy link
Contributor

macpijan commented Aug 9, 2024

@mkopec @macpijan is everything you need under 1.4.0?

I think the Dasharo/flashrom@24b8fcf will be missing. I cannot see it being submitted into upstream, can you confirm @miczyg1 ?

@miczyg1
Copy link
Contributor

miczyg1 commented Aug 9, 2024

@mkopec @macpijan is everything you need under 1.4.0?

I think the Dasharo/flashrom@24b8fcf will be missing. I cannot see it being submitted into upstream, can you confirm @miczyg1 ?

I think it is not in upstream flashrom (I believe we didn't even send a patch)

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@mkopec @macpijan is everything you need under 1.4.0?

I think the Dasharo/flashrom@24b8fcf will be missing. I cannot see it being submitted into upstream, can you confirm @miczyg1 ?

I think it is not in upstream flashrom (I believe we didn't even send a patch)

@miczyg1 thats problematic.
Bumped to 1.4.0 at 445d70f will try to put your unupstreamed patch into a Head patch. There is no way Head can regress to 2 years ago flashrom version since other stakeholders need flashrom too.

@macpijan
Copy link
Contributor

macpijan commented Aug 9, 2024

@tlaurion tlaurion force-pushed the bring_downstream_Dasharo-Heads_msi_to_upstream branch 2 times, most recently from ba477ab to 88513e3 Compare August 9, 2024 15:05
@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@tlaurion Updated patch: Dasharo/flashrom@7db77d3

https://review.coreboot.org/c/flashrom/+/83854

EDITED: @macpijan fails to build see e8aaaab

EDITED2: @miczyg1 patch won't build see above

@macpijan
Copy link
Contributor

macpijan commented Aug 9, 2024

Another rev (the same link: https://review.coreboot.org/c/flashrom/+/83854) builds, tested to probe the chip on MSI.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Aug 9, 2024

@macpijan please review ab74127

Copy link
Contributor

@macpijan macpijan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macpijan please review ab74127

Reviewed, could not spot any obvious problems in the configs ordering.

export CONFIG_BOOT_DEV="/dev/nvme0n1"
export CONFIG_BOOT_KERNEL_ADD=""
export CONFIG_BOOT_KERNEL_REMOVE=""
export CONFIG_BOARD_NAME="MSI PRO Z690-A DDR4"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macpijan that's ok? used in config overrides and dmidecode output for branding

export CONFIG_BOOT_DEV="/dev/nvme0n1"
export CONFIG_BOOT_KERNEL_ADD=""
export CONFIG_BOOT_KERNEL_REMOVE=""
export CONFIG_BOARD_NAME="MSI PRO Z690-A DDR5"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macpijan that's ok? used in config overrides and dmidecode output for branding

export CONFIG_BOOT_DEV="/dev/nvme0n1"
export CONFIG_BOOT_KERNEL_ADD=""
export CONFIG_BOOT_KERNEL_REMOVE=""
export CONFIG_BOARD_NAME="MSI PRO Z790-P DDR4"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macpijan that's ok? used in config overrides and dmidecode output for branding

export CONFIG_BOOT_DEV="/dev/nvme0n1"
export CONFIG_BOOT_KERNEL_ADD=""
export CONFIG_BOOT_KERNEL_REMOVE=""
export CONFIG_BOARD_NAME="MSI PRO Z790-P DDR5"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macpijan that's ok? used in config overrides and dmidecode output for branding

… released 2 weeks ago. Expected that patches from 2 years ago were merged upstream

- delete unapplied kgpe-d16 patch (will need to be brought back, was not applied currently on master
- add patches/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/0001-Add_RaptorPoint_PCH_support.patch which was not submitted to flashrom and needed by MSI
- point modules/flashrom to release 1.4.0 commit

FAILED:
https://github.com/Dasharo/flashrom/commit/24b8fcfccef31fbb95bc1dd308180f57d5cdb64c.patch
Cannot be applied over 1.4.0:
if [ -d patches/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38 ] && [ -r patches/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38 ] ; then for patch in patches/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/*.patch ; do echo "Applying patch file : $patch " ; ( git apply --verbose --reject --binary --directory build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38 ) < $patch || exit 1 ; done ; fi
Applying patch file : patches/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/0001-Add_RaptorPoint_PCH_support.patch
Checking patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/chipset_enable.c...
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_ELKHART_LAKE:
	case CHIPSET_APOLLO_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/chipset_enable.c:607
error: while searching for:
		break;
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
		boot_straps = boot_straps_pch500;
		break;

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/chipset_enable.c:714
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/chipset_enable.c:749
Hunk #4 succeeded at 1017 (offset 5 lines).
error: while searching for:
	{0x8086, 0x7a83, B_S,    NT,  "Intel", "Q670",				enable_flash_pch600},
	{0x8086, 0x7a84, B_S,    DEP, "Intel", "Z690",				enable_flash_pch600},
	{0x8086, 0x7a88, B_S,    NT,  "Intel", "W680",				enable_flash_pch600},
	{0x8086, 0x7a8a, B_S,    NT,  "Intel", "W685",				enable_flash_pch600},
	{0x8086, 0x7a8d, B_S,    NT,  "Intel", "WM690",				enable_flash_pch600},
	{0x8086, 0x7a8c, B_S,    NT,  "Intel", "HM670",				enable_flash_pch600},
	{0x8086, 0x7e23, B_S,    DEP, "Intel", "Meteor Lake-P/M",		enable_flash_mtl},
	{0},

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/chipset_enable.c:2175
Checking patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c...
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_ELKHART_LAKE:
	case CHIPSET_JASPER_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:48
error: while searching for:
	case CHIPSET_C620_SERIES_LEWISBURG:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_GEMINI_LAKE:
	case CHIPSET_JASPER_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:77
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:215
error: while searching for:
		return freq_str[2][value];
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
		return freq_str[3][value];
	case CHIPSET_ELKHART_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:313
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:361
error: while searching for:
	    cs == CHIPSET_400_SERIES_COMET_POINT ||
	    cs == CHIPSET_500_SERIES_TIGER_POINT ||
	    cs == CHIPSET_600_SERIES_ALDER_POINT ||
	    cs == CHIPSET_JASPER_LAKE || cs == CHIPSET_METEOR_LAKE) {
		const char *const master_names[] = {
			"BIOS", "ME", "GbE", "unknown", "EC",

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:489
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_GEMINI_LAKE:
	case CHIPSET_JASPER_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:1087
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:1246
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c:1291
Checking patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c...
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c:1884
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c:1923
error: while searching for:
	case CHIPSET_400_SERIES_COMET_POINT:
	case CHIPSET_500_SERIES_TIGER_POINT:
	case CHIPSET_600_SERIES_ALDER_POINT:
	case CHIPSET_METEOR_LAKE:
	case CHIPSET_APOLLO_LAKE:
	case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c:1984
error: while searching for:
		case CHIPSET_400_SERIES_COMET_POINT:
		case CHIPSET_500_SERIES_TIGER_POINT:
		case CHIPSET_600_SERIES_ALDER_POINT:
		case CHIPSET_METEOR_LAKE:
		case CHIPSET_APOLLO_LAKE:
		case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c:2064
error: while searching for:
		case CHIPSET_400_SERIES_COMET_POINT:
		case CHIPSET_500_SERIES_TIGER_POINT:
		case CHIPSET_600_SERIES_ALDER_POINT:
		case CHIPSET_METEOR_LAKE:
		case CHIPSET_APOLLO_LAKE:
		case CHIPSET_GEMINI_LAKE:

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c:2103
error: while searching for:
	     ich_gen == CHIPSET_300_SERIES_CANNON_POINT ||
	     ich_gen == CHIPSET_400_SERIES_COMET_POINT ||
	     ich_gen == CHIPSET_500_SERIES_TIGER_POINT ||
	     ich_gen == CHIPSET_600_SERIES_ALDER_POINT)) {
		msg_pdbg("Enabling hardware sequencing by default for 100+ series PCH.\n");
		ich_spi_mode = ich_hwseq;
	}

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c:2140
Checking patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/include/programmer.h...
error: while searching for:
	CHIPSET_400_SERIES_COMET_POINT,
	CHIPSET_500_SERIES_TIGER_POINT,
	CHIPSET_600_SERIES_ALDER_POINT,
	CHIPSET_METEOR_LAKE,
	CHIPSET_APOLLO_LAKE,
	CHIPSET_GEMINI_LAKE,

error: patch failed: build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/include/programmer.h:376
Checking patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/util/ich_descriptors_tool/ich_descriptors_tool.c...
Hunk #1 succeeded at 239 (offset 1 line).
Applying patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/chipset_enable.c with 4 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Hunk #4 applied cleanly.
Rejected hunk #5.
Applying patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ich_descriptors.c with 9 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Rejected hunk linuxboot#7.
Rejected hunk #8.
Rejected hunk #9.
Applying patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/ichspi.c with 6 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Applying patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/include/programmer.h with 1 reject...
Rejected hunk #1.
Applied patch build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/util/ich_descriptors_tool/ich_descriptors_tool.c cleanly.
make: *** [Makefile:565: /home/user/heads/build/x86/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/.canary] Error 1

Signed-off-by: Thierry Laurion <[email protected]>
…upstream fails to build on 1.4.0

2024-08-09 15:08:07+00:00 MAKE flashrom
tail /home/user/heads/build/x86/log/flashrom.log
-----
ichspi.c:2152:2: note: previously used here
  case CHIPSET_METEOR_LAKE:
  ^~~~
/home/user/heads/crossgcc/x86/bin/x86_64-linux-musl-gcc -fdebug-prefix-map=/home/user/heads=heads -gno-record-gcc-switches -D__MUSL__ --sysroot  /home/user/heads/install/x86 -isystem /home/user/heads/install/x86/include -L/home/user/heads/install/x86/lib  -MMD -Os -I/home/user/heads/install/x86/include/pci -Iinclude -I/home/user/heads/install/x86//include -D'HAVE_GETOPT_H=1'   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_DELAY_MINIMUM_SLEEP_US=100000' -D'CONFIG_INTERNAL=1' -D'CONFIG_INTERNAL_DMI=1' -D'__FLASHROM_HAVE_OUTB__=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION="1.4.0 (git:v0.2.0-2284-g88513e3f06)"'  -o hwaccess_x86_io.o -c hwaccess_x86_io.c
ichspi.c: In function 'init_ich_default':
ichspi.c:2381:48: error: expected ';' before ')' token
       ich_gen == CHIPSET_C740_SERIES_EMMITSBURG)) {
                                                ^
                                                ;
ichspi.c:2381:48: error: expected statement before ')' token
ichspi.c:2381:49: error: expected statement before ')' token
       ich_gen == CHIPSET_C740_SERIES_EMMITSBURG)) {
                                                 ^
ichspi.c:2504:1: error: expected declaration or statement at end of input
 }
 ^
/home/user/heads/crossgcc/x86/bin/x86_64-linux-musl-gcc -fdebug-prefix-map=/home/user/heads=heads -gno-record-gcc-switches -D__MUSL__ --sysroot  /home/user/heads/install/x86 -isystem /home/user/heads/install/x86/include -L/home/user/heads/install/x86/lib  -MMD -Os -I/home/user/heads/install/x86/include/pci -Iinclude -I/home/user/heads/install/x86//include -D'HAVE_GETOPT_H=1'   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_DELAY_MINIMUM_SLEEP_US=100000' -D'CONFIG_INTERNAL=1' -D'CONFIG_INTERNAL_DMI=1' -D'__FLASHROM_HAVE_OUTB__=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION="1.4.0 (git:v0.2.0-2284-g88513e3f06)"'  -o hwaccess_physmap.o -c hwaccess_physmap.c
make[1]: *** [Makefile:1050: ichspi.o] Error 1

Signed-off-by: Thierry Laurion <[email protected]>
…nder Heads

repro:
git fetch https://review.coreboot.org/flashrom refs/changes/54/83854/3 && git format-patch -1 --stdout FETCH_HEAD > patches/flashrom-eace095b15eb034e42d97202cad70ce979d8ca38/0001-Add_RaptorPoint_PCH_support.patch

Signed-off-by: Thierry Laurion <[email protected]>
@tlaurion
Copy link
Collaborator Author

Rebasing on master

… config layout against qemu-coreboot-fbwhiptail-tpm2

Signed-off-by: Thierry Laurion <[email protected]>
…ess workaround works in absence of flashrom --progress

Respin of https://github.com/Dasharo/flashrom/commit/6b2061bc0699202f81aeb782f301f1bba9f8a826.patch which cannot be cherry-picked
See Dasharo/flashrom#11 (comment)

Signed-off-by: Thierry Laurion <[email protected]>
@tlaurion tlaurion force-pushed the bring_downstream_Dasharo-Heads_msi_to_upstream branch from 83fe731 to 9f0fbb6 Compare October 30, 2024 20:56
export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal"

# Workaround to access > 16MiB BIOS region on ADL+
export CONFIG_CBFS_VIA_FLASHROM=y
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macpijan this is ugly hack combined with cbfs-init changes. Something cleaner/compatible with flashprog?

@@ -9,12 +9,20 @@ if [ -z "$CONFIG_PCR" ]; then
CONFIG_PCR=7
fi

if [ "$CONFIG_CBFS_VIA_FLASHROM" = "y" ]; then
# Use flashrom directly, because we don't have /tmp/config with params for flash.sh yet
/bin/flashrom -p internal --fmap -i COREBOOT -i FMAP -r /tmp/cbfs-init.rom > /dev/null 2>&1 \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we implement something that can reuse FLASH_OPTIONS fromm other boards configs and uses flashprog as of master now. What is this 16MB limitation from CBFS?

@@ -0,0 +1,237 @@
From 99d16ef516b6080ceaaa866984b7e7fb471eaef0 Mon Sep 17 00:00:00 2001
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@i-c-o-n : under flashprog? I think yes.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different patch, but yes. It should work. Untested, though.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Oct 30, 2024

  • Needs hotp/non-hotp variants
  • clarifications on what to do with cbfs >16mb limitation and current hacks using flashrom
    • implement something cleaner if possible/usable by flashprog under cbfs-init
  • @i-c-o-n confirmation patch to flashrom is under flashprog

@tlaurion
Copy link
Collaborator Author

Is this part of #1821 ?

@macpijan
Copy link
Contributor

I do not think so. Unfortunately, we do not plan another heads release for these boards right now.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Nov 29, 2024

I do not think so. Unfortunately, we do not plan another heads release for these boards right now.

Sorry MSI users!

@tlaurion
Copy link
Collaborator Author

Would also benefit from #1818. Tagged "not planned" unless "consultation services"/"bounty"/"help wanted" to revive.

@tlaurion tlaurion changed the title Bring dasharo+heads MSI boards from downstream Dasharo/heads to upstream Bring dasharo+heads MSI boards (msi_z690a_ddr4 / msi_z690a_ddr5 / msi_z790p_ddr4 / msi_z790p_ddr5) from downstream Dasharo/heads to upstream Nov 29, 2024
@tlaurion
Copy link
Collaborator Author

Note that for any workstation boards, #1820 needs to be evaluated prior of doing subsequent attempts of supporting dGPU with no consistent HCL which constributed to kgpe-d16 downfall, and seems to have contributed to MSI downfall as well, with too much support request and complaints, nor actual known subscribers to support new releases.

Supporting this myself, alone on community (free) time is to say the least a suicial path I'm not willing to lead.
d16 was/is a sad story, MSI seems to join the club. Hope we learn something from this as a community.

Also note that coreboot doesn't support a lot of workstations. Seems like tackling the reasons why and how to change that should also be investigated prior of any other attempt of supporting workstations in the future for more chances of success.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Nov 30, 2024

I was informed, but didn't verified that MSI boards were upstreamed under coreboot.

If somebody from the community takes the lead because he wants to use such MSI platform, then you can contact me through official community channels https://osresearch.net/community/.

If you cannot do the work by yourself, expect work to be done through consultation services https://osresearch.net/Consultation-Services/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bounty/Donations expected Work could/should be funded by interested stakeholder consultation service Funded work help wanted not planned wontfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants