diff options
author | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-08-03 08:52:48 +0000 |
---|---|---|
committer | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-08-03 08:52:48 +0000 |
commit | 6d3aa33ed03ca6d9d1af2e5425e8c5adec3f5f5d (patch) | |
tree | 530b8cacfa82a599c62375ad936ccbc21bb8c1d6 /Nt32Pkg/FvbServicesRuntimeDxe | |
parent | c8db3056ecfec7d4c0c6dd20cfc23c9daa4fb196 (diff) | |
download | edk2-6d3aa33ed03ca6d9d1af2e5425e8c5adec3f5f5d.tar.gz edk2-6d3aa33ed03ca6d9d1af2e5425e8c5adec3f5f5d.tar.bz2 edk2-6d3aa33ed03ca6d9d1af2e5425e8c5adec3f5f5d.zip |
Replace the FlashMapHob with PCD defined in FDF on Nt32 platform. Currently, the tool can not generate correct PCD value in FDF, so in the patch, we still define the flash layout PCDs in DSC for short term.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3544 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Nt32Pkg/FvbServicesRuntimeDxe')
-rw-r--r-- | Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c | 1 | ||||
-rw-r--r-- | Nt32Pkg/FvbServicesRuntimeDxe/FvbInfo.c | 34 | ||||
-rw-r--r-- | Nt32Pkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf | 17 |
3 files changed, 36 insertions, 16 deletions
diff --git a/Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c b/Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c index c2245f48c9..48926fbf53 100644 --- a/Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c +++ b/Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c @@ -1281,6 +1281,7 @@ Returns: // Get the DXE services table
//
DxeServices = gDS;
+ __asm int 3;
//
// Allocate runtime services data for global variable, which contains
diff --git a/Nt32Pkg/FvbServicesRuntimeDxe/FvbInfo.c b/Nt32Pkg/FvbServicesRuntimeDxe/FvbInfo.c index 25df952279..f455567a49 100644 --- a/Nt32Pkg/FvbServicesRuntimeDxe/FvbInfo.c +++ b/Nt32Pkg/FvbServicesRuntimeDxe/FvbInfo.c @@ -48,10 +48,7 @@ Abstract: #include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
-
-#include "FlashLayout.h"
-
-#define FIRMWARE_BLOCK_SIZE 0x10000
+#include <Library/PcdLib.h>
typedef struct {
UINT64 FvLength;
@@ -62,22 +59,18 @@ typedef struct { EFI_FV_BLOCK_MAP_ENTRY End[1];
} EFI_FVB_MEDIA_INFO;
-#define FVB_MEDIA_BLOCK_SIZE FIRMWARE_BLOCK_SIZE
-#define RECOVERY_BOIS_BLOCK_NUM FIRMWARE_BLOCK_NUMBER
-#define SYSTEM_NV_BLOCK_NUM 2
-
EFI_FVB_MEDIA_INFO mPlatformFvbMediaInfo[] = {
//
// Recovery BOIS FVB
//
{
- EFI_WINNT_FIRMWARE_LENGTH,
+ FixedPcdGet32 (PcdWinNtFlashFvRecoverySize),
{
{
0,
}, // ZeroVector[16]
EFI_FIRMWARE_FILE_SYSTEM2_GUID,
- FVB_MEDIA_BLOCK_SIZE * RECOVERY_BOIS_BLOCK_NUM,
+ FixedPcdGet32 (PcdWinNtFlashFvRecoverySize),
EFI_FVH_SIGNATURE,
EFI_FVB2_READ_ENABLED_CAP |
EFI_FVB2_READ_STATUS |
@@ -92,8 +85,8 @@ EFI_FVB_MEDIA_INFO mPlatformFvbMediaInfo[] = { }, // Reserved[1]
1, // Revision
{
- RECOVERY_BOIS_BLOCK_NUM,
- FVB_MEDIA_BLOCK_SIZE,
+ FixedPcdGet32 (PcdWinNtFlashFvRecoverySize)/FixedPcdGet32 (PcdWinNtFirmwareBlockSize),
+ FixedPcdGet32 (PcdWinNtFirmwareBlockSize),
}
},
{
@@ -105,13 +98,19 @@ EFI_FVB_MEDIA_INFO mPlatformFvbMediaInfo[] = { // Systen NvStorage FVB
//
{
- EFI_WINNT_RUNTIME_UPDATABLE_LENGTH + EFI_WINNT_FTW_SPARE_BLOCK_LENGTH,
+ FixedPcdGet32 (PcdFlashNvStorageVariableSize) +
+ FixedPcdGet32 (PcdFlashNvStorageFtwWorkingSize) +
+ FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize) +
+ FixedPcdGet32 (PcdWinNtFlashNvStorageEventLogSize),
{
{
0,
}, // ZeroVector[16]
EFI_SYSTEM_NV_DATA_HOB_GUID,
- FVB_MEDIA_BLOCK_SIZE * SYSTEM_NV_BLOCK_NUM,
+ FixedPcdGet32 (PcdFlashNvStorageVariableSize) +
+ FixedPcdGet32 (PcdFlashNvStorageFtwWorkingSize) +
+ FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize) +
+ FixedPcdGet32 (PcdWinNtFlashNvStorageEventLogSize),
EFI_FVH_SIGNATURE,
EFI_FVB2_READ_ENABLED_CAP |
EFI_FVB2_READ_STATUS |
@@ -126,8 +125,11 @@ EFI_FVB_MEDIA_INFO mPlatformFvbMediaInfo[] = { }, // Reserved[1]
1, // Revision
{
- SYSTEM_NV_BLOCK_NUM,
- FVB_MEDIA_BLOCK_SIZE,
+ (FixedPcdGet32 (PcdFlashNvStorageVariableSize) +
+ FixedPcdGet32 (PcdFlashNvStorageFtwWorkingSize) +
+ FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize) +
+ FixedPcdGet32 (PcdWinNtFlashNvStorageEventLogSize)) / FixedPcdGet32 (PcdWinNtFirmwareBlockSize),
+ FixedPcdGet32 (PcdWinNtFirmwareBlockSize),
}
},
{
diff --git a/Nt32Pkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf b/Nt32Pkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf index f2530a1228..314b22507f 100644 --- a/Nt32Pkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf +++ b/Nt32Pkg/FvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf @@ -55,6 +55,7 @@ BaseLib
UefiDriverEntryPoint
UefiLib
+ PcdLib
[Guids]
@@ -66,5 +67,21 @@ gEfiFirmwareVolumeBlockProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiDevicePathProtocolGuid # PROTOCOL SOMETIMES_PRODUCED
+[PcdsFixedAtBuild.common]
+ PcdWinNtFirmwareFdSize|gEfiNt32PkgTokenSpaceGuid
+ PcdWinNtFirmwareBlockSize|gEfiNt32PkgTokenSpaceGuid
+
+ PcdWinNtFlashFvRecoveryBase|gEfiNt32PkgTokenSpaceGuid
+ PcdWinNtFlashFvRecoverySize|gEfiNt32PkgTokenSpaceGuid
+ PcdWinNtFlashNvStorageEventLogBase|gEfiNt32PkgTokenSpaceGuid
+ PcdWinNtFlashNvStorageEventLogSize|gEfiNt32PkgTokenSpaceGuid
+
+ PcdFlashNvStorageFtwWorkingSize|gEfiMdeModulePkgTokenSpaceGuid
+ PcdFlashNvStorageFtwWorkingBase|gEfiMdeModulePkgTokenSpaceGuid
+ PcdFlashNvStorageFtwSpareSize|gEfiMdeModulePkgTokenSpaceGuid
+ PcdFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid
+ PcdFlashNvStorageVariableSize|gEfiMdeModulePkgTokenSpaceGuid
+ PcdFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid
+
[depex]
TRUE
\ No newline at end of file |