diff options
Diffstat (limited to 'HisiPkg/D01BoardPkg/Bds/Bds.c')
-rw-r--r-- | HisiPkg/D01BoardPkg/Bds/Bds.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/HisiPkg/D01BoardPkg/Bds/Bds.c b/HisiPkg/D01BoardPkg/Bds/Bds.c index 8005b0924..429050653 100644 --- a/HisiPkg/D01BoardPkg/Bds/Bds.c +++ b/HisiPkg/D01BoardPkg/Bds/Bds.c @@ -302,10 +302,10 @@ DefineDefaultBootEntries ( ARM_BDS_LOADER_ARGUMENTS* BootArguments;
ARM_BDS_LOADER_TYPE BootType;
EFI_DEVICE_PATH* InitrdPath;
- EFI_DEVICE_PATH* FdtLocalPath; + EFI_DEVICE_PATH* FdtLocalPath;
UINTN CmdLineSize;
UINTN InitrdSize;
- UINTN FdtLocalSize; + UINTN FdtLocalSize;
//
// If Boot Order does not exist then create a default entry
@@ -337,7 +337,7 @@ DefineDefaultBootEntries ( ASSERT (StrCmp ((CHAR16*)PcdGetPtr(PcdDefaultBootDevicePath), DevicePathTxt) == 0);
if (DevicePathTxt != NULL){
- FreePool (DevicePathTxt); + FreePool (DevicePathTxt);
}
DEBUG_CODE_END();
@@ -345,31 +345,31 @@ DefineDefaultBootEntries ( if (BootDevicePath != NULL) {
BootType = (ARM_BDS_LOADER_TYPE)PcdGet32 (PcdDefaultBootType);
- if ((BootType == BDS_LOADER_KERNEL_LINUX_ATAG) || (BootType == BDS_LOADER_KERNEL_LINUX_GLOBAL_FDT) || (BootType == BDS_LOADER_KERNEL_LINUX_LOCAL_FDT)) { + if ((BootType == BDS_LOADER_KERNEL_LINUX_ATAG) || (BootType == BDS_LOADER_KERNEL_LINUX_GLOBAL_FDT) || (BootType == BDS_LOADER_KERNEL_LINUX_LOCAL_FDT)) {
CmdLineSize = AsciiStrSize ((CHAR8*)PcdGetPtr(PcdDefaultBootArgument));
InitrdPath = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath ((CHAR16*)PcdGetPtr(PcdDefaultBootInitrdPath));
if (InitrdPath != NULL) {
- InitrdSize = GetDevicePathSize (InitrdPath); + InitrdSize = GetDevicePathSize (InitrdPath);
} else {
InitrdSize = 0;
}
if (BootType == BDS_LOADER_KERNEL_LINUX_LOCAL_FDT) {
FdtLocalPath = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath ((CHAR16*)PcdGetPtr(PcdDefaultFdtLocalDevicePath));
- FdtLocalSize = GetDevicePathSize (FdtLocalPath); + FdtLocalSize = GetDevicePathSize (FdtLocalPath);
} else {
FdtLocalPath = NULL;
FdtLocalSize = 0;
}
- - BootArguments = (ARM_BDS_LOADER_ARGUMENTS*)AllocatePool (sizeof(ARM_BDS_LOADER_ARGUMENTS) + CmdLineSize + InitrdSize + FdtLocalSize); +
+ BootArguments = (ARM_BDS_LOADER_ARGUMENTS*)AllocatePool (sizeof(ARM_BDS_LOADER_ARGUMENTS) + CmdLineSize + InitrdSize + FdtLocalSize);
if ( BootArguments != NULL ) {
- BootArguments->LinuxArguments.CmdLineSize = CmdLineSize; - BootArguments->LinuxArguments.InitrdSize = InitrdSize; - BootArguments->LinuxArguments.FdtLocalSize = FdtLocalSize; - - CopyMem ((VOID*)(BootArguments + 1), (CHAR8*)PcdGetPtr(PcdDefaultBootArgument), CmdLineSize); - CopyMem ((VOID*)((UINTN)(BootArguments + 1) + CmdLineSize), InitrdPath, InitrdSize); - CopyMem ((VOID*)((UINTN)(BootArguments + 1) + CmdLineSize + InitrdSize), FdtLocalPath, FdtLocalSize); + BootArguments->LinuxArguments.CmdLineSize = CmdLineSize;
+ BootArguments->LinuxArguments.InitrdSize = InitrdSize;
+ BootArguments->LinuxArguments.FdtLocalSize = FdtLocalSize;
+
+ CopyMem ((VOID*)(BootArguments + 1), (CHAR8*)PcdGetPtr(PcdDefaultBootArgument), CmdLineSize);
+ CopyMem ((VOID*)((UINTN)(BootArguments + 1) + CmdLineSize), InitrdPath, InitrdSize);
+ CopyMem ((VOID*)((UINTN)(BootArguments + 1) + CmdLineSize + InitrdSize), FdtLocalPath, FdtLocalSize);
}
if (FdtLocalPath != NULL ) {
FreePool (FdtLocalPath);
@@ -389,7 +389,7 @@ DefineDefaultBootEntries ( &BdsLoadOption
);
if (BdsLoadOption != NULL){
- FreePool (BdsLoadOption); + FreePool (BdsLoadOption);
}
if (BootDevicePath != NULL){
FreePool (BootDevicePath);
|