Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35035 )
Change subject: arch/x86: Implement RESET_VECTOR_IN_RAM ......................................................................
Patch Set 23:
(2 comments)
PTAL
https://review.coreboot.org/c/coreboot/+/35035/22//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/35035/22//COMMIT_MSG@30 PS22, Line 30:
Felix - Can you please add the appropriate BUG# here? BUG=b:????
Done
https://review.coreboot.org/c/coreboot/+/35035/22/src/arch/x86/early_ram.ld File src/arch/x86/early_ram.ld:
https://review.coreboot.org/c/coreboot/+/35035/22/src/arch/x86/early_ram.ld@... PS22, Line 23: . = CONFIG_X86_RESET_VECTOR - ARCH_POINTER_ALIGN_SIZE - _STACK_SIZE - _CONSOLE_SIZE - _TIMESTAMPS_SIZE - _FMAP_SIZE;
Increasing C_ENV_BOOTBLOCK_SIZE fixes the overlaps. I'll push a CL that clarifies some of this.
I refactored the patch a bit.
I moved the stack out of .earlyram.data and renamed .earlyram.data to .persistent since this data persists across stages.
I also added an assert that will tell if you if the earlyram data overlaps with the program data.
Building on a trembyle I get the following: Idx ,Name ,Size ,VMA ,LMA ,File off Algn 0 ,.text ,000074d0 ,08076000 ,08076000 ,00001000 2**12 1 ,.data ,00000038 ,0807d4d0 ,0807d4d0 ,000084d0 2**2 2 ,.bss ,00000048 ,0807d508 ,0807d508 ,00008508 2**2 3 ,.stack ,00000800 ,0807daf0 ,0807daf0 ,00000000 2**0 4 ,.persistent ,00001cfa ,0807e2f0 ,0807e2f0 ,00000000 2**0 5 ,.reset ,00000010 ,0807fff0 ,0807fff0 ,0000aff0 2**0 6 ,.debug_info ,0002659c ,00000000 ,00000000 ,0000b000 2**0 7 ,.debug_abbrev ,000074a2 ,00000000 ,00000000 ,0003159c 2**0 8 ,.debug_aranges,00000dd0 ,00000000 ,00000000 ,00038a40 2**3 9 ,.debug_line ,0000ad65 ,00000000 ,00000000 ,00039810 2**0 10 ,.debug_str ,00009655 ,00000000 ,00000000 ,00044575 2**0 11 ,.debug_loc ,0000b7ce ,00000000 ,00000000 ,0004dbca 2**0 12 ,.debug_ranges ,000029c0 ,00000000 ,00000000 ,00059398 2**3
I did have to increase the C_ENV_BOOTBLOCK_SIZE on my platform so it would compile.