CorebootModulePkg/CbSupportPei: Relace tabs with whitespaces

Replace tabs with whitespaces and remove the trailing whitespaces
at the end of lines to conform to the coding style.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Reviewed-by: Prince Agyeman <prince.agyeman@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17551 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Maurice Ma
2015-06-03 02:48:07 +00:00
committed by mauricema
parent 7b7fc3e783
commit 5930f541b7

354
CorebootModulePkg/CbSupportPei/CbSupportPei.c Normal file → Executable file
View File

@ -1,7 +1,7 @@
/** @file /** @file
This PEIM will parse coreboot table in memory and report resource information into pei core. This PEIM will parse coreboot table in memory and report resource information into pei core.
This file contains the main entrypoint of the PEIM. This file contains the main entrypoint of the PEIM.
Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR> Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
@ -18,9 +18,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1 #define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1
EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = { EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = {
{ EfiACPIReclaimMemory, 0x008 }, { EfiACPIReclaimMemory, 0x008 },
{ EfiACPIMemoryNVS, 0x004 }, { EfiACPIMemoryNVS, 0x004 },
{ EfiReservedMemoryType, 0x004 }, { EfiReservedMemoryType, 0x004 },
{ EfiRuntimeServicesData, 0x080 }, { EfiRuntimeServicesData, 0x080 },
{ EfiRuntimeServicesCode, 0x080 }, { EfiRuntimeServicesCode, 0x080 },
{ EfiMaxMemoryType, 0 } { EfiMaxMemoryType, 0 }
@ -35,11 +35,11 @@ EFI_PEI_PPI_DESCRIPTOR mPpiBootMode[] = {
}; };
/** /**
Create memory mapped io resource hob. Create memory mapped io resource hob.
@param MmioBase Base address of the memory mapped io range @param MmioBase Base address of the memory mapped io range
@param MmioSize Length of the memory mapped io range @param MmioSize Length of the memory mapped io range
**/ **/
VOID VOID
BuildMemoryMappedIoRangeHob ( BuildMemoryMappedIoRangeHob (
@ -47,7 +47,7 @@ BuildMemoryMappedIoRangeHob (
UINT64 MmioSize UINT64 MmioSize
) )
{ {
BuildResourceDescriptorHob ( BuildResourceDescriptorHob (
EFI_RESOURCE_MEMORY_MAPPED_IO, EFI_RESOURCE_MEMORY_MAPPED_IO,
(EFI_RESOURCE_ATTRIBUTE_PRESENT | (EFI_RESOURCE_ATTRIBUTE_PRESENT |
EFI_RESOURCE_ATTRIBUTE_INITIALIZED | EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
@ -56,12 +56,12 @@ BuildMemoryMappedIoRangeHob (
MmioBase, MmioBase,
MmioSize MmioSize
); );
BuildMemoryAllocationHob ( BuildMemoryAllocationHob (
MmioBase, MmioBase,
MmioSize, MmioSize,
EfiMemoryMappedIO EfiMemoryMappedIO
); );
} }
/** /**
@ -79,21 +79,21 @@ IsFvHeaderValid (
IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader
) )
{ {
UINT16 Checksum; UINT16 Checksum;
// Skip nv storage fv // Skip nv storage fv
if (CompareMem (&FwVolHeader->FileSystemGuid, &gEfiFirmwareFileSystem2Guid, sizeof(EFI_GUID)) != 0 ) { if (CompareMem (&FwVolHeader->FileSystemGuid, &gEfiFirmwareFileSystem2Guid, sizeof(EFI_GUID)) != 0 ) {
return FALSE; return FALSE;
} }
if ( (FwVolHeader->Revision != EFI_FVH_REVISION) || if ( (FwVolHeader->Revision != EFI_FVH_REVISION) ||
(FwVolHeader->Signature != EFI_FVH_SIGNATURE) || (FwVolHeader->Signature != EFI_FVH_SIGNATURE) ||
(FwVolHeader->FvLength == ((UINTN) -1)) || (FwVolHeader->FvLength == ((UINTN) -1)) ||
((FwVolHeader->HeaderLength & 0x01 ) !=0) ) { ((FwVolHeader->HeaderLength & 0x01 ) !=0) ) {
return FALSE; return FALSE;
} }
Checksum = CalculateCheckSum16 ((UINT16 *) FwVolHeader, FwVolHeader->HeaderLength); Checksum = CalculateCheckSum16 ((UINT16 *) FwVolHeader, FwVolHeader->HeaderLength);
if (Checksum != 0) { if (Checksum != 0) {
DEBUG (( DEBUG_ERROR, DEBUG (( DEBUG_ERROR,
"ERROR - Invalid Firmware Volume Header Checksum, change 0x%04x to 0x%04x\r\n", "ERROR - Invalid Firmware Volume Header Checksum, change 0x%04x to 0x%04x\r\n",
@ -102,51 +102,51 @@ IsFvHeaderValid (
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
} }
/** /**
Install FvInfo PPI and create fv hobs for remained fvs Install FvInfo PPI and create fv hobs for remained fvs
**/ **/
VOID VOID
CbPeiReportRemainedFvs ( CbPeiReportRemainedFvs (
VOID VOID
) )
{ {
UINT8* TempPtr; UINT8* TempPtr;
UINT8* EndPtr; UINT8* EndPtr;
TempPtr = (UINT8* )(UINTN) PcdGet32 (PcdPayloadFdMemBase); TempPtr = (UINT8* )(UINTN) PcdGet32 (PcdPayloadFdMemBase);
EndPtr = (UINT8* )(UINTN) (PcdGet32 (PcdPayloadFdMemBase) + PcdGet32 (PcdPayloadFdMemSize)); EndPtr = (UINT8* )(UINTN) (PcdGet32 (PcdPayloadFdMemBase) + PcdGet32 (PcdPayloadFdMemSize));
for (;TempPtr < EndPtr;) { for (;TempPtr < EndPtr;) {
if (IsFvHeaderValid ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)) { if (IsFvHeaderValid ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)) {
if (TempPtr != (UINT8* )(UINTN) PcdGet32 (PcdPayloadFdMemBase)) { if (TempPtr != (UINT8* )(UINTN) PcdGet32 (PcdPayloadFdMemBase)) {
// Skip the PEI FV // Skip the PEI FV
DEBUG((EFI_D_ERROR, "Found one valid fv : 0x%lx.\n", TempPtr, ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)->FvLength)); DEBUG((EFI_D_ERROR, "Found one valid fv : 0x%lx.\n", TempPtr, ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)->FvLength));
PeiServicesInstallFvInfoPpi ( PeiServicesInstallFvInfoPpi (
NULL, NULL,
(VOID *) (UINTN) TempPtr, (VOID *) (UINTN) TempPtr,
(UINT32) (UINTN) ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)->FvLength, (UINT32) (UINTN) ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)->FvLength,
NULL, NULL,
NULL NULL
); );
BuildFvHob ((EFI_PHYSICAL_ADDRESS)(UINTN) TempPtr, ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)->FvLength); BuildFvHob ((EFI_PHYSICAL_ADDRESS)(UINTN) TempPtr, ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)->FvLength);
} }
} }
TempPtr += ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)->FvLength; TempPtr += ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)->FvLength;
} }
} }
/** /**
This is the entrypoint of PEIM This is the entrypoint of PEIM
@param FileHandle Handle of the file being invoked. @param FileHandle Handle of the file being invoked.
@param PeiServices Describes the list of possible PEI Services. @param PeiServices Describes the list of possible PEI Services.
@retval EFI_SUCCESS if it completed successfully. @retval EFI_SUCCESS if it completed successfully.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
@ -155,36 +155,36 @@ CbPeiEntryPoint (
IN CONST EFI_PEI_SERVICES **PeiServices IN CONST EFI_PEI_SERVICES **PeiServices
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
UINT64 LowMemorySize, HighMemorySize; UINT64 LowMemorySize, HighMemorySize;
UINT64 PeiMemSize = SIZE_64MB; // 64 MB UINT64 PeiMemSize = SIZE_64MB; // 64 MB
EFI_PHYSICAL_ADDRESS PeiMemBase = 0; EFI_PHYSICAL_ADDRESS PeiMemBase = 0;
UINT32 RegEax; UINT32 RegEax;
UINT8 PhysicalAddressBits; UINT8 PhysicalAddressBits;
VOID* pCbHeader; VOID* pCbHeader;
VOID* pAcpiTable; VOID* pAcpiTable;
UINT32 AcpiTableSize; UINT32 AcpiTableSize;
VOID* pSmbiosTable; VOID* pSmbiosTable;
UINT32 SmbiosTableSize; UINT32 SmbiosTableSize;
SYSTEM_TABLE_INFO* pSystemTableInfo; SYSTEM_TABLE_INFO* pSystemTableInfo;
FRAME_BUFFER_INFO FbInfo; FRAME_BUFFER_INFO FbInfo;
FRAME_BUFFER_INFO* pFbInfo; FRAME_BUFFER_INFO* pFbInfo;
ACPI_BOARD_INFO* pAcpiBoardInfo; ACPI_BOARD_INFO* pAcpiBoardInfo;
UINTN PmCtrlRegBase, PmTimerRegBase, ResetRegAddress, ResetValue; UINTN PmCtrlRegBase, PmTimerRegBase, ResetRegAddress, ResetValue;
LowMemorySize = 0; LowMemorySize = 0;
HighMemorySize = 0; HighMemorySize = 0;
Status = CbParseMemoryInfo (&LowMemorySize, &HighMemorySize); Status = CbParseMemoryInfo (&LowMemorySize, &HighMemorySize);
if (EFI_ERROR(Status)) if (EFI_ERROR(Status))
return Status; return Status;
DEBUG((EFI_D_ERROR, "LowMemorySize: 0x%lx.\n", LowMemorySize)); DEBUG((EFI_D_ERROR, "LowMemorySize: 0x%lx.\n", LowMemorySize));
DEBUG((EFI_D_ERROR, "HighMemorySize: 0x%lx.\n", HighMemorySize)); DEBUG((EFI_D_ERROR, "HighMemorySize: 0x%lx.\n", HighMemorySize));
ASSERT (LowMemorySize > 0); ASSERT (LowMemorySize > 0);
BuildResourceDescriptorHob ( BuildResourceDescriptorHob (
EFI_RESOURCE_SYSTEM_MEMORY, EFI_RESOURCE_SYSTEM_MEMORY,
( (
EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_PRESENT |
@ -198,9 +198,9 @@ CbPeiEntryPoint (
(EFI_PHYSICAL_ADDRESS)(0), (EFI_PHYSICAL_ADDRESS)(0),
(UINT64)(0xA0000) (UINT64)(0xA0000)
); );
BuildResourceDescriptorHob ( BuildResourceDescriptorHob (
EFI_RESOURCE_MEMORY_RESERVED, EFI_RESOURCE_MEMORY_RESERVED,
( (
EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_PRESENT |
@ -214,10 +214,10 @@ CbPeiEntryPoint (
(EFI_PHYSICAL_ADDRESS)(0xA0000), (EFI_PHYSICAL_ADDRESS)(0xA0000),
(UINT64)(0x60000) (UINT64)(0x60000)
); );
BuildResourceDescriptorHob ( BuildResourceDescriptorHob (
EFI_RESOURCE_SYSTEM_MEMORY, EFI_RESOURCE_SYSTEM_MEMORY,
( (
EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_PRESENT |
EFI_RESOURCE_ATTRIBUTE_INITIALIZED | EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
EFI_RESOURCE_ATTRIBUTE_TESTED | EFI_RESOURCE_ATTRIBUTE_TESTED |
@ -229,11 +229,11 @@ CbPeiEntryPoint (
(EFI_PHYSICAL_ADDRESS)(0x100000), (EFI_PHYSICAL_ADDRESS)(0x100000),
(UINT64) (LowMemorySize - 0x100000) (UINT64) (LowMemorySize - 0x100000)
); );
if (HighMemorySize > 0) { if (HighMemorySize > 0) {
BuildResourceDescriptorHob ( BuildResourceDescriptorHob (
EFI_RESOURCE_SYSTEM_MEMORY, EFI_RESOURCE_SYSTEM_MEMORY,
( (
EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_PRESENT |
EFI_RESOURCE_ATTRIBUTE_INITIALIZED | EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE | EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
@ -243,30 +243,30 @@ CbPeiEntryPoint (
), ),
(EFI_PHYSICAL_ADDRESS)(0x100000000ULL), (EFI_PHYSICAL_ADDRESS)(0x100000000ULL),
HighMemorySize HighMemorySize
); );
} }
// //
// Should be 64k aligned // Should be 64k aligned
// //
PeiMemBase = (LowMemorySize - PeiMemSize) & (~(BASE_64KB - 1)); PeiMemBase = (LowMemorySize - PeiMemSize) & (~(BASE_64KB - 1));
DEBUG((EFI_D_ERROR, "PeiMemBase: 0x%lx.\n", PeiMemBase)); DEBUG((EFI_D_ERROR, "PeiMemBase: 0x%lx.\n", PeiMemBase));
DEBUG((EFI_D_ERROR, "PeiMemSize: 0x%lx.\n", PeiMemSize)); DEBUG((EFI_D_ERROR, "PeiMemSize: 0x%lx.\n", PeiMemSize));
Status = PeiServicesInstallPeiMemory ( Status = PeiServicesInstallPeiMemory (
PeiMemBase, PeiMemBase,
PeiMemSize PeiMemSize
); );
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
// //
// Set cache on the physical memory // Set cache on the physical memory
// //
MtrrSetMemoryAttribute (BASE_1MB, LowMemorySize - BASE_1MB, CacheWriteBack); MtrrSetMemoryAttribute (BASE_1MB, LowMemorySize - BASE_1MB, CacheWriteBack);
MtrrSetMemoryAttribute (0, 0xA0000, CacheWriteBack); MtrrSetMemoryAttribute (0, 0xA0000, CacheWriteBack);
// //
// Create Memory Type Information HOB // Create Memory Type Information HOB
// //
BuildGuidDataHob ( BuildGuidDataHob (
@ -274,58 +274,58 @@ CbPeiEntryPoint (
mDefaultMemoryTypeInformation, mDefaultMemoryTypeInformation,
sizeof(mDefaultMemoryTypeInformation) sizeof(mDefaultMemoryTypeInformation)
); );
// //
// Create Fv hob // Create Fv hob
// //
CbPeiReportRemainedFvs (); CbPeiReportRemainedFvs ();
BuildMemoryAllocationHob ( BuildMemoryAllocationHob (
PcdGet32 (PcdPayloadFdMemBase), PcdGet32 (PcdPayloadFdMemBase),
PcdGet32 (PcdPayloadFdMemSize), PcdGet32 (PcdPayloadFdMemSize),
EfiBootServicesData EfiBootServicesData
); );
// //
// Build CPU memory space and IO space hob // Build CPU memory space and IO space hob
// //
AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL); AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);
if (RegEax >= 0x80000008) { if (RegEax >= 0x80000008) {
AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL); AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL);
PhysicalAddressBits = (UINT8) RegEax; PhysicalAddressBits = (UINT8) RegEax;
} else { } else {
PhysicalAddressBits = 36; PhysicalAddressBits = 36;
} }
// //
// Create a CPU hand-off information // Create a CPU hand-off information
// //
BuildCpuHob (PhysicalAddressBits, 16); BuildCpuHob (PhysicalAddressBits, 16);
// //
// Report Local APIC range // Report Local APIC range
// //
BuildMemoryMappedIoRangeHob (0xFEC80000, SIZE_512KB); BuildMemoryMappedIoRangeHob (0xFEC80000, SIZE_512KB);
// //
// Boot mode // Boot mode
// //
Status = PeiServicesSetBootMode (BOOT_WITH_FULL_CONFIGURATION); Status = PeiServicesSetBootMode (BOOT_WITH_FULL_CONFIGURATION);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
Status = PeiServicesInstallPpi (mPpiBootMode); Status = PeiServicesInstallPpi (mPpiBootMode);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
// //
// Set pcd to save the upper coreboot header in case the dxecore will // Set pcd to save the upper coreboot header in case the dxecore will
// erase 0~4k memory // erase 0~4k memory
// //
pCbHeader = NULL; pCbHeader = NULL;
if ((CbParseGetCbHeader (1, &pCbHeader) == RETURN_SUCCESS) if ((CbParseGetCbHeader (1, &pCbHeader) == RETURN_SUCCESS)
&& ((UINTN)pCbHeader > BASE_4KB)) { && ((UINTN)pCbHeader > BASE_4KB)) {
DEBUG((EFI_D_ERROR, "Actual Coreboot header: %p.\n", pCbHeader)); DEBUG((EFI_D_ERROR, "Actual Coreboot header: %p.\n", pCbHeader));
PcdSet32 (PcdCbHeaderPointer, (UINT32)(UINTN)pCbHeader); PcdSet32 (PcdCbHeaderPointer, (UINT32)(UINTN)pCbHeader);
} }
// //
// Create guid hob for system tables like acpi table and smbios table // Create guid hob for system tables like acpi table and smbios table
// //
@ -335,48 +335,48 @@ CbPeiEntryPoint (
SmbiosTableSize = 0; SmbiosTableSize = 0;
Status = CbParseAcpiTable (&pAcpiTable, &AcpiTableSize); Status = CbParseAcpiTable (&pAcpiTable, &AcpiTableSize);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
// ACPI table is oblidgible // ACPI table is oblidgible
DEBUG ((EFI_D_ERROR, "Failed to find the required acpi table\n")); DEBUG ((EFI_D_ERROR, "Failed to find the required acpi table\n"));
ASSERT (FALSE); ASSERT (FALSE);
} }
CbParseSmbiosTable (&pSmbiosTable, &SmbiosTableSize); CbParseSmbiosTable (&pSmbiosTable, &SmbiosTableSize);
pSystemTableInfo = NULL; pSystemTableInfo = NULL;
pSystemTableInfo = BuildGuidHob (&gUefiSystemTableInfoGuid, sizeof (SYSTEM_TABLE_INFO)); pSystemTableInfo = BuildGuidHob (&gUefiSystemTableInfoGuid, sizeof (SYSTEM_TABLE_INFO));
ASSERT (pSystemTableInfo != NULL); ASSERT (pSystemTableInfo != NULL);
pSystemTableInfo->AcpiTableBase = (UINT64) (UINTN)pAcpiTable; pSystemTableInfo->AcpiTableBase = (UINT64) (UINTN)pAcpiTable;
pSystemTableInfo->AcpiTableSize = AcpiTableSize; pSystemTableInfo->AcpiTableSize = AcpiTableSize;
pSystemTableInfo->SmbiosTableBase = (UINT64) (UINTN)pSmbiosTable; pSystemTableInfo->SmbiosTableBase = (UINT64) (UINTN)pSmbiosTable;
pSystemTableInfo->SmbiosTableSize = SmbiosTableSize; pSystemTableInfo->SmbiosTableSize = SmbiosTableSize;
DEBUG ((EFI_D_ERROR, "Detected Acpi Table at 0x%lx, length 0x%x\n", pSystemTableInfo->AcpiTableBase, pSystemTableInfo->AcpiTableSize)); DEBUG ((EFI_D_ERROR, "Detected Acpi Table at 0x%lx, length 0x%x\n", pSystemTableInfo->AcpiTableBase, pSystemTableInfo->AcpiTableSize));
DEBUG ((EFI_D_ERROR, "Detected Smbios Table at 0x%lx, length 0x%x\n", pSystemTableInfo->SmbiosTableBase, pSystemTableInfo->SmbiosTableSize)); DEBUG ((EFI_D_ERROR, "Detected Smbios Table at 0x%lx, length 0x%x\n", pSystemTableInfo->SmbiosTableBase, pSystemTableInfo->SmbiosTableSize));
DEBUG ((EFI_D_ERROR, "Create system table info guid hob\n")); DEBUG ((EFI_D_ERROR, "Create system table info guid hob\n"));
// //
// Create guid hob for acpi board information // Create guid hob for acpi board information
// //
Status = CbParseFadtInfo (&PmCtrlRegBase, &PmTimerRegBase, &ResetRegAddress, &ResetValue); Status = CbParseFadtInfo (&PmCtrlRegBase, &PmTimerRegBase, &ResetRegAddress, &ResetValue);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
pAcpiBoardInfo = NULL; pAcpiBoardInfo = NULL;
pAcpiBoardInfo = BuildGuidHob (&gUefiAcpiBoardInfoGuid, sizeof (ACPI_BOARD_INFO)); pAcpiBoardInfo = BuildGuidHob (&gUefiAcpiBoardInfoGuid, sizeof (ACPI_BOARD_INFO));
ASSERT (pAcpiBoardInfo != NULL); ASSERT (pAcpiBoardInfo != NULL);
pAcpiBoardInfo->PmCtrlRegBase = (UINT64)PmCtrlRegBase; pAcpiBoardInfo->PmCtrlRegBase = (UINT64)PmCtrlRegBase;
pAcpiBoardInfo->PmTimerRegBase = (UINT64)PmTimerRegBase; pAcpiBoardInfo->PmTimerRegBase = (UINT64)PmTimerRegBase;
pAcpiBoardInfo->ResetRegAddress = (UINT64)ResetRegAddress; pAcpiBoardInfo->ResetRegAddress = (UINT64)ResetRegAddress;
pAcpiBoardInfo->ResetValue = (UINT8)ResetValue; pAcpiBoardInfo->ResetValue = (UINT8)ResetValue;
DEBUG ((EFI_D_ERROR, "Create acpi board info guid hob\n")); DEBUG ((EFI_D_ERROR, "Create acpi board info guid hob\n"));
// //
// Create guid hob for frame buffer information // Create guid hob for frame buffer information
// //
ZeroMem (&FbInfo, sizeof (FRAME_BUFFER_INFO)); ZeroMem (&FbInfo, sizeof (FRAME_BUFFER_INFO));
Status = CbParseFbInfo (&FbInfo); Status = CbParseFbInfo (&FbInfo);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
pFbInfo = BuildGuidHob (&gUefiFrameBufferInfoGuid, sizeof (FRAME_BUFFER_INFO)); pFbInfo = BuildGuidHob (&gUefiFrameBufferInfoGuid, sizeof (FRAME_BUFFER_INFO));
ASSERT (pSystemTableInfo != NULL); ASSERT (pSystemTableInfo != NULL);
CopyMem (pFbInfo, &FbInfo, sizeof (FRAME_BUFFER_INFO)); CopyMem (pFbInfo, &FbInfo, sizeof (FRAME_BUFFER_INFO));
DEBUG ((EFI_D_ERROR, "Create frame buffer info guid hob\n")); DEBUG ((EFI_D_ERROR, "Create frame buffer info guid hob\n"));
} }
// //
// Mask off all legacy 8259 interrupt sources // Mask off all legacy 8259 interrupt sources