mirror of https://github.com/acidanthera/audk.git
ArmPkg/BdsLib: Load initrd next to the Linux kernel to allow to reduce the memory from the Linux command line
The initrd was loaded at the top of the UEFI System Memory. By consequence, if the system memory was reduced by the Linux command line then the initrd was not part of the system memory. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12994 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
995d9676c8
commit
4671d15d7a
|
@ -155,7 +155,12 @@ BdsBootLinuxAtag (
|
||||||
}
|
}
|
||||||
|
|
||||||
if (InitrdDevicePath) {
|
if (InitrdDevicePath) {
|
||||||
Status = BdsLoadImage (InitrdDevicePath, AllocateAnyPages, &InitrdImage, &InitrdImageSize);
|
// Load the initrd near to the Linux kernel
|
||||||
|
InitrdImage = LINUX_KERNEL_MAX_OFFSET;
|
||||||
|
Status = BdsLoadImage (InitrdDevicePath, AllocateMaxAddress, &InitrdImage, &InitrdImageSize);
|
||||||
|
if (Status == EFI_OUT_OF_RESOURCES) {
|
||||||
|
Status = BdsLoadImage (InitrdDevicePath, AllocateAnyPages, &InitrdImage, &InitrdImageSize);
|
||||||
|
}
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
Print (L"ERROR: Did not find initrd image.\n");
|
Print (L"ERROR: Did not find initrd image.\n");
|
||||||
return Status;
|
return Status;
|
||||||
|
@ -218,7 +223,11 @@ BdsBootLinuxFdt (
|
||||||
}
|
}
|
||||||
|
|
||||||
if (InitrdDevicePath) {
|
if (InitrdDevicePath) {
|
||||||
Status = BdsLoadImage (InitrdDevicePath, AllocateAnyPages, &InitrdImage, &InitrdImageSize);
|
InitrdImage = LINUX_KERNEL_MAX_OFFSET;
|
||||||
|
Status = BdsLoadImage (InitrdDevicePath, AllocateMaxAddress, &InitrdImage, &InitrdImageSize);
|
||||||
|
if (Status == EFI_OUT_OF_RESOURCES) {
|
||||||
|
Status = BdsLoadImage (InitrdDevicePath, AllocateAnyPages, &InitrdImage, &InitrdImageSize);
|
||||||
|
}
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
Print (L"ERROR: Did not find initrd image.\n");
|
Print (L"ERROR: Did not find initrd image.\n");
|
||||||
return Status;
|
return Status;
|
||||||
|
|
Loading…
Reference in New Issue