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 22: -Code-Review
(1 comment)
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;
Just highlighting one comment from earlier patchset here. […]
Furquan is correct, without C_ENV_BOOTBLOCK_SIZE we get the following error: /opt/coreboot-sdk/bin/i386-elf-ld.bfd: section .earlyram.data VMA [000000000807daee,000000000807ffe9] overlaps section .text VMA [0000000008078000,000000000807f4cf] /opt/coreboot-sdk/bin/i386-elf-ld.bfd: section .data VMA [000000000807f4d0,000000000807f507] overlaps section .earlyram.data VMA [000000000807daee,000000000807ffe9]
I mapped out the memory layout while debugging: https://docs.google.com/spreadsheets/d/1ucO-bU5IPHj7OGCYNWChhJYuFwUw7uJDLNOC...
$ objdump -h /tmp/coreboot/trembyle-upstream/cbfs/fallback/bootblock.debug
/tmp/coreboot/trembyle-upstream/cbfs/fallback/bootblock.debug: file format elf32-i386
Sections: Idx Name Size VMA LMA File off Algn 0 .text 000074d0 08078000 08078000 00001000 2**12 CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE 1 .data 00000038 0807f4d0 0807f4d0 000084d0 2**2 CONTENTS, ALLOC, LOAD, DATA 2 .bss 00000048 0807f508 0807f508 00008508 2**2 ALLOC 3 .earlyram.data 000024fc 08075aee 08075aee 00000000 2**0 ALLOC 4 .reset 00000010 0807fff0 0807fff0 00008ff0 2**0 CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE 5 .debug_info 000254a7 00000000 00000000 00009000 2**0 CONTENTS, RELOC, READONLY, DEBUGGING 6 .debug_abbrev 0000735a 00000000 00000000 0002e4a7 2**0 CONTENTS, READONLY, DEBUGGING 7 .debug_aranges 00000dd0 00000000 00000000 00035808 2**3 CONTENTS, RELOC, READONLY, DEBUGGING 8 .debug_line 0000acf3 00000000 00000000 000365d8 2**0 CONTENTS, RELOC, READONLY, DEBUGGING 9 .debug_str 00009655 00000000 00000000 000412cb 2**0 CONTENTS, READONLY, DEBUGGING 10 .debug_loc 0000b7ce 00000000 00000000 0004a920 2**0 CONTENTS, RELOC, READONLY, DEBUGGING 11 .debug_ranges 000029c0 00000000 00000000 000560f0 2**3 CONTENTS, RELOC, READONLY, DEBUGGING
I think this is correct. I'll update the patch.