Q1) In this case, it is probably the entire FD file that would be copy into RAM. Except if the first firmware knows about FD file format and decide to only load the SEC module.
Note: ROM and NAND are non Volatile memory (the content is persistent when these memory chips are not powered)
Q2) In the PEI phase, it is expected to be the Memory PEIM that initialize the DRAM. The PEI Core is platform independent.
Once the memory is "installed" (search for 'PeiMemoryInstalled' in MdeModulePkg/Core/Pei), the PEI Core will be restarted from RAM. Actually, the PEI Core (not all the firmware) will only copy itself into DRAM at this stage (see the function ShadowPeiCore() of MemModulePkg/Core/Pei)
Prior to run from RAM, the PEI Core runs from XIP (Execute In Place) Non Volatile memory (eg: ROM).
If the memory is already initialized by a previous boot firmware, the PEI Core can be skipped. It is the choice that has been made for 'BeagleBoardPkg'.
Olivier
From: Asha R [mailto:rd.asha22@gmail.com] Sent: 27 March 2012 07:55 To: Olivier Martin Cc: ryan.harkin@linaro.org; boot-architecture@lists.linaro.org; edk2-devel@lists.sourceforge.net Subject: Re: UEFI basic questions
Hi Olivier,
Thanks for the clarifications. Q1 and Q2 are not yet clear to me. Please find my response embedded in mail below.
Best Regards,
Asha
On Tue, Mar 27, 2012 at 12:15 AM, Olivier Martin olivier.martin@arm.com wrote:
Hi Asha,
Q1: Is UEFI flashed as single binary i.e., PlatformPkg.fd or different efi's?
It really depends of your configuration/platform. UEFI is only a portion of your boot firmware. Prior to UEFI, you might have one (or more) additional boot code/firmware.
The EDK2 FDF file will help you to generate a Firmware Device file you can flash onto your platform Non-Volatile memory (eg: ROM, NAND)
But you can also load single EFI application/driver (EFI binary) from a UEFI firmware. For instance, if you develop a EFI driver, you do not need to rebuild the full Platform UEFI firmware. You can load the single EFI driver.
[Asha]
Assuming UEFI binary is flashed to NAND Flash, the Firmware (some bootloader) prior to UEFI will load UEFI
binary (xxx.fd) from volatile memory like ROM, NAND to RAM. In this scenario, will the binary xxx.fd be copied to
RAM or just the SEC phase of UEFI?
Q2. As the code is in ROM (flash), I understand that it must be copied to RAM for execution.
Will complete UEFI be copied to RAM or some phase or section wise?
RAM provides much better performance than some other memory storage. Code can also be run from RAM (at the difference of NAND for instance).
But there is no requirement to copy the code into RAM for execution. It depends of your platform specification and the choice of the firmware engineer.
If we take the example of EDK2 code base, the PEI Core (Pre EFI phase) copies the firmware into DRAM as soon as the System Memory (DRAM) is setup.
[Asha]
Considering EDK2 as example, if PEI core must initialize DRAM, from where will PEI core be executed? From
flash? you said "PEI Core (Pre EFI phase) copies the firmware into DRAM "
what or which "firmware" is this? Is it DXE?
Q3. How does operating system invoke the UEFI Runtime services?
The UEFI specification covers this part . See the section "2.3 Calling Convention" of the Specification.
Q4. I read in one of the internet link that other than Timer, there are no hardware interrupts. Without hardware interrupt how will the USB kind of device be recognized?
The UEFI drivers can register functions to be called periodically (see the 'Boot Services' Event functions). The USB drivers register periodic functions that scan if new devices are connected.
I hope that will help you,
Olivier
From: boot-architecture-bounces@lists.linaro.org [mailto:boot-architecture-bounces@lists.linaro.org] On Behalf Of Ryan Harkin Sent: 26 March 2012 16:17 To: Asha R Cc: boot-architecture@lists.linaro.org Subject: Re: UEFI basic questions
Hi Asha,
I don't know the proper answers to all of your questions. I would suggest that the EDK2 mailing list might give you more detailed answers:
edk2-devel@lists.sourceforge.net
I think you have to sign up for the list first:
https://lists.sourceforge.net/lists/listinfo/edk2-devel
2012/3/26 Asha R rd.asha22@gmail.com
I am new to UEFI and trying to understand working of UEFI on ARM platform.
On building UEFI, there are different binaries generated for each phase and also for drivers eg: platformSec.efi, platformBds.efi and UsbDxe.efi,etc
Q1. Is UEFI flashed as single binary i.e., PlatformPkg.fd or different efi's?
I flash a single .fd onto my platforms.
Q1. As the code is in ROM (flash), I understand that it must be copied to RAM for execution. Will complete UEFI be copied to RAM or some phase or section wise?
Q3. How does operating sysetm invoke the UEFI Runtime services?
Q4. I read in one of the internet link that other than Timer, there are no hardware interrupts. Without hardware interrupt how will the USB kind of device be recognized?
UEFI has interrupt support for ARM platforms.
Regards, Ryan.