summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-09 15:33:02 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-09 15:33:02 +0000
commit49a25d849008b0282d91eeeb7318b45ba4b9aced (patch)
treeb36242f77b4e761eb6a18a5137168698673cd52d /ArmPlatformPkg
parent0e29bf5c91b057a41c9918eb6c996717defaed99 (diff)
downloadedk2-49a25d849008b0282d91eeeb7318b45ba4b9aced.tar.gz
edk2-49a25d849008b0282d91eeeb7318b45ba4b9aced.tar.bz2
edk2-49a25d849008b0282d91eeeb7318b45ba4b9aced.zip
ArmPlatformPkg/Bds: Fixed update of boot entries
There were some incorrect pointer calculations. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12999 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/Bds/BootMenu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c
index 8202f9991c..e7e475dfc1 100644
--- a/ArmPlatformPkg/Bds/BootMenu.c
+++ b/ArmPlatformPkg/Bds/BootMenu.c
@@ -1,6 +1,6 @@
/** @file
*
-* Copyright (c) 2011, ARM Limited. All rights reserved.
+* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@@ -406,7 +406,7 @@ BootMenuUpdateBootOption (
if (InitrdSupport) {
if (InitrdSize > 0) {
// Case we update the initrd device path
- Status = DeviceSupport->UpdateDevicePathNode ((EFI_DEVICE_PATH*)((LinuxArguments + 1) + CmdLineSize), L"initrd", &InitrdPath, NULL, NULL);
+ Status = DeviceSupport->UpdateDevicePathNode ((EFI_DEVICE_PATH*)((UINTN)(LinuxArguments + 1) + CmdLineSize), L"initrd", &InitrdPath, NULL, NULL);
if (EFI_ERROR(Status) && Status != EFI_NOT_FOUND) {// EFI_NOT_FOUND is returned on empty input string, but we can boot without an initrd
Status = EFI_ABORTED;
goto EXIT;
@@ -454,7 +454,7 @@ BootMenuUpdateBootOption (
BootArguments->LinuxArguments.CmdLineSize = CmdLineSize;
BootArguments->LinuxArguments.InitrdSize = InitrdSize;
CopyMem (&BootArguments->LinuxArguments + 1, CmdLine, CmdLineSize);
- CopyMem ((UINTN)(&BootArguments->LinuxArguments + 1) + CmdLine, InitrdPath, InitrdSize);
+ CopyMem ((VOID*)((UINTN)(&BootArguments->LinuxArguments + 1) + CmdLineSize), InitrdPath, InitrdSize);
} else {
BootArguments = NULL;
}