summaryrefslogtreecommitdiffstats
path: root/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c
diff options
context:
space:
mode:
Diffstat (limited to 'IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c')
-rw-r--r--IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c
index b10a9dcef6..8245a2b65e 100644
--- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c
+++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -150,7 +150,7 @@ EFI_STATUS
RomShadow (
IN EFI_HANDLE PciHandle,
IN UINT32 ShadowAddress,
- IN UINT32 ShadowedSize,
+ IN UINT32 ShadowedSize,
IN UINT8 DiskStart,
IN UINT8 DiskEnd
)
@@ -258,7 +258,7 @@ IsLegacyRom (
}
/**
- Find the PC-AT ROM Image in the raw PCI Option ROM. Also return the
+ Find the PC-AT ROM Image in the raw PCI Option ROM. Also return the
related information from the header.
@param Csm16Revision The PCI interface version of underlying CSM16
@@ -321,7 +321,7 @@ GetPciLegacyRom (
if (((UINTN)RomHeader.Raw - (UINTN)*Rom) + Pcir->ImageLength * 512 > *ImageSize) {
break;
}
-
+
if (Pcir->CodeType == PCI_CODE_TYPE_PCAT_IMAGE) {
Match = FALSE;
if (Pcir->VendorId == VendorId) {
@@ -384,7 +384,7 @@ GetPciLegacyRom (
DEBUG ((EFI_D_ERROR, "GetPciLegacyRom - OpRom not match (%04x-%04x)\n", (UINTN)VendorId, (UINTN)DeviceId));
}
}
-
+
if ((Pcir->Indicator & 0x80) == 0x80) {
break;
} else {
@@ -415,7 +415,7 @@ GetPciLegacyRom (
}
if (OpRomRevision != NULL) {
- //
+ //
// Optional return PCI Data Structure revision
//
if (Pcir->Length >= 0x1C) {
@@ -815,7 +815,7 @@ CopyPirqTable (
//
Regs.X.BX = (UINT16) 0x1;
//
- // 16-byte boundary alignment requirement according to
+ // 16-byte boundary alignment requirement according to
// PCI IRQ Routing Table Specification
//
Regs.X.DX = 0x10;
@@ -832,7 +832,7 @@ CopyPirqTable (
if (Regs.X.AX != 0) {
DEBUG ((EFI_D_ERROR, "PIRQ table length insufficient - %x\n", PirqTableSize));
} else {
- DEBUG ((EFI_D_INFO, "PIRQ table in legacy region - %x\n", Private->Legacy16Table->IrqRoutingTablePointer));
+ DEBUG ((EFI_D_INFO, "PIRQ table in legacy region - %x\n", Private->Legacy16Table->IrqRoutingTablePointer));
Private->Legacy16Table->IrqRoutingTableLength = (UINT32)PirqTableSize;
CopyMem (
(VOID *) (UINTN)Private->Legacy16Table->IrqRoutingTablePointer,
@@ -1595,11 +1595,11 @@ PciShadowRoms (
&HandleBuffer,
&HandleCount,
NULL
- );
+ );
if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED;
}
-
+
VgaHandle = HandleBuffer[0];
Status = gBS->LocateHandleBuffer (
@@ -1699,13 +1699,13 @@ PciShadowRoms (
sizeof (Pci) / sizeof (UINT32),
&Pci
);
-
+
//
- // Only one Video OPROM can be given control in BIOS phase. If there are multiple Video devices,
- // one will work in legacy mode (OPROM will be given control) and
+ // Only one Video OPROM can be given control in BIOS phase. If there are multiple Video devices,
+ // one will work in legacy mode (OPROM will be given control) and
// other Video devices will work in native mode (OS driver will handle these devices).
- //
- if (IS_PCI_DISPLAY (&Pci) && Index != 0) {
+ //
+ if (IS_PCI_DISPLAY (&Pci) && Index != 0) {
continue;
}
//
@@ -1715,11 +1715,11 @@ PciShadowRoms (
if (!EFI_ERROR (Status)) {
continue;
}
-
+
//
// If legacy VBIOS Oprom has not been dispatched before, install legacy VBIOS here.
//
- if (IS_PCI_DISPLAY (&Pci) && Index == 0) {
+ if (IS_PCI_DISPLAY (&Pci) && Index == 0) {
Status = LegacyBiosInstallVgaRom (Private);
//
// A return status of EFI_NOT_FOUND is considered valid (No EFI
@@ -2104,7 +2104,7 @@ LegacyBiosInstallVgaRom (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
for (Index = 0; Index < EntryCount; Index++) {
if ((OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_DRIVER) != 0) {
Status = gBS->HandleProtocol (
@@ -2123,7 +2123,7 @@ LegacyBiosInstallVgaRom (
}
}
}
-
+
//
// Kick off the native EFI driver
//
@@ -2305,7 +2305,7 @@ LegacyBiosInstallRom (
MaxRomAddr = PcdGet32 (PcdEndOpromShadowAddress);
if ((Private->Legacy16Table->TableLength >= OFFSET_OF(EFI_COMPATIBILITY16_TABLE, HiPermanentMemoryAddress)) &&
- (Private->Legacy16Table->UmaAddress != 0) &&
+ (Private->Legacy16Table->UmaAddress != 0) &&
(Private->Legacy16Table->UmaSize != 0) &&
(MaxRomAddr > (Private->Legacy16Table->UmaAddress))) {
MaxRomAddr = Private->Legacy16Table->UmaAddress;
@@ -2326,7 +2326,7 @@ LegacyBiosInstallRom (
EFI_SIZE_TO_PAGES (ImageSize),
&PhysicalAddress
);
-
+
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "return LegacyBiosInstallRom(%d): EFI_OUT_OF_RESOURCES (no more space for OpROM)\n", __LINE__));
//
@@ -2389,7 +2389,7 @@ LegacyBiosInstallRom (
(UINT32) ImageSize,
&Granularity
);
-
+
DEBUG ((EFI_D_INFO, " Shadowing OpROM init/runtime/isize = %x/%x/%x\n", InitAddress, RuntimeAddress, ImageSize));
CopyMem ((VOID *) InitAddress, RomImage, ImageSize);
@@ -2466,7 +2466,7 @@ LegacyBiosInstallRom (
//
gRT->GetTime (&BootTime, NULL);
LocalTime = BootTime.Hour * 3600 + BootTime.Minute * 60 + BootTime.Second;
-
+
//
// Multiply result by 18.2 for number of ticks since midnight.
// Use 182/10 to avoid floating point math.
@@ -2476,21 +2476,21 @@ LegacyBiosInstallRom (
BdaPtr = (UINT32 *) ((UINTN) 0x46C);
*BdaPtr = LocalTime;
);
-
+
//
// Pass in handoff data
//
PciEnableStatus = EFI_UNSUPPORTED;
ZeroMem (&Regs, sizeof (Regs));
if (PciHandle != NULL) {
-
+
Status = gBS->HandleProtocol (
PciHandle,
&gEfiPciIoProtocolGuid,
(VOID **) &PciIo
);
ASSERT_EFI_ERROR (Status);
-
+
//
// Enable command register.
//
@@ -2500,7 +2500,7 @@ LegacyBiosInstallRom (
EFI_PCI_DEVICE_ENABLE,
NULL
);
-
+
PciIo->GetLocation (
PciIo,
&Segment,
@@ -2510,10 +2510,10 @@ LegacyBiosInstallRom (
);
DEBUG ((EFI_D_INFO, "Shadowing OpROM on the PCI device %x/%x/%x\n", Bus, Device, Function));
}
-
+
mIgnoreBbsUpdateFlag = FALSE;
Regs.X.AX = Legacy16DispatchOprom;
-
+
//
// Generate DispatchOpRomTable data
//
@@ -2545,7 +2545,7 @@ LegacyBiosInstallRom (
} else {
Regs.X.BX = 0;
}
-
+
if (Private->IntThunk->DispatchOpromTable.NumberBbsEntries != (UINT8) Private->IntThunk->EfiToLegacy16BootTable.NumberBbsEntries) {
Private->IntThunk->EfiToLegacy16BootTable.NumberBbsEntries = (UINT8) Private->IntThunk->DispatchOpromTable.NumberBbsEntries;
mIgnoreBbsUpdateFlag = TRUE;
@@ -2618,7 +2618,7 @@ LegacyBiosInstallRom (
ACCESS_PAGE0_CODE (
LocalDiskEnd = (UINT8) ((*(UINT8 *) ((UINTN) 0x475)) + 0x80);
);
-
+
//
// Allow platform to perform any required actions after the
// OPROM has been initialized.
@@ -2687,7 +2687,7 @@ LegacyBiosInstallRom (
Private->OptionRom = (UINT32) (RuntimeAddress + *RuntimeImageLength);
Status = EFI_SUCCESS;
-
+
Done:
if (PhysicalAddress != 0) {
//
@@ -2879,7 +2879,7 @@ LegacyBiosInstallPciRom (
*Flags = 0;
if ((PciHandle != NULL) && (RomImage == NULL)) {
//
- // If PciHandle has OpRom to Execute
+ // If PciHandle has OpRom to Execute
// and OpRom are all associated with Hardware
//
Status = gBS->HandleProtocol (
@@ -3025,7 +3025,7 @@ LegacyBiosInstallPciRom (
mVgaInstallationInProgress = FALSE;
return EFI_UNSUPPORTED;
}
-
+
Pcir = (PCI_3_0_DATA_STRUCTURE *)
((UINT8 *) LocalRomImage + ((PCI_EXPANSION_ROM_HEADER *) LocalRomImage)->PcirOffset);