Query: Add GCD IO Space Map


Wasim Khan
 

Hi All,

The Initial GCD I/O Space Map printed from DxeMain is :

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


I require some IO memory (for PciHostBridgeDxe) , i need NonExist IO chuck from 0x90_00010000 - 0x90_0001ffff , for which I tried BuildResourceDescriptorHob() from PEI Phase

BuildResourceDescriptorHob (
EFI_RESOURCE_IO,
ResourceAttributes,
0x9000010000,
0x10000
);

And gDS->AddIoSpace (EfiGcdIoTypeIo, 0x9000010000, 0x10000) from a DXE driver . But in both case GCD AddIoSpace fails with Status as Unsupported.

GCD:AddIoSpace(Base=0000009000010000,Length=0000000000010000)
GcdIoType = I/O
Status = Unsupported
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF



Can someone help that how can I add a NonExist GCDIoType memory ?




Also, why does the initial GCD I/O space map shows small range as compared with GCD Memory Space Map?

GCD:Initial GCD Memory Space Map
GCDMemType Range Capabilities Attributes
========== ================================= ================ ================
NonExist 0000000000000000-00000FFFFFFFFFFF 0000000000000000 0000000000000000

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


Regards,
Wasim


Wasim Khan
 

Hi ,

Any clue on this ?

Get Outlook for Android<https://aka.ms/ghei36>
________________________________
From: discuss@edk2.groups.io <discuss@edk2.groups.io> on behalf of Wasim Khan via groups.io <wasim.khan=nxp.com@groups.io>
Sent: Friday, April 3, 2020 1:18:13 AM
To: discuss@edk2.groups.io <discuss@edk2.groups.io>; ruiyu.ni@intel.com <ruiyu.ni@intel.com>; dandan.bi@intel.com <dandan.bi@intel.com>; liming.gao@intel.com <liming.gao@intel.com>; hao.a.wu@intel.com <hao.a.wu@intel.com>
Subject: [edk2-discuss] Query: Add GCD IO Space Map

Hi All,

The Initial GCD I/O Space Map printed from DxeMain is :

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


I require some IO memory (for PciHostBridgeDxe) , i need NonExist IO chuck from 0x90_00010000 - 0x90_0001ffff , for which I tried BuildResourceDescriptorHob() from PEI Phase

BuildResourceDescriptorHob (
EFI_RESOURCE_IO,
ResourceAttributes,
0x9000010000,
0x10000
);

And gDS->AddIoSpace (EfiGcdIoTypeIo, 0x9000010000, 0x10000) from a DXE driver . But in both case GCD AddIoSpace fails with Status as Unsupported.

GCD:AddIoSpace(Base=0000009000010000,Length=0000000000010000)
GcdIoType = I/O
Status = Unsupported
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF



Can someone help that how can I add a NonExist GCDIoType memory ?




Also, why does the initial GCD I/O space map shows small range as compared with GCD Memory Space Map?

GCD:Initial GCD Memory Space Map
GCDMemType Range Capabilities Attributes
========== ================================= ================ ================
NonExist 0000000000000000-00000FFFFFFFFFFF 0000000000000000 0000000000000000

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


Regards,
Wasim


Ni, Ray
 

I am not sure the open source community is aligned on what mails go to "discuss" mailing list. CC to "devel" mailing list.

Please read the PI spec on how the IO space is converted from different states.

The initial non-exist IO space is created based on the IO address width in the CPU INFO HOB.
You cannot add a non-exist IO space using GCD services.

Thanks,
Ray

From: Wasim Khan <wasim.khan@nxp.com>
Sent: Friday, April 3, 2020 12:25 PM
To: discuss@edk2.groups.io; Ni, Ray <ray.ni@intel.com>; Bi, Dandan <dandan.bi@intel.com>; Gao, Liming <liming.gao@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; leif.lindholm@linaro.org
Subject: Re: Query: Add GCD IO Space Map

Hi ,

Any clue on this ?

Get Outlook for Android<https://aka.ms/ghei36>
________________________________
From: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io> <discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>> on behalf of Wasim Khan via groups.io <wasim.khan=nxp.com@groups.io<mailto:wasim.khan=nxp.com@groups.io>>
Sent: Friday, April 3, 2020 1:18:13 AM
To: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io> <discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>>; ruiyu.ni@intel.com<mailto:ruiyu.ni@intel.com> <ruiyu.ni@intel.com<mailto:ruiyu.ni@intel.com>>; dandan.bi@intel.com<mailto:dandan.bi@intel.com> <dandan.bi@intel.com<mailto:dandan.bi@intel.com>>; liming.gao@intel.com<mailto:liming.gao@intel.com> <liming.gao@intel.com<mailto:liming.gao@intel.com>>; hao.a.wu@intel.com<mailto:hao.a.wu@intel.com> <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>
Subject: [edk2-discuss] Query: Add GCD IO Space Map

Hi All,

The Initial GCD I/O Space Map printed from DxeMain is :

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


I require some IO memory (for PciHostBridgeDxe) , i need NonExist IO chuck from 0x90_00010000 - 0x90_0001ffff , for which I tried BuildResourceDescriptorHob() from PEI Phase

BuildResourceDescriptorHob (
EFI_RESOURCE_IO,
ResourceAttributes,
0x9000010000,
0x10000
);

And gDS->AddIoSpace (EfiGcdIoTypeIo, 0x9000010000, 0x10000) from a DXE driver . But in both case GCD AddIoSpace fails with Status as Unsupported.

GCD:AddIoSpace(Base=0000009000010000,Length=0000000000010000)
GcdIoType = I/O
Status = Unsupported
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF



Can someone help that how can I add a NonExist GCDIoType memory ?




Also, why does the initial GCD I/O space map shows small range as compared with GCD Memory Space Map?

GCD:Initial GCD Memory Space Map
GCDMemType Range Capabilities Attributes
========== ================================= ================ ================
NonExist 0000000000000000-00000FFFFFFFFFFF 0000000000000000 0000000000000000

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


Regards,
Wasim


Brian J. Johnson
 

Wasim,

GCD I/O Space is intended for IA32/X64 I/O Port space: the legacy I/O ports used on PCs for accessing various bits of legacy hardware, such as the system reset register at port 0xcf9. Very little modern hardware uses it.

It looks like you're interested in adding memory-mapped I/O space. For that I believe you'd use gDS->AddMemorySpace (EfiGcdMemoryTypeMemoryMappedIo, 0x9000010000, 0x10000) or a resource descriptor HOB of type EFI_RESOURCE_MEMORY_MAPPED_IO.

Brian

-------- Original Message --------
From: Wasim Khan [mailto:wasim.khan@nxp.com]
Sent: Thursday, April 2, 2020, 11:24 PM
To: discuss@edk2.groups.io <discuss@edk2.groups.io>, ruiyu.ni@intel.com <ruiyu.ni@intel.com>, dandan.bi@intel.com <dandan.bi@intel.com>, liming.gao@intel.com <liming.gao@intel.com>, hao.a.wu@intel.com <hao.a.wu@intel.com>, leif.lindholm@linaro.org <leif.lindholm@linaro.org>
Subject: [edk2-discuss] Query: Add GCD IO Space Map

Hi ,

Any clue on this ?

Get Outlook for Android<https://aka.ms/ghei36
________________________________
From: discuss@edk2.groups.io <discuss@edk2.groups.io> on behalf of Wasim Khan via groups.io <wasim.khan=nxp.com@groups.io>
Sent: Friday, April 3, 2020 1:18:13 AM
To: discuss@edk2.groups.io <discuss@edk2.groups.io>; ruiyu.ni@intel.com <ruiyu.ni@intel.com>; dandan.bi@intel.com <dandan.bi@intel.com>; liming.gao@intel.com <liming.gao@intel.com>; hao.a.wu@intel.com <hao.a.wu@intel.com>
Subject: [edk2-discuss] Query: Add GCD IO Space Map

Hi All,

The Initial GCD I/O Space Map printed from DxeMain is :

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


I require some IO memory (for PciHostBridgeDxe) , i need NonExist IO chuck from 0x90_00010000 - 0x90_0001ffff , for which I tried BuildResourceDescriptorHob() from PEI Phase

BuildResourceDescriptorHob (
EFI_RESOURCE_IO,
ResourceAttributes,
0x9000010000,
0x10000
);

And gDS->AddIoSpace (EfiGcdIoTypeIo, 0x9000010000, 0x10000) from a DXE driver . But in both case GCD AddIoSpace fails with Status as Unsupported.

GCD:AddIoSpace(Base=0000009000010000,Length=0000000000010000)
GcdIoType = I/O
Status = Unsupported
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF



Can someone help that how can I add a NonExist GCDIoType memory ?




Also, why does the initial GCD I/O space map shows small range as compared with GCD Memory Space Map?

GCD:Initial GCD Memory Space Map
GCDMemType Range Capabilities Attributes
========== ================================= ================ ================
NonExist 0000000000000000-00000FFFFFFFFFFF 0000000000000000 0000000000000000

GCD:Initial GCD I/O Space Map
GCDIoType Range
========== =================================
NonExist 0000000000000000-00000000000FFFFF


Regards,
Wasim











--
Brian J. Johnson
Enterprise X86 Lab

Hewlett Packard Enterprise