cbfstool/linux_trampoline.S: Fix up the e820 table
The e820 type don't fully match the LB_TAG_MEMORY types, so change all unknown types to e820 to '2', reserved memory. TESTED with Linuxboot: e820 now shows the CBMEM region as reserved. Change-Id: Ie0e41c66e002919e41590327afe0f543e0037369 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55074 Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Rocky Phagura Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
@@ -72,7 +72,20 @@ lea 8(%ebx), %esi /* e820 data source */
|
||||
mov $(LINUX_PARAM_LOC + E820_OFFSET), %edi
|
||||
rep movsl
|
||||
xchg %eax, %ecx
|
||||
jmp .endScan
|
||||
/* e820 and LB_TAG_MEMORY type don't fully match: remap unknown type to 2, reserved memory */
|
||||
mov (LINUX_PARAM_LOC + E820_NR_OFFSET), %eax
|
||||
mov $(LINUX_PARAM_LOC + E820_OFFSET), %edi
|
||||
.test_e820_entry:
|
||||
cmp $0, %eax
|
||||
je .endScan
|
||||
cmp $12, 16(%edi) /* type */
|
||||
jng .next_e820_entry
|
||||
/* Fixup the type to 2, reserved memory */
|
||||
mov $2, 16(%edi)
|
||||
.next_e820_entry:
|
||||
dec %eax
|
||||
add $20, %edi
|
||||
jmp .test_e820_entry
|
||||
|
||||
.testFramebuffer:
|
||||
cmp $CB_TAG_FRAMEBUFFER, (%ebx)
|
||||
|
Reference in New Issue
Block a user