Fix the wrong return value of both InternalSyncIncrement()
and InternalSyncDecrement(). The return value shouldn't
be the address of input parameter. It should be the updated
value of input parameter instead.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang <haojian.zhuang(a)linaro.org>
---
MdePkg/Library/BaseSynchronizationLib/AArch64/Synchronization.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/MdePkg/Library/BaseSynchronizationLib/AArch64/Synchronization.S b/MdePkg/Library/BaseSynchronizationLib/AArch64/Synchronization.S
index ecb87fc..830ea5b 100644
--- a/MdePkg/Library/BaseSynchronizationLib/AArch64/Synchronization.S
+++ b/MdePkg/Library/BaseSynchronizationLib/AArch64/Synchronization.S
@@ -171,6 +171,7 @@ TryInternalSyncIncrement:
add w1, w1, #1
stxr w2, w1, [x0]
cbnz w2, TryInternalSyncIncrement
+ mov x0, x1
dmb sy
ret
@@ -199,5 +200,6 @@ TryInternalSyncDecrement:
sub w1, w1, #1
stxr w2, w1, [x0]
cbnz w2, TryInternalSyncDecrement
+ mov x0, x1
dmb sy
ret
--
1.9.1
Hi folks,
In MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf, the
polling interval is fixed by macro:
#define KEYBOARD_TIMER_INTERVAL 200000 // 0.02s
However, this may cause fast input truncation on some platform. For
example, we have a serial console with below features:
1. Baud rate: 115200
2. FIFO depth of UART device: 32
If we want to capture all input, we need to poll with the interval of 32
/ (115200 / (8 + 1 + 1)) = 2.8 ms, 8 + 1 + 1 for data bits + start bit +
stop bit.
So, I suppose to use a PCD to set the interval statically, or calculate
from serial IO protocol IO Mode data dynamically, which contains FIFO
depth and data bits, etc.
Please let me know your comments.
Thanks.
(If you see my another mail like this, please ignore that; this one is
the final version; sorry for the noise)
Hi folks,
How about adding new interfaces to allocate memory with limited address
in UncachedAllocationLib, something like AllocateMaxAddress of
EFI_ALLOCATE_TYPE?
The background is that we may still have legacy devices on ARM64 which
requires 32bit memory for DMA transaction.
Please let me know your comments.
Thanks.
Hi folks,
In MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf, the
polling interval is fixed by macro:
#define KEYBOARD_TIMER_INTERVAL 200000 // 0.02s
However, this may cause fast input truncation on some platform. For
example, we have a serial console with below features:
1. Baud rate: 115200
2. FIFO depth of UART device: 32
If we want to capture all input, we need to poll with the interval of 32
/ (115200 / (8 + 1 + 1)) = 2.8 ms, 8 + 1 + 1 for data bits, start bit
and stop bit.
So, I suppose to use a PCD to set the interval statically, or calculate
from serial IO protocol IO Mode data dynamically.
Please let me know your comments.
Thanks.
If Bds launches BootNext with failure, delete it.
Otherwise, we'll create BootNext variable by BdsStartOption() & delete
it in BdsEntry() for each boot. It doesn't make sense to update
this variable in non-volatile variable area for each boot. And the
non-volatile variable area may be full of this message until overflow.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang <haojian.zhuang(a)linaro.org>
---
ArmPlatformPkg/Bds/Bds.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c
index ffae4bc..512e8e1 100644
--- a/ArmPlatformPkg/Bds/Bds.c
+++ b/ArmPlatformPkg/Bds/Bds.c
@@ -530,12 +530,12 @@ BdsEntry (
// BootNext has not been succeeded launched
if (EFI_ERROR(Status)) {
Print(L"Fail to start BootNext.\n");
- }
- // Delete the BootNext environment variable
- gRT->SetVariable (L"BootNext", &gEfiGlobalVariableGuid,
- EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
- 0, NULL);
+ // Delete the BootNext environment variable
+ gRT->SetVariable (L"BootNext", &gEfiGlobalVariableGuid,
+ EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
+ 0, NULL);
+ }
}
// Clear BootCurrent variable
--
2.1.4
FYI
I am adding the below patch to my GCC consolidation series.
-------------8<---------------
In GCC 4.7, a feature was added to the ARM backend that allows
unaligned loads and stores to be emitted. Since it is enabled by
default on ARMv6 and later CPUs, and since such code is not suitable
in our case (i.e., bare metal code), we must disable it by passing the
-mno-unaligned-access option if we are using GCC 4.7 or later.
However, this particular feature and its enabling by default have been
backported to version 4.6 by Linaro. Since the Linaro toolchains are
widely used for ARM development, and also shipped by distros such as
Ubuntu, we should disable the feature on version 4.6 as well.
Unfortunately, since the upstream version does not support the feature,
it also does not understand the -mno-unaligned-access option.
Considering the above, and the fact that the oldest supported toolchain
for AARCH64 is 4.7 as well, let's just drop support for 4.6 altogether.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
---
BaseTools/Conf/tools_def.template | 30 --------------------
1 file changed, 30 deletions(-)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index fabfe7436167..5707aafec8cd 100644
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -4160,36 +4160,6 @@ DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64
*_GCC46_X64_OBJCOPY_FLAGS =
*_GCC46_X64_NASM_FLAGS = -f elf64
-##################
-# GCC46 ARM definitions
-##################
-*_GCC46_ARM_OBJCOPY_PATH = echo
-*_GCC46_ARM_CC_PATH = ENV(GCC46_ARM_PREFIX)gcc
-*_GCC46_ARM_SLINK_PATH = ENV(GCC46_ARM_PREFIX)ar
-*_GCC46_ARM_DLINK_PATH = ENV(GCC46_ARM_PREFIX)ld
-*_GCC46_ARM_ASLDLINK_PATH = ENV(GCC46_ARM_PREFIX)ld
-*_GCC46_ARM_ASM_PATH = ENV(GCC46_ARM_PREFIX)gcc
-*_GCC46_ARM_PP_PATH = ENV(GCC46_ARM_PREFIX)gcc
-*_GCC46_ARM_VFRPP_PATH = ENV(GCC46_ARM_PREFIX)gcc
-*_GCC46_ARM_ASLCC_PATH = ENV(GCC46_ARM_PREFIX)gcc
-*_GCC46_ARM_ASLPP_PATH = ENV(GCC46_ARM_PREFIX)gcc
-*_GCC46_ARM_RC_PATH = ENV(GCC46_ARM_PREFIX)objcopy
-
-*_GCC46_ARM_ARCHCC_FLAGS =
-*_GCC46_ARM_PLATFORM_FLAGS = -march=armv7-a
-
-*_GCC46_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
-*_GCC46_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_ASLDLINK_FLAGS)
-*_GCC46_ARM_ASM_FLAGS = DEF(GCC_ARM_ASM_FLAGS)
-*_GCC46_ARM_DLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS)
-*_GCC46_ARM_PLATFORM_FLAGS = -march=armv7-a
-*_GCC46_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
-*_GCC46_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
-*_GCC46_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
-
- DEBUG_GCC46_ARM_CC_FLAGS = DEF(GCC_ARM_CC_FLAGS) -O0
-RELEASE_GCC46_ARM_CC_FLAGS = DEF(GCC_ARM_CC_FLAGS)
-
####################################################################################
#
# GCC 4.7 - This configuration is used to compile under Linux to produce
--
1.9.1