public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Question about OS initialization at UEFI firmware (x86)
@ 2017-01-05 11:16 Rafael Machado
  2017-01-05 11:59 ` Rafael Machado
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael Machado @ 2017-01-05 11:16 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Hi everyone

I was taking a look at how the OS boots after the firmware and bootloader
are done.

To understand this I started to take a look at the linux source code, and
the strange is that I saw some bios legacy interrupts being called.

The flow I checked is this:

void main(void)  -->  linux/arch/x86/boot/main.c
     int detect_memory(void) -->  linux/arch/x86/boot/memory.c
           static int detect_memory_e820(void) -->
linux/arch/x86/boot/memory.c
                   intcall(0x15, &ireg, &oreg) -->
linux/arch/x86/boot/memory.c


At the last call the value of ireg is this one:

ireg.ax  = 0xe820;
ireg.cx  = sizeof buf;
ireg.edx = SMAP;
ireg.di  = (size_t)&buf;


As we can see this is done so the OS knows the memory map, so the OS can do
all its magic.

Finally, my question is:

How could linux, or any other OS, boot on a system with UEFI firmware that
does not have CSM (compatibility support module) ?
I consider that some parts of the hypothetical OS need to be written to
call some UEFI protocols. Am I right ?

Thanks and Regards
Rafael R. Machado


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-07 21:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-05 11:16 Question about OS initialization at UEFI firmware (x86) Rafael Machado
2017-01-05 11:59 ` Rafael Machado
2017-01-05 12:16   ` Alcantara, Paulo
2017-01-05 13:18     ` Laszlo Ersek
2017-01-07 21:14       ` Rafael Machado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox