Skip to content

Commit fa5319a

Browse files
amratheshprashymh
authored andcommitted
mem_test: update edk2 and compiler version for build
- update edk2 version for the mem_test build to edk2-stable202511 so it doesn't require cxl_revert.patch workaround. - update README and mem_test_edk2.patch. Signed-off-by: Amrathesh <amrathesh@arm.com> Change-Id: I904aede9579a8b0e37818997d7b056e3ca744383
1 parent 4500989 commit fa5319a

4 files changed

Lines changed: 26 additions & 55 deletions

File tree

docs/mem_test/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,18 @@ might lead to unpredictable behavior in concurrent programs.
1818
1. Setup edk2 build directory
1919
> git clone https://github.com/tianocore/edk2.git
2020
> cd edk2
21-
> git checkout 836942fbadb629050b866a8052e6af755bcdf623
21+
> git checkout edk2-stable202511
2222
> git clone https://github.com/tianocore/edk2-libc.git
2323
> git submodule update --init --recursive
2424
25-
2. Download source files and apply edk2 patch
25+
2. Download source files
2626
> git clone https://github.com/ARM-software/sysarch-acs.git ShellPkg/Application/sysarch-acs
2727
> git clone https://github.com/relokin/kvm-unit-tests.git ShellPkg/Application/sysarch-acs/mem_test/kvm-unit-tests
2828
> git -C ShellPkg/Application/sysarch-acs/mem_test/kvm-unit-tests checkout target-efi-bsa
29-
> git apply ShellPkg/Application/sysarch-acs/mem_test/patches/mem_test_edk2.patch
3029
3130
3. Build bsa-acs UEFI app <br>
32-
Note : Install GCC-ARM 13.2 [toolchain](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads)
33-
> export GCCNOLTO_AARCH64_PREFIX=<path to CC>arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
31+
Note : Install GCC-ARM 14.3 [toolchain](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads)
32+
> export GCCNOLTO_AARCH64_PREFIX=<path to CC>arm-gnu-toolchain-14.3.Rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
3433
> export PACKAGES_PATH=`pwd`/edk2-libc
3534
> source edksetup.sh
3635
> make -C BaseTools/Source/C

mem_test/patches/cxl_revert.patch

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
diff --git a/BaseTools/Scripts/GccBase.lds b/BaseTools/Scripts/GccBase.lds
2-
index 9f27e83bb0..79e8c9f023 100644
2+
index 3d2a97ddeb..c9e35af0c1 100644
33
--- a/BaseTools/Scripts/GccBase.lds
44
+++ b/BaseTools/Scripts/GccBase.lds
5-
@@ -21,6 +21,7 @@ SECTIONS {
5+
@@ -27,6 +27,7 @@ SECTIONS {
66
. = PECOFF_HEADER_SIZE;
77

88
.text : ALIGN(CONSTANT(COMMONPAGESIZE)) {
99
+ _textbsa = .;
10+
KEEP(*(.entry))
1011
*(.text .text.* .stub .gnu.linkonce.t.*)
1112
*(.rodata .rodata.* .gnu.linkonce.r.*)
12-
*(.got .got.*)
1313
diff --git a/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c b/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
14-
index 17e48443ac..a2b3adefdf 100644
14+
index 17e48443ac..ddf56f0cd6 100644
1515
--- a/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
1616
+++ b/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
1717
@@ -16,6 +16,9 @@
@@ -30,29 +30,29 @@ index 17e48443ac..a2b3adefdf 100644
3030

3131
+ mySystemTable = SystemTable;
3232
+ myImageHandle = ImageHandle;
33-
+
33+
+
3434
Status = SystemTable->BootServices->OpenProtocol (
3535
ImageHandle,
3636
&gEfiShellParametersProtocolGuid,
3737
diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc
38-
index 5303a68959..7ccbce272b 100644
38+
index 94d95de0eb..4a70e2857a 100644
3939
--- a/ShellPkg/ShellPkg.dsc
4040
+++ b/ShellPkg/ShellPkg.dsc
41-
@@ -27,6 +27,9 @@
42-
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
43-
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
44-
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathProtocol.inf
41+
@@ -23,6 +23,9 @@
42+
!include MdePkg/MdeLibs.dsc.inc
43+
44+
[LibraryClasses.common]
4545
+ ValLib|ShellPkg/Application/sysarch-acs/val/ValLib.inf
4646
+ PalLib|ShellPkg/Application/sysarch-acs/pal/uefi_acpi/PalLib.inf
4747
+ LibCFlat|ShellPkg/Application/sysarch-acs/mem_test/LibCFlat.inf
48-
!if $(TARGET) == RELEASE
49-
DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
50-
!else
51-
@@ -97,6 +100,7 @@
52-
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
53-
ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
54-
ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf
48+
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
49+
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
50+
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
51+
@@ -79,6 +82,7 @@
52+
# Build all the libraries when building this package.
53+
# This helps developers test changes and how they affect the package.
54+
#
5555
+ ShellPkg/Application/sysarch-acs/apps/uefi/Mem.inf
56-
57-
ShellPkg/Application/Shell/Shell.inf {
58-
<PcdsFixedAtBuild>
56+
ShellPkg/Library/UefiShellLib/UefiShellLib.inf
57+
ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.inf
58+
ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf

tools/scripts/acsbuild.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,10 @@ fi
157157

158158
if [ "$1" == "mem_test" ]; then
159159
git checkout ShellPkg/ShellPkg.dsc
160+
git checkout BaseTools/Scripts/GccBase.lds
161+
git checkout ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
160162
git apply ShellPkg/Application/sysarch-acs/mem_test/patches/mem_test_edk2.patch
161-
cd ShellPkg/Application/sysarch-acs
162-
git apply mem_test/patches/cxl_revert.patch
163-
cd ../../../
164163
build -a AARCH64 -t GCCNOLTO -n 1 -p ShellPkg/ShellPkg.dsc -m ShellPkg/Application/sysarch-acs/apps/uefi/Mem.inf
165-
cd ShellPkg/Application/sysarch-acs
166-
git checkout pal/ val/
167-
cd ../../../
168164
return 0;
169165
fi
170166

0 commit comments

Comments
 (0)