diff options
-rw-r--r-- | IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.inf | 3 | ||||
-rw-r--r-- | IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.msa | 3 | ||||
-rw-r--r-- | IntelFrameworkPkg/Library/DxeIoLibCpuIo/IoLib.c | 12 |
3 files changed, 11 insertions, 7 deletions
diff --git a/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.inf b/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.inf index dba120eada..51079ddc46 100644 --- a/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.inf +++ b/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.inf @@ -60,6 +60,7 @@ [Packages]
MdePkg/MdePkg.dec
+ IntelFrameworkPkg/IntelFrameworkPkg.dec
################################################################################
@@ -84,4 +85,4 @@ [Protocols]
gEfiCpuIoProtocolGuid # PROTOCOL ALWAYS_CONSUMED
-
+ gEfiPciRootBridgeIoProtocolGuid # PROTOCOL ALWAYS_CONSUMED
diff --git a/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.msa b/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.msa index 0ee234ec26..0466a35a17 100644 --- a/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.msa +++ b/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.msa @@ -49,6 +49,9 @@ <Protocol Usage="ALWAYS_CONSUMED">
<ProtocolCName>gEfiCpuIoProtocolGuid</ProtocolCName>
</Protocol>
+ <Protocol Usage="ALWAYS_CONSUMED">
+ <ProtocolCName>gEfiPciRootBridgeIoProtocolGuid</ProtocolCName>
+ </Protocol>
</Protocols>
<Externs>
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
diff --git a/IntelFrameworkPkg/Library/DxeIoLibCpuIo/IoLib.c b/IntelFrameworkPkg/Library/DxeIoLibCpuIo/IoLib.c index e43c173bb1..6aeee32cc4 100644 --- a/IntelFrameworkPkg/Library/DxeIoLibCpuIo/IoLib.c +++ b/IntelFrameworkPkg/Library/DxeIoLibCpuIo/IoLib.c @@ -44,9 +44,9 @@ IoLibConstructor ( {
EFI_STATUS Status;
- Status = gBS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, &mPciRootBridgeIo);
+ Status = gBS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID **) &mPciRootBridgeIo);
if (EFI_ERROR (Status)) {
- Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, &mCpuIo);
+ Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, (VOID **) &mCpuIo);
}
ASSERT_EFI_ERROR (Status);
@@ -78,7 +78,7 @@ IoReadWorker ( UINT64 Data;
if (mPciRootBridgeIo != NULL) {
- Status = mPciRootBridgeIo->Io.Read (mPciRootBridgeIo, Width, Port, 1, &Data);
+ Status = mPciRootBridgeIo->Io.Read (mPciRootBridgeIo, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, Port, 1, &Data);
} else {
Status = mCpuIo->Io.Read (mCpuIo, Width, Port, 1, &Data);
}
@@ -113,7 +113,7 @@ IoWriteWorker ( EFI_STATUS Status;
if (mPciRootBridgeIo != NULL) {
- Status = mPciRootBridgeIo->Io.Write (mPciRootBridgeIo, Width, Port, 1, &Data);
+ Status = mPciRootBridgeIo->Io.Write (mPciRootBridgeIo, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, Port, 1, &Data);
} else {
Status = mCpuIo->Io.Write (mCpuIo, Width, Port, 1, &Data);
}
@@ -147,7 +147,7 @@ MmioReadWorker ( UINT64 Data;
if (mPciRootBridgeIo != NULL) {
- Status = mPciRootBridgeIo->Mem.Read (mPciRootBridgeIo, Width, Address, 1, &Data);
+ Status = mPciRootBridgeIo->Mem.Read (mPciRootBridgeIo, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, Address, 1, &Data);
} else {
Status = mCpuIo->Mem.Read (mCpuIo, Width, Address, 1, &Data);
}
@@ -181,7 +181,7 @@ MmioWriteWorker ( EFI_STATUS Status;
if (mPciRootBridgeIo != NULL) {
- Status = mPciRootBridgeIo->Mem.Write (mPciRootBridgeIo, Width, Address, 1, &Data);
+ Status = mPciRootBridgeIo->Mem.Write (mPciRootBridgeIo, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, Address, 1, &Data);
} else {
Status = mCpuIo->Mem.Write (mCpuIo, Width, Address, 1, &Data);
}
|