From 1d58cfb2c64621c15de38c69ee6118f59cfb6a53 Mon Sep 17 00:00:00 2001 From: AJFISH Date: Tue, 3 Jul 2007 19:38:58 +0000 Subject: Fixed build break by removing missing include file. Made code compile by not assuming every FLASH device is a FW Hub. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3021 6f19259b-4bc3-4df7-8a09-765794883524 --- Nt32Pkg/PlatformBdsDxe/CommonHeader.h | 1 - Nt32Pkg/PlatformBdsDxe/Generic/Capsules.c | 58 ------------------------------- 2 files changed, 59 deletions(-) diff --git a/Nt32Pkg/PlatformBdsDxe/CommonHeader.h b/Nt32Pkg/PlatformBdsDxe/CommonHeader.h index d44bd37553..c4fb48eeee 100644 --- a/Nt32Pkg/PlatformBdsDxe/CommonHeader.h +++ b/Nt32Pkg/PlatformBdsDxe/CommonHeader.h @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include diff --git a/Nt32Pkg/PlatformBdsDxe/Generic/Capsules.c b/Nt32Pkg/PlatformBdsDxe/Generic/Capsules.c index 921c5a2ea5..b1a6c6e7e9 100644 --- a/Nt32Pkg/PlatformBdsDxe/Generic/Capsules.c +++ b/Nt32Pkg/PlatformBdsDxe/Generic/Capsules.c @@ -39,40 +39,6 @@ BdsLockFv ( IN EFI_FLASH_SUBAREA_ENTRY *FlashEntry ) { - EFI_FV_BLOCK_MAP_ENTRY *BlockMap; - EFI_FIRMWARE_VOLUME_HEADER *FvHeader; - UINT64 BaseAddress; - UINT8 Data; - UINT32 BlockLength; - UINTN Index; - - BaseAddress = FlashEntry->Base - 0x400000 + 2; - FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) ((UINTN) (FlashEntry->Base)); - BlockMap = &(FvHeader->BlockMap[0]); - - while ((BlockMap->NumBlocks != 0) && (BlockMap->Length != 0)) { - BlockLength = BlockMap->Length; - for (Index = 0; Index < BlockMap->NumBlocks; Index++) { - CpuIo->Mem.Read ( - CpuIo, - EfiCpuIoWidthUint8, - BaseAddress, - 1, - &Data - ); - Data = (UINT8) (Data | 0x3); - CpuIo->Mem.Write ( - CpuIo, - EfiCpuIoWidthUint8, - BaseAddress, - 1, - &Data - ); - BaseAddress += BlockLength; - } - - BlockMap++; - } } VOID @@ -80,30 +46,6 @@ BdsLockNonUpdatableFlash ( VOID ) { - EFI_FLASH_MAP_ENTRY_DATA *FlashMapEntryData; - EFI_PEI_HOB_POINTERS GuidHob; - EFI_STATUS Status; - EFI_CPU_IO_PROTOCOL *CpuIo; - - Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, &CpuIo); - ASSERT_EFI_ERROR (Status); - - GuidHob.Raw = GetHobList (); - while ((GuidHob.Raw = GetNextGuidHob (&gEfiFlashMapHobGuid, GuidHob.Raw)) != NULL) { - FlashMapEntryData = (EFI_FLASH_MAP_ENTRY_DATA *) GET_GUID_HOB_DATA (GuidHob.Guid); - - // - // Get the variable store area - // - if ((FlashMapEntryData->AreaType == EFI_FLASH_AREA_RECOVERY_BIOS) || - (FlashMapEntryData->AreaType == EFI_FLASH_AREA_MAIN_BIOS) - ) { - BdsLockFv (CpuIo, &(FlashMapEntryData->Entries[0])); - } - GuidHob.Raw = GET_NEXT_HOB (GuidHob); - } - - return ; } EFI_STATUS -- cgit v1.2.3