Why do we pass memory map both in e820 and efi_info
Subsystems (2)
Hi Dave/Chao,
I am going through kexec-tools code and it looks like that for EFI systems, we pass memory map entries both in bootparams e820 memory map as well as efi_info. I am wondering why that's the case?
IOW, I am also trying to figure out as a bootloader, when should we pass memmap in e820 and when should it be passed in efi_info.
Thanks
Vivek
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 5 lines · Vivek Goyal
Hi Dave/Chao,
I am going through kexec-tools code and it looks like that for EFI systems, we pass memory map entries both in bootparams e820 memory map as well as
efi_info. I am wondering why that's the case?
Most UEFI firmware have a CSM (Compatibility Support Module) that could have provided a suitable E820-style memory map to the kernel. Linux kernel use E820 always either for legacy bios boot or UEFI boot.
For the machine firmware which does not provide E820 interface user can specify 'add_efi_memmap' kernel cmdline thus kernel can add efi memmaps to E820 array.
For the efi memmap in efi_info, it's necessary for efi boot because efi initialization will use it. UEFI has a lot of mem types, E820 only have several RAM,RESERVED, ACPI, etc. efi_init need the special UEFI specific mem ranges ie. for boot services, runtime services etc. I believe the UEFI specific mem ranges could be contained in the RESERVED E820 ranges though I did not verify it.
Quoted 3 lines
IOW, I am also trying to figure out as a bootloader, when should we pass memmap in e820 and when should it be passed in
efi_info.
E820 is mandatory usually. efi_info only for UEFI boot.
Thanks
Dave
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 10 lines · Dave Young
Quoted 5 lines · Vivek Goyal
Hi Dave/Chao,
I am going through kexec-tools code and it looks like that for EFI systems, we pass memory map entries both in bootparams e820 memory map as well as
efi_info. I am wondering why that's the case?Most UEFI firmware have a CSM (Compatibility Support Module) that could have provided a suitable E820-style memory map to the kernel. Linux kernel use E820 always either for legacy bios boot or UEFI boot.
BTW, For the machine without CSM, boot loader can convert EFI mem ranges to E820 then pass to kernel since linux kernel need E820.
Quoted 13 lines
For the machine firmware which does not provide E820 interface user can specify '
add_efi_memmap' kernel cmdline thus kernel can add efi memmaps to E820 array.For the efi memmap in
efi_info, it's necessary for efi boot because efi initialization will use it. UEFI has a lot of mem types, E820 only have several RAM,RESERVED, ACPI, etc.efi_initneed the special UEFI specific mem ranges ie. for boot services, runtime services etc. I believe the UEFI specific mem ranges could be contained in the RESERVED E820 ranges though I did not verify it.Quoted 1 line
Quoted 7 lines
Quoted 2 lines
IOW, I am also trying to figure out as a bootloader, when should we pass memmap in e820 and when should it be passed in
efi_info.E820 is mandatory usually.
efi_infoonly for UEFI boot.Thanks
Dave
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec