diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-10-13 08:05:00 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-10-13 08:05:00 +0000 |
commit | 26cc09062dd6aef87fe38f7fb839d8d081ea8106 (patch) | |
tree | cc663979ccbc49535dad9902dc5623c7bcd7de32 | |
parent | 68eed61fd2d23c61f886192ea1e56c72e87547cc (diff) | |
parent | 902a0a3db01d23f7aa6f69bae58e7beba330ddd4 (diff) | |
download | device_linaro_bootloader_OpenPlatformPkg-26cc09062dd6aef87fe38f7fb839d8d081ea8106.tar.gz device_linaro_bootloader_OpenPlatformPkg-26cc09062dd6aef87fe38f7fb839d8d081ea8106.tar.bz2 device_linaro_bootloader_OpenPlatformPkg-26cc09062dd6aef87fe38f7fb839d8d081ea8106.zip |
Snap for 4393550 from 902a0a3db01d23f7aa6f69bae58e7beba330ddd4 to pi-release
Change-Id: I368028ebc9f88abd7f4669c0af4919edcf70f95f
-rw-r--r-- | Platforms/Hisilicon/HiKey/HiKey.dsc | 5 | ||||
-rw-r--r-- | Platforms/Hisilicon/HiKey/HiKeyDxe/InstallBootMenu.c | 4 | ||||
-rw-r--r-- | Platforms/Hisilicon/HiKey/HiKeyFastbootDxe/HiKeyFastboot.c | 5 |
3 files changed, 9 insertions, 5 deletions
diff --git a/Platforms/Hisilicon/HiKey/HiKey.dsc b/Platforms/Hisilicon/HiKey/HiKey.dsc index 93544d8..53fd5d0 100644 --- a/Platforms/Hisilicon/HiKey/HiKey.dsc +++ b/Platforms/Hisilicon/HiKey/HiKey.dsc @@ -350,6 +350,11 @@ # gHiKeyTokenSpaceGuid.PcdBootImagePath|L"VenHw(B549F005-4BD4-4020-A0CB-06F42BDA68C3)/HD(6,GPT,5C0F213C-17E1-4149-88C8-8B50FB4EC70E)" + # + # Variable Size + # + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|2048 + [PcdsDynamicDefault.common] # # The size of a dynamic PCD of the (VOID*) type can not be increased at run diff --git a/Platforms/Hisilicon/HiKey/HiKeyDxe/InstallBootMenu.c b/Platforms/Hisilicon/HiKey/HiKeyDxe/InstallBootMenu.c index a4fe806..a441abc 100644 --- a/Platforms/Hisilicon/HiKey/HiKeyDxe/InstallBootMenu.c +++ b/Platforms/Hisilicon/HiKey/HiKeyDxe/InstallBootMenu.c @@ -244,8 +244,8 @@ HiKeyCreateBootEntry ( if (BootArgs) { /* Always force the BootArgs to save 512 characters. */ - ASSERT (StrSize(BootArgs) <= 512); - BdsLoadOption->OptionalDataSize = 512; + ASSERT (StrSize(BootArgs) <= 512 * sizeof (CHAR16)); + BdsLoadOption->OptionalDataSize = 512 * sizeof (CHAR16); BdsLoadOption->OptionalData = (CHAR16*)AllocateZeroPool (BdsLoadOption->OptionalDataSize); ASSERT (BdsLoadOption->OptionalData != NULL); StrCpy (BdsLoadOption->OptionalData, BootArgs); diff --git a/Platforms/Hisilicon/HiKey/HiKeyFastbootDxe/HiKeyFastboot.c b/Platforms/Hisilicon/HiKey/HiKeyFastbootDxe/HiKeyFastboot.c index d0b1d47..588a9f9 100644 --- a/Platforms/Hisilicon/HiKey/HiKeyFastbootDxe/HiKeyFastboot.c +++ b/Platforms/Hisilicon/HiKey/HiKeyFastbootDxe/HiKeyFastboot.c @@ -50,8 +50,7 @@ #define SERIAL_NUMBER_LENGTH 16
#define BOOT_DEVICE_LENGTH 16
-#define HIKEY_ERASE_SIZE (16 * 1024 * 1024)
-#define HIKEY_ERASE_BLOCKS (HIKEY_ERASE_SIZE / EFI_PAGE_SIZE)
+#define HIKEY_ERASE_SIZE 512
typedef struct _FASTBOOT_PARTITION_LIST {
LIST_ENTRY Link;
@@ -736,7 +735,7 @@ HiKeyFastbootPlatformGetVar ( } else if ( !AsciiStrCmp (Name, "erase-block-size")) {
AsciiSPrint (Value, 12, "0x%llx", HIKEY_ERASE_SIZE);
} else if ( !AsciiStrCmp (Name, "logical-block-size")) {
- AsciiSPrint (Value, 12, "0x%llx", EFI_PAGE_SIZE);
+ AsciiSPrint (Value, 12, "0x%llx", HIKEY_ERASE_SIZE);
} else {
*Value = '\0';
}
|