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:
 

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.