summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2018-08-22 11:44:07 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-08-22 11:44:07 -0700
commit93532044db872867b7daaa7a3318a1bf877e22c0 (patch)
treecd96510bda79813136380d688145acb668a95824
parent3572a2ed37e1174ba2b2a3418483c113f060da00 (diff)
parent179d668bb252100d0110721aac5e58bf7d985d1c (diff)
downloadedk2-93532044db872867b7daaa7a3318a1bf877e22c0.tar.gz
Merge remote-tracking branch 'aosp/upstream-hikey-aosp' into HEAD am: a1e5dccd6a am: c593450051
am: 179d668bb2 Change-Id: If391b00e3e33e32c2de880f27bda245fc7a2a069
-rwxr-xr-xBaseTools/Conf/tools_def.template2
-rw-r--r--EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c2
-rw-r--r--EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf1
-rw-r--r--EmbeddedPkg/Library/AbootimgLib/AbootimgLib.c37
-rw-r--r--MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c14
5 files changed, 29 insertions, 27 deletions
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 79d19e9d8..7736cfb5c 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -4344,7 +4344,7 @@ DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-ad
DEFINE GCC_IPF_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -minline-int-divide-min-latency
DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie
DEFINE GCC_ARM_CC_XIPFLAGS = -mno-unaligned-access
-DEFINE GCC_AARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -fno-builtin -Wno-address -fno-asynchronous-unwind-tables -fno-pic -fno-pie -ffixed-x18
+DEFINE GCC_AARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -fno-builtin -Wno-address -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie -ffixed-x18
DEFINE GCC_AARCH64_CC_XIPFLAGS = -mstrict-align
DEFINE GCC_DLINK_FLAGS_COMMON = -nostdlib --pie
DEFINE GCC_DLINK2_FLAGS_COMMON = -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds
diff --git a/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c b/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c
index fb3178314..9074c6c77 100644
--- a/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c
+++ b/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c
@@ -21,7 +21,6 @@
#include <Library/BaseMemoryLib.h>
#include <Library/PcdLib.h>
#include <Library/PrintLib.h>
-#include <Library/TimerLib.h>
#include <Library/UefiApplicationEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
@@ -440,7 +439,6 @@ AcceptCmd (
}
}
SEND_LITERAL ("OKAY");
- MicroSecondDelay (3000000);
gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);
// Shouldn't get here
diff --git a/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf b/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf
index dd17aa824..b62c41d21 100644
--- a/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf
+++ b/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf
@@ -35,7 +35,6 @@
MemoryAllocationLib
PcdLib
PrintLib
- TimerLib
UefiApplicationEntryPoint
UefiBootServicesTableLib
UefiLib
diff --git a/EmbeddedPkg/Library/AbootimgLib/AbootimgLib.c b/EmbeddedPkg/Library/AbootimgLib/AbootimgLib.c
index a8db3ac1a..b4cd1e4d2 100644
--- a/EmbeddedPkg/Library/AbootimgLib/AbootimgLib.c
+++ b/EmbeddedPkg/Library/AbootimgLib/AbootimgLib.c
@@ -268,23 +268,26 @@ AllocateRamdisk (
ASSERT (IS_POWER_OF_2 (Header->PageSize));
- Address = (EFI_PHYSICAL_ADDRESS)(UINTN)Header->RamdiskAddress;
- Status = gBS->AllocatePages (
- AllocateAddress, EfiBootServicesData,
- EFI_SIZE_TO_PAGES (Header->RamdiskSize), &Address);
- if (EFI_ERROR (Status)) {
- return Status;
- }
- Source = (VOID *) (BootImgBytePtr + Header->PageSize +
- ALIGN_VALUE (Header->KernelSize, Header->PageSize));
- CopyMem ((VOID *)(UINTN)Address, Source, Header->RamdiskSize);
- // Set the ramdisk in command line arguments
- if (KernelArgs != NULL) {
- UnicodeSPrint (
- (CHAR16 *)KernelArgs + StrLen (KernelArgs), BOOTIMG_KERNEL_ARGS_SIZE,
- L" initrd=0x%x,0x%x",
- (UINTN)Address, Header->RamdiskSize
- );
+ Status = EFI_SUCCESS;
+ if (Header->RamdiskAddress && Header->RamdiskSize) {
+ Address = (EFI_PHYSICAL_ADDRESS)(UINTN)Header->RamdiskAddress;
+ Status = gBS->AllocatePages (
+ AllocateAddress, EfiBootServicesData,
+ EFI_SIZE_TO_PAGES (Header->RamdiskSize), &Address);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+ Source = (VOID *) (BootImgBytePtr + Header->PageSize +
+ ALIGN_VALUE (Header->KernelSize, Header->PageSize));
+ CopyMem ((VOID *)(UINTN)Address, Source, Header->RamdiskSize);
+ // Set the ramdisk in command line arguments
+ if (KernelArgs != NULL) {
+ UnicodeSPrint (
+ (CHAR16 *)KernelArgs + StrLen (KernelArgs), BOOTIMG_KERNEL_ARGS_SIZE,
+ L" initrd=0x%x,0x%x",
+ (UINTN)Address, Header->RamdiskSize
+ );
+ }
}
return Status;
}
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
index e71be6afc..fbb31edf6 100644
--- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
+++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
@@ -811,12 +811,14 @@ UfsStartExecCmd (
UINT32 Data;
EFI_STATUS Status;
- Status = UfsMmioRead32 (Private, UFS_HC_UTRLRSR_OFFSET, &Data);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- if ((Data & UFS_HC_UTRLRSR) != UFS_HC_UTRLRSR) {
+ for (;;) {
+ Status = UfsMmioRead32 (Private, UFS_HC_UTRLRSR_OFFSET, &Data);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+ if ((Data & UFS_HC_UTRLRSR) == UFS_HC_UTRLRSR) {
+ break;
+ }
Status = UfsMmioWrite32 (Private, UFS_HC_UTRLRSR_OFFSET, UFS_HC_UTRLRSR);
if (EFI_ERROR (Status)) {
return Status;