mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
0e29bf5c91
commit
49a25d8490
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue