[Edk2 Dev] EFI_HOB_RESOURCE_DESCRIPTOR question

Subject: [Edk2 Dev] EFI_HOB_RESOURCE_DESCRIPTOR question

From: tigerliu <tigerliu@viatech.com.cn>

To: dev@edk2.tianocore.org

Date: 2009-05-20 23:31:25

Hi:

I am studying PI-Spec.

I have a question about EFI_HOB_RESOURCE_DESCRIPTOR.

 

Based on PI-Spec, there is a EFI_RESOURCE_MEMORY_MAPPED_IO hob type resource descriptor.

This type of hob’s usage is:

used to describe Memory-mapped I/O that is programmed in the HOB producer phase(such as PI phase).

 

For example:

I used this MMIO region at PI phase:

Baseaddress = 0Xe0000000 , length = 0x10000000

So I create a EFI_HOB_RESOURCE_DESCRIPTOR(whose hob type is :  EFI_RESOURCE_MEMORY_MAPPED_IO)

         It means : I have occupied this MMIO region, No driver should occupy this MMIO region at DXE phase.

 

         But, I tried to allocate MMIO region from 0Xe0000000 at DXE phase through GCD service function, it allocated success.

 

I traced the DXE foundation code, found GCD init code would add this type of HOB to available MMIO region.

 

So, my question:

If I want to reserve a MMIO region which used at PI-phase, how to do it?

(1)     not create EFI_RESOURCE_MEMORY_MAPPED_IO resource descriptor at PI pahse?

or

(2)     create a EFI_RESOURCE_MEMORY_RESERVED resource descriptor?

 

Best wishes,