summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2014-05-22 10:30:45 +0100
committerLeif Lindholm <leif.lindholm@linaro.org>2014-05-22 10:30:45 +0100
commitf87e9b004a015ebd78e0cebcd78f2b7b52731eb1 (patch)
tree59a37009a2e8c030d8d0a36c8dad9594779c2f13
parent46109b2eac06765a384f1f75c6dc0d05c01bfcca (diff)
parenta67675c7ef9b29e2085c390c1d30a75b5327d3ba (diff)
downloadedk2-topics-f87e9b004a015ebd78e0cebcd78f2b7b52731eb1.tar.gz
Merge remote-tracking branch 'rmt-1/linaro-topic-2014.05-backports' into release-prep
-rw-r--r--ArmPkg/Library/BdsLib/BdsFilePath.c78
-rw-r--r--ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc4
2 files changed, 53 insertions, 29 deletions
diff --git a/ArmPkg/Library/BdsLib/BdsFilePath.c b/ArmPkg/Library/BdsLib/BdsFilePath.c
index 4095612..90be9c1 100644
--- a/ArmPkg/Library/BdsLib/BdsFilePath.c
+++ b/ArmPkg/Library/BdsLib/BdsFilePath.c
@@ -300,35 +300,24 @@ TryRemovableDevice (
return Status;
}
-/**
- Connect a Device Path and return the handle of the driver that support this DevicePath
-
- @param DevicePath Device Path of the File to connect
- @param Handle Handle of the driver that support this DevicePath
- @param RemainingDevicePath Remaining DevicePath nodes that do not match the driver DevicePath
-
- @retval EFI_SUCCESS A driver that matches the Device Path has been found
- @retval EFI_NOT_FOUND No handles match the search.
- @retval EFI_INVALID_PARAMETER DevicePath or Handle is NULL
-
-**/
+STATIC
EFI_STATUS
-BdsConnectDevicePath (
- IN EFI_DEVICE_PATH_PROTOCOL* DevicePath,
- OUT EFI_HANDLE *Handle,
- OUT EFI_DEVICE_PATH_PROTOCOL **RemainingDevicePath
+BdsConnectAndUpdateDevicePath (
+ IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
+ OUT EFI_HANDLE *Handle,
+ OUT EFI_DEVICE_PATH_PROTOCOL **RemainingDevicePath
)
{
EFI_DEVICE_PATH* Remaining;
EFI_DEVICE_PATH* NewDevicePath;
EFI_STATUS Status;
- if ((DevicePath == NULL) || (Handle == NULL)) {
+ if ((DevicePath == NULL) || (*DevicePath == NULL) || (Handle == NULL)) {
return EFI_INVALID_PARAMETER;
}
do {
- Remaining = DevicePath;
+ Remaining = *DevicePath;
// The LocateDevicePath() function locates all devices on DevicePath that support Protocol and returns
// the handle to the device that is closest to DevicePath. On output, the device path pointer is modified
// to point to the remaining part of the device path
@@ -348,7 +337,7 @@ BdsConnectDevicePath (
if (!EFI_ERROR (Status)) {
// Now, we have got the whole Device Path connected, call again ConnectController to ensure all the supported Driver
// Binding Protocol are connected (such as DiskIo and SimpleFileSystem)
- Remaining = DevicePath;
+ Remaining = *DevicePath;
Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &Remaining, Handle);
if (!EFI_ERROR (Status)) {
Status = gBS->ConnectController (*Handle, NULL, Remaining, FALSE);
@@ -371,9 +360,11 @@ BdsConnectDevicePath (
//TODO: Should we just return success and leave the caller decide if it is the expected RemainingPath
Status = EFI_SUCCESS;
} else {
- Status = TryRemovableDevice (DevicePath, Handle, &NewDevicePath);
+ Status = TryRemovableDevice (*DevicePath, Handle, &NewDevicePath);
if (!EFI_ERROR (Status)) {
- return BdsConnectDevicePath (NewDevicePath, Handle, RemainingDevicePath);
+ Status = BdsConnectAndUpdateDevicePath (&NewDevicePath, Handle, RemainingDevicePath);
+ *DevicePath = NewDevicePath;
+ return Status;
}
}
@@ -384,6 +375,28 @@ BdsConnectDevicePath (
return Status;
}
+/**
+ Connect a Device Path and return the handle of the driver that support this DevicePath
+
+ @param DevicePath Device Path of the File to connect
+ @param Handle Handle of the driver that support this DevicePath
+ @param RemainingDevicePath Remaining DevicePath nodes that do not match the driver DevicePath
+
+ @retval EFI_SUCCESS A driver that matches the Device Path has been found
+ @retval EFI_NOT_FOUND No handles match the search.
+ @retval EFI_INVALID_PARAMETER DevicePath or Handle is NULL
+
+**/
+EFI_STATUS
+BdsConnectDevicePath (
+ IN EFI_DEVICE_PATH_PROTOCOL* DevicePath,
+ OUT EFI_HANDLE *Handle,
+ OUT EFI_DEVICE_PATH_PROTOCOL **RemainingDevicePath
+ )
+{
+ return BdsConnectAndUpdateDevicePath (&DevicePath, Handle, RemainingDevicePath);
+}
+
BOOLEAN
BdsFileSystemSupport (
IN EFI_DEVICE_PATH *DevicePath,
@@ -869,8 +882,8 @@ BDS_FILE_LOADER FileLoaders[] = {
};
EFI_STATUS
-BdsLoadImage (
- IN EFI_DEVICE_PATH *DevicePath,
+BdsLoadImageAndUpdateDevicePath (
+ IN OUT EFI_DEVICE_PATH **DevicePath,
IN EFI_ALLOCATE_TYPE Type,
IN OUT EFI_PHYSICAL_ADDRESS* Image,
OUT UINTN *FileSize
@@ -881,15 +894,15 @@ BdsLoadImage (
EFI_DEVICE_PATH *RemainingDevicePath;
BDS_FILE_LOADER* FileLoader;
- Status = BdsConnectDevicePath (DevicePath, &Handle, &RemainingDevicePath);
+ Status = BdsConnectAndUpdateDevicePath (DevicePath, &Handle, &RemainingDevicePath);
if (EFI_ERROR (Status)) {
return Status;
}
FileLoader = FileLoaders;
while (FileLoader->Support != NULL) {
- if (FileLoader->Support (DevicePath, Handle, RemainingDevicePath)) {
- return FileLoader->LoadImage (DevicePath, Handle, RemainingDevicePath, Type, Image, FileSize);
+ if (FileLoader->Support (*DevicePath, Handle, RemainingDevicePath)) {
+ return FileLoader->LoadImage (*DevicePath, Handle, RemainingDevicePath, Type, Image, FileSize);
}
FileLoader++;
}
@@ -897,6 +910,17 @@ BdsLoadImage (
return EFI_UNSUPPORTED;
}
+EFI_STATUS
+BdsLoadImage (
+ IN EFI_DEVICE_PATH *DevicePath,
+ IN EFI_ALLOCATE_TYPE Type,
+ IN OUT EFI_PHYSICAL_ADDRESS* Image,
+ OUT UINTN *FileSize
+ )
+{
+ return BdsLoadImageAndUpdateDevicePath (&DevicePath, Type, Image, FileSize);
+}
+
/**
Start an EFI Application from a Device Path
@@ -923,7 +947,7 @@ BdsStartEfiApplication (
EFI_LOADED_IMAGE_PROTOCOL* LoadedImage;
// Find the nearest supported file loader
- Status = BdsLoadImage (DevicePath, AllocateAnyPages, &BinaryBuffer, &BinarySize);
+ Status = BdsLoadImageAndUpdateDevicePath (&DevicePath, AllocateAnyPages, &BinaryBuffer, &BinarySize);
if (EFI_ERROR (Status)) {
return Status;
}
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
index 37afded..9f35e69 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
@@ -118,9 +118,9 @@
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize|0x1000
- # System Memory (2GB)
+ # System Memory (2GB - 16MB of Trusted DRAM at the top of the 32bit address space)
gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000
- gArmTokenSpaceGuid.PcdSystemMemorySize|0x80000000
+ gArmTokenSpaceGuid.PcdSystemMemorySize|0x7F000000
# Size of the region used by UEFI in permanent memory (Reserved 64MB)
gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x04000000