* Why do we pass memory map both in e820 and efi_info
@ 2014-05-07 17:58 Vivek Goyal
2014-05-08 2:24 ` Dave Young
0 siblings, 1 reply; 3+ messages in thread
From: Vivek Goyal @ 2014-05-07 17:58 UTC (permalink / raw)
To: Dave Young, WANG Chao; +Cc: Kexec Mailing List
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
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Why do we pass memory map both in e820 and efi_info
2014-05-07 17:58 Why do we pass memory map both in e820 and efi_info Vivek Goyal
@ 2014-05-08 2:24 ` Dave Young
2014-05-08 3:04 ` Dave Young
0 siblings, 1 reply; 3+ messages in thread
From: Dave Young @ 2014-05-08 2:24 UTC (permalink / raw)
To: Vivek Goyal; +Cc: Kexec Mailing List, WANG Chao
On 05/07/14 at 01:58pm, Vivek Goyal wrote:
> 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.
>
> 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
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Why do we pass memory map both in e820 and efi_info
2014-05-08 2:24 ` Dave Young
@ 2014-05-08 3:04 ` Dave Young
0 siblings, 0 replies; 3+ messages in thread
From: Dave Young @ 2014-05-08 3:04 UTC (permalink / raw)
To: Vivek Goyal; +Cc: Kexec Mailing List, WANG Chao
On 05/08/14 at 10:24am, Dave Young wrote:
> On 05/07/14 at 01:58pm, Vivek Goyal wrote:
> > 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.
>
> 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.
>
> >
> > 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
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-08 3:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-07 17:58 Why do we pass memory map both in e820 and efi_info Vivek Goyal
2014-05-08 2:24 ` Dave Young
2014-05-08 3:04 ` Dave Young
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).