Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
223 commits
Select commit Hold shift + click to select a range
1b4ee1e
UefiCpuPkg: Added segment descriptors' data structures.
Nov 20, 2023
3f01166
Ring3: Some drafts.
Dec 25, 2023
589ea31
Ring3: Added EFI_MEMORY_USER attribute.
Dec 25, 2023
d598f6c
Ring3: Enabled SMAP and SMEP.
Jan 9, 2024
012962a
Ring3: Set USER bit in all page table structures.
Jan 9, 2024
517c834
Ring3: Added IsUserImage field into LOADED_IMAGE_PRIVATE_DATA structure.
Jan 15, 2024
381e339
Ring3: Added GetMemoryAttributes() into EFI_CPU_ARCH_PROTOCOL.
Jan 15, 2024
623aa7c
Ring3: Added EnterUserImage().
Jan 16, 2024
81e47cc
MdePkg: Added Ring3UefiBootServicesTableLib draft.
Jan 16, 2024
fea8855
Ring3: Fixed LibraryConstructors' initialization and
Jan 18, 2024
fc33fa2
Ring3: Added SYSCALL draft.
Jan 22, 2024
3519988
Ring3: Added CoreSysCallStack.
Jan 23, 2024
1fcc570
Ring3: Fixed bug in calling Boot Service and did some refactoring.
Jan 26, 2024
a0ad59e
Ring3: Added helper function AllocateRing3Pages() and
Jan 26, 2024
303a93a
Ring3: Added helper function AllocateCoreCopy(), refactored SysCall.
Jan 29, 2024
c6ba293
Ring3: Added SysCallOpenProtocol.
Jan 29, 2024
6342389
Ring3: Moved some .nasm code to .c.
Feb 1, 2024
7f80c73
Ring3: Moved SysCall code to DxeCore.
Feb 2, 2024
b8af283
Ring3: Refactored out AllocateCoreCopy() BootService.
Feb 2, 2024
666d806
Ring3: Refactored out AllocateRing3Pages() BootService.
Feb 2, 2024
9a69d39
Ring3: Refactored out FunctionAddress from API.
Feb 5, 2024
269f754
Ring3: Refactored stack operations.
Feb 5, 2024
59af4e0
Ring3: Added SysCallInstallMultipleProtocolInterfaces draft.
Feb 5, 2024
8018bfb
Ring3: Added Ring3EntryPoint draft.
Feb 6, 2024
8e4e21d
Ring3: Fixed SysCallInstallMultipleProtocolInterfaces.
Feb 8, 2024
b1af78b
Ring3: Refactored EnterUserImage() into CallRing3().
Feb 9, 2024
ea59514
Ring3: Added SysCallReturnToCore.
Feb 9, 2024
597f466
Ring3: Moved Ring3UefiBootServicesTableLib to Ring3Dxe.
Feb 13, 2024
a053475
Ring3: Refactored Ring3 initialization.
Feb 13, 2024
780e187
Ring3: Merged Ring3Dxe and Ring3UefiBootServicesTableLib into DxeRing3.
Feb 15, 2024
9bec83d
Ring3: Added SysCallAllocatePool.
Feb 15, 2024
3094b1c
Ring3: Refactored CallRing3().
Feb 15, 2024
89ef771
Ring3: Refactored AllocateRing3CopyPages() and mUserDriverBinding.
Feb 16, 2024
c3736c6
Ring3: Added SysCallFreePool,
Feb 16, 2024
982e175
Ring3: Refactored comparing of GUIDs.
Feb 16, 2024
9b963c6
Ring3: Added Ring3BlockIo and Ring3DiskIo drafts.
Feb 19, 2024
887d84f
Ring3: Some refactoring.
Feb 19, 2024
5b5b4d7
Ring3: Added BlockIo, DiskIo wrappers.
Feb 20, 2024
f7d849e
Ring3: Small fix.
Feb 22, 2024
d3eca9d
Ring3: Added SysCallCloseProtocol.
Feb 22, 2024
d015d68
Ring3: Added SysCallHandleProtocol and
Feb 23, 2024
ffaebdb
Ring3: Added EFI_FILE_PROTOCOL wrappers.
Feb 23, 2024
caeea88
Ring3: Fixed missing Ring3Call result.
Feb 26, 2024
e129d19
Ring3: Added sanity checks.
Feb 26, 2024
24ee35c
MdeModulePkg: Placed Core Pool functions into MemoryPoolLib.
Feb 27, 2024
94d4fe0
MdeModulePkg: Moved CoreAllocatePoolPagesI() and CoreFreePoolPagesI()…
Feb 27, 2024
d37c3cb
MdeModulePkg: Moved IsHeapGuardEnabled() and IsMemoryTypeToGuard() to…
Feb 27, 2024
5d061d7
MdeModulePkg: Moved IsPoolTypeToGuard(), CoreAcquireLockOrFail(),
Feb 27, 2024
5aeb15a
MdeModulePkg: Moved CoreFreePoolPagesWithGuard() to Page.c and
Feb 27, 2024
04c92e3
Ring3: Added MemoryPoolLib into DxeRing3.
Feb 27, 2024
deded68
MdeModulePkg: Refactored out CoreAcquireLockOrFail(), CoreAcquireLock()
Feb 29, 2024
8a88be6
DxeRing3: Added FixInterface().
Feb 29, 2024
87c3c58
SysCall: Fixed bug in BlockIo, DiskIo Write functions.
Feb 29, 2024
b05242a
Ring3: Added PrepareRing3Interface().
Feb 29, 2024
c67e58d
Ring3: Refactored out AllocateRing3Copy().
Feb 29, 2024
8b4e26a
SysCall: Refactored EFI_FILE_PROTOCOL wrappers.
Mar 1, 2024
0cdb4c6
Ring3: Fixed interrrupts handling.
Mar 5, 2024
13bb397
SysCall: Added checks of user variables.
Mar 5, 2024
2660173
Ring3: Forbade Ring3 accsess to all ports but for UART
Mar 5, 2024
969c469
SysCall: Refactored data segment selectors' switching.
Mar 8, 2024
8f5981c
Ring3: Refactored exception handling.
Mar 8, 2024
5323589
Ring3: Added debug printings and some fixes for FAT wrappers.
Mar 8, 2024
197b861
Ring3: Added Runtime Services wrappers.
Mar 8, 2024
7be740a
Ring3: Added UnicodeCollationProtocol wrappers.
Mar 9, 2024
8a5b1b0
Ring3: Added SysCallGetVariable wrapper.
Mar 11, 2024
1cd671b
Ring3: Fixed Ring3LocateHandleBuffer().
Mar 11, 2024
9f95dda
SysCall: Refactored protocols handling.
Mar 12, 2024
c2df986
SysCall: Fixed UnicodeCollation wrappers.
Mar 12, 2024
44d092b
Ring3: Added SysCallCalculateCrc32 wrapper.
Mar 12, 2024
178f334
SysCall: Fixed UnicodeFatToStr wrapper.
Mar 12, 2024
ee9ee1a
Ring3: Moved InitializeRing3() to SysCall directory.
Mar 12, 2024
3b854ff
Ring3: Added FreeProtocolsList().
Mar 12, 2024
10f4ef7
Ring3: Properly freed Ring3 resources.
Mar 12, 2024
608cd5c
OvmfPkg: Added DxeRing3 driver, placed Fat driver into Ring3.
Mar 12, 2024
94324bc
MdeModulePkg: Fixed MdeModulePkg compilation.
Mar 12, 2024
3e1c2de
SysCall: Fixed MdeModulePkg compilation for VS2019.
Mar 13, 2024
695d152
SysCall: Fixed MdeModulePkg compilation for XCODE5.
Mar 13, 2024
812f715
Ring3: Moved platform dependant initialization to separate files.
Mar 15, 2024
5cffa7a
SysCall: Added IA32 support.
Mar 18, 2024
354070f
SysCall: Fixed memory corruption in IA32.
Mar 18, 2024
16959db
Build: Fixed compilation of X86 Firmwares.
Mar 18, 2024
b9ed8f5
Ring3: Fixed TSS initialization.
Mar 21, 2024
2fb6809
SysCall: Replaced AllocatePool() with CoreAllocatePages().
Mar 22, 2024
c998da3
SysCall: Fixed bug in IA32 CallInstallMultipleProtocolInterfaces().
Mar 22, 2024
2c9f8e2
Ring3: Moved UINT64 arguments to the end of argument list to fix IA32…
Mar 25, 2024
343e100
Ring3: Fixed bug in Ring3LocateHandleBuffer(),
Mar 25, 2024
bb72d02
Ring3: Fixed bug in IA32 SetPosition() and Open().
Mar 25, 2024
e3c3aff
Ring3: Fixed interrupts handling for IA32.
Mar 25, 2024
f558fd0
SysCall: Some refactoring.
Mar 26, 2024
68e0504
Ring3: Added dummy functions for ARM, AARCH64.
May 13, 2024
75d1a87
Ring3: Added EL0 and PAN support for AARCH64.
May 16, 2024
16a9946
Ring3: Initialized DxeRing3 with Supervisor privileges.
May 17, 2024
0501e0e
Ring3: Defined CpuGetMemoryAttributes(), DisableSMAP(), EnableSMAP() …
May 20, 2024
5422bf4
Ring3: Defined CallRing3() for AARCH64.
May 20, 2024
212344d
Ring3: Defined SysCallBootService() for AARCH64.
May 21, 2024
8e260ba
Ring3: Fixed some page faults caused by wrong memory attribution.
May 23, 2024
a8b91d1
Ring3: Defined SysCallReturnToCore for AARCH64,
May 23, 2024
c69bfe6
Ring3: Refactored SysCallBootService() out of EFI_BOOT_SERVICES.
May 23, 2024
2c41ed6
Ring3: Defined CallInstallMultipleProtocolInterfaces() for AARCH64.
May 24, 2024
869e81b
SysCall: Fixed uninitialized variable.
May 27, 2024
47de6b3
SysCall: Made CoreSp STATIC, fixed UserRsp for AARCH64.
May 27, 2024
ad5661c
SysCall: Added sanity checks.
May 29, 2024
fa470cd
Ring3: Removed -mcpu=cortex-a76 option from tools_def.template.
May 29, 2024
214bb90
SysCall: Fixed random crashes of QEMU.
May 29, 2024
55c1e40
SysCall/AARCH64: Enabled interrupts.
May 29, 2024
12ce05f
SysCall/AARCH64: Increased probability of QEMU's normal work.
May 29, 2024
0bf4f0c
Ring3: Summarized all known problems for AARCH64.
Jun 4, 2024
432b45f
Ring3: Added PAN support for ARM.
Jul 4, 2024
feb9024
Ring3: Added EL0 support for ARM.
Jul 4, 2024
39aac55
Ring3: Defined CallRing3() for ARM.
Jul 5, 2024
930e0f1
Ring3: Defined SysCallBootService() for ARM.
Jul 9, 2024
21b70cd
Ring3: Defined CallInstallMultipleProtocolInterfaces() for ARM.
Jul 9, 2024
9be149a
SysCall: Fixed typos.
Jul 9, 2024
d28f9b4
Ring3: Defined ReturnToCore() for ARM.
Jul 9, 2024
571f5dd
Ring3: Fixed several bugs for ARM.
Jul 9, 2024
d3abd58
Ring3: Fixed arguments alignment bug for ARM.
Jul 10, 2024
e354e27
SysCall/ARM: Added TODO comments.
Jul 11, 2024
4595caa
SysCall: Restored nonvolatile registers for IA32, X64.
Sep 2, 2024
0063426
MdeModulePkg: Added PcdEnableUserSpace.
Sep 2, 2024
ca1b2d8
SysCall: Made SMEP, SMAP, PAN optional features.
Sep 2, 2024
dd1da4a
Core/Dxe: Changed line ending to Windows style.
Sep 2, 2024
f12cc49
Core/Dxe: Refactored DisableSMAP(), EnableSMAP() names.
Sep 2, 2024
0c0df84
Ring3: Fixed ArmPkg and ArmVirtPkg compilation.
Sep 2, 2024
7372b31
MdeModulePkg/Core/Dxe: Fixed compilation after rebasing upon new master.
Sep 3, 2024
0fbb372
Ring3: Fixed buggy timer interrupt handling for IA32.
Sep 5, 2024
5ecb276
Core/Dxe/Misc: Fixed string comparison bug.
Sep 5, 2024
b356236
Ring3: Fixed buggy timer interrupt handling for X64.
Sep 5, 2024
71e95bc
Ring3: Refactored I/O Map initialization using PcdUartBase and PcdDeb…
Sep 5, 2024
5af1302
SysCall: Split SMEP and SMAP initialization.
Sep 9, 2024
17fb38d
CpuExceptionHandlerLib: Added a separate stack for timer.
Sep 9, 2024
e769416
SysCall/X64: Fixed CallBootService() for NOOPT.
Sep 9, 2024
3dd8464
SysCall: Refactored SysCallReturnToCore handling to fix CLANGDWARF NO…
Sep 9, 2024
b841085
Dxe/Misc: Fixed CLANGPDB RELEASE.
Sep 9, 2024
e0b4bef
SysCall/X64: Fixed CallBootService() for VS2019.
Sep 9, 2024
a3903f1
ArmMmuLib: Worked around lack of EL2&0 translation support.
Sep 13, 2024
8f95af0
Core/Dxe/DxeMain: Set default value for gRing3Data.
Sep 16, 2024
bd865b6
ArmPkg: Forbade user access to supervisor sections.
Sep 16, 2024
560c03a
CpuExceptionHandlerLib: Refactored IO Bit Map initialization.
Sep 17, 2024
b2fb767
ArmVirtPkg: Switched DebugLibg from UartRam to UartFlash
Sep 23, 2024
c6c3b81
Ring3: Added DebugLibFdtPL011UartUser without HOB dependancy.
Sep 23, 2024
45bfee1
CpuExceptionHandlerLib: Added PcdSerialUseMmio condition.
Sep 23, 2024
c4d39fc
SysCall: Fixed page fault for ARM.
Sep 25, 2024
f6e607b
Ring3: Fixed Uart bug.
Sep 26, 2024
2fa963d
ArmPkg: Fixed buggy TT_DESCRIPTOR_SECTION_TYPE_MASK.
Sep 26, 2024
d3905a0
ArmPkg/Library/CpuArchLib: Refactored ARM to UEFI attribute conversion.
Sep 27, 2024
10cdcb7
Ring3: Fixed buggy timer interrupt handling for AARCH64.
Sep 27, 2024
14b8f82
ArmLib: Added Instruction Synchronization Barriers for PAN changes.
Oct 1, 2024
15d79c4
Ring3: Fixed PAN page faults.
Oct 1, 2024
620b3bb
SysCall: Refactored ReturnToCore() for AARCH64, ARM.
Oct 18, 2024
024ed67
Ring3: Added support for AARCH64 EL2&0 translation regime.
Oct 21, 2024
818b4c6
ArmPkg: Disabled UserSpace by default to fix CI,
Oct 22, 2024
bd27393
Ring3: Added support for USER attribute in .fdf files.
Oct 25, 2024
c587407
Ring3: Added build targets with '-D USER_SPACE' for ARM, AARCH64.
Oct 29, 2024
2c2299d
Ring3: Refactoring.
Nov 1, 2024
1c84b27
Ring3: Added support for separate User address space.
Nov 26, 2024
1893344
Ring3: Split Page Table template construction and initialization,
Nov 27, 2024
1d061f3
Ring3: Added necessary Core pages to User page table.
Nov 27, 2024
6291fd8
Core/Dxe: Fixed memory type in Ring3AllocatePages(), and code alignment.
Nov 29, 2024
355b1b5
SysCall: Disabled global pages, set User page table attibutes in
Nov 29, 2024
ca6eb09
Ring3: Added SetExceptionAddresses(), aligned exceptions' stacks.
Nov 29, 2024
0316d4d
Ring3: Added Idt to User page table.
Nov 29, 2024
b52ebae
Ring3: Set 1G User pages as not present by default, fixed padding.
Nov 29, 2024
cc4cbb6
Ring3: Added support for User page table to AllocatePages(), FreePage…
Dec 2, 2024
90a7895
SysCall: Turned on interrupts in User.
Dec 2, 2024
c025da1
Ring3: Removed gEfiHobPageTableInfoGuid.
Dec 2, 2024
89ec64d
SysCall: Refactored InitializeMsr.c file name.
Dec 2, 2024
ecb4151
Ring3: Added support for IA32 User page table.
Dec 3, 2024
e343944
OvmfPkg: Increased PEI size at the expense of DXE,
Dec 3, 2024
b9286af
SysCall: Removed superfluous User attributes settings.
Dec 5, 2024
072c709
CpuArchLib: Specified IdtTable size precisely.
Dec 5, 2024
3c236a3
SysCall: Simplified MakeUserPageTableTemplate().
Dec 5, 2024
716889c
CpuArchLib: Fixed CpuGetMemoryAttributes().
Dec 5, 2024
3d4ef5a
SysCall: Refactored MakeUserPageTableTemplate().
Dec 9, 2024
f2abde7
Ring3: Added MakeUserPageTableTemplate() for AARCH64.
Dec 9, 2024
2e0c932
ArmPkg: Added CpuSetUserMemoryAttributes() for AARCH64.
Dec 9, 2024
058b973
Ring3: Added support for AARCH64 User page table.
Dec 16, 2024
a5a77d6
ArmPkg: Refactored SVC handling.
Dec 17, 2024
247851d
SysCall/AARCH64: Enabled interrupts in SysCall handlers.
Dec 17, 2024
9b471a3
Ring3: Added MakeUserPageTableTemplate() for ARM.
Dec 19, 2024
c10e841
ArmPkg: Added CpuSetUserMemoryAttributes() for ARM.
Dec 19, 2024
0bfc655
Ring3: Added support for ARM User page table.
Dec 19, 2024
84dd89f
ArmPkg: Fixed compilation.
Dec 23, 2024
1d8efe6
SysCall: Fixed line endings.
Jan 9, 2025
d5fbfef
SysCall: Refactored Core wrappers to allow support for multiple User …
Jan 9, 2025
780d486
CpuExceptionHandlerLibNull: Added dummy functions to fix MdeModulePkg
Jan 9, 2025
9c6d3c8
SysCall: Added support for UnicodeCollationProtocol in User space.
Jan 9, 2025
073c9aa
Ring3: Refactored User and SysCall stacks allocation.
Jan 10, 2025
cc0e1a1
Ring3: Fixed line endings.
Jan 10, 2025
9961f69
Ring3: Refactored out gCoreSysCallStackTop and gRing3CallStackTop.
Jan 13, 2025
e4788e9
Ring3: Fixed line endings.
Jan 13, 2025
2acb409
SysCall: Refactored out CORE_STACK and RING3_STACK.
Jan 13, 2025
7f695f6
SysCall: Refactored out mRing3CallStackTop and mCoreSysCallStackTop.
Jan 14, 2025
3fd5095
Ring3: Refactored out CoreRsp and UserStackTop.
Jan 16, 2025
693d3f7
Ring3: Placed UnicodeCollation driver into User space.
Jan 20, 2025
0a58c43
CpuExceptionHandlerLib: Refactored out mSwitchCr3Flag.
Jan 20, 2025
00f99dd
Ring3: Fixed line endings.
Jan 20, 2025
2a36606
Ring3: Saved ReturnSP on SysCallStack.
Jan 20, 2025
2504a9f
Ring3: Added NumberOfArguments to SysCall() and CallBootService().
Jan 21, 2025
757a7cd
Ring3: Refactored out SysCallStackTop.
Jan 21, 2025
dd9ee30
SysCall: Added FreeUserSpaceDriver().
Jan 23, 2025
3ce2c6b
SysCall: Fixed paddings, renamed CoreOpenVolume as
Jan 23, 2025
26ee5e3
Ring3: Refactored out MAX_LIST.
Jan 23, 2025
44676f2
SysCall: Added NumberOfCalls to USER_SPACE_DRIVER.
Jan 24, 2025
b6bb0e4
SysCall: Refactored UserStackTop to allocate it anew for each CallRing3.
Jan 24, 2025
9e13ff1
CpuExceptionHandlerLib: Saved UserPageTable on stack,
Jan 24, 2025
bc9b293
Ring3: Fixed memory leaks and passed UserArguments to CallBootService
Jan 27, 2025
9c4d58a
Core/Dxe: Added sanity checks.
Jan 27, 2025
b6856cc
Core/Dxe: Placed platform dependent code into separate files.
Jan 27, 2025
473b713
Core/Dxe: Added sanity checks.
Jan 27, 2025
9510702
Ring3: Added Ring3AllocatePool() and Ring3FreePool().
Jan 28, 2025
fbe1a16
Ring3: Fixed line endings.
Jan 28, 2025
7bc7b80
DefaultExceptionHandlerLib/AArch64: Added selection of the correct stack
Jan 30, 2025
6f01e23
Ring3: Fixed bug in Uart initialization.
Jan 30, 2025
5c1604c
Ring3: Properly refactored MemoryPoolLib to support User spaces.
Jan 30, 2025
629fca5
Ring3: Prevented loading of DxeRing3 driver, when UserSpace is disabled.
Jan 30, 2025
0317b63
Ring3: Added comments and sanity checks.
Feb 3, 2025
e8a833e
Ring3: Renamed Ring3 as UserSpace.
Feb 3, 2025
311f57c
Ring3: Renamed Ring3 files as UserSpace.
Feb 3, 2025
448b169
MdeModulePkg: Added PcdMaxMemoryType.
Apr 14, 2025
96c2d82
UserSpace: Fixed compilation after rebasing upon edk2-stable202502 tag.
Apr 14, 2025
845c828
BaseTools/Conf/tools_def: Refactored VS2022 DLINK_FLAGS.
Apr 15, 2025
bb8a986
UserSpace: Fixed bug so as not to call new CPU_ARCH_PROTOCOL functions,
Oct 6, 2025
d38723a
UserSpace: Fixed 2 bugs.
Oct 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/build_arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,38 @@ jobs:
cp ./Build/ArmVirtQemu-"$arch"/"$target"_"$TOOLCHAIN"/FV/QEMU_EFI.fd ./firmware_artifacts/ArmVirtQemu/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
done
done
rm -r ./Build/*
env:
ARCHS: ARM,AARCH64
TARGETS: RELEASE,DEBUG,NOOPT
TOOLCHAIN: GCC

- name: Build ArmVirtQemu for Linux
if: always()
run: ./efibuild.sh
env:
SELFPKG: ArmVirtQemu
SELFPKG_DIR: ArmVirtPkg
TOOLCHAINS: GCC
ARCHS: ARM,AARCH64
TARGETS: RELEASE,DEBUG,NOOPT
SKIP_TESTS: 1
SKIP_PACKAGE: 1
GCC_ARM_PREFIX: arm-linux-gnueabi-
GCC_AARCH64_PREFIX: aarch64-linux-gnu-
BUILD_ARGUMENTS: -D USER_SPACE

- name: Prepare artifacts with firmwares for Linux
if: always()
run: |
IFS=', ' read -r -a TARGETS <<< "$TARGETS"
IFS=', ' read -r -a ARCHS <<< "$ARCHS"
for target in "${TARGETS[@]}"; do
for arch in "${ARCHS[@]}"; do
mkdir -p ./firmware_artifacts/ArmVirtQemu/Linux/"$arch"/"$target"_"$TOOLCHAIN"
cp ./Build/ArmVirtQemu-"$arch"/"$target"_"$TOOLCHAIN"/FV/QEMU_EFI.fd ./firmware_artifacts/ArmVirtQemu/Linux/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
done
done
env:
ARCHS: ARM,AARCH64
TARGETS: RELEASE,DEBUG,NOOPT
Expand Down Expand Up @@ -194,6 +226,36 @@ jobs:
cp ./Build/ArmVirtQemu-"$arch"/"$target"_"$TOOLCHAIN"/FV/QEMU_EFI.fd ./firmware_artifacts/ArmVirtQemu/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
done
done
rm -r ./Build/*
env:
ARCHS: ARM,AARCH64
TARGETS: RELEASE,DEBUG,NOOPT
TOOLCHAIN: CLANGDWARF

- name: Build ArmVirtQemu for Linux
if: always()
run: ./efibuild.sh
env:
SELFPKG: ArmVirtQemu
SELFPKG_DIR: ArmVirtPkg
TOOLCHAINS: CLANGDWARF
ARCHS: ARM,AARCH64
TARGETS: RELEASE,DEBUG,NOOPT
SKIP_TESTS: 1
SKIP_PACKAGE: 1
BUILD_ARGUMENTS: -D USER_SPACE

- name: Prepare artifacts with firmwares for Linux
if: always()
run: |
IFS=', ' read -r -a TARGETS <<< "$TARGETS"
IFS=', ' read -r -a ARCHS <<< "$ARCHS"
for target in "${TARGETS[@]}"; do
for arch in "${ARCHS[@]}"; do
mkdir -p ./firmware_artifacts/ArmVirtQemu/Linux/"$arch"/"$target"_"$TOOLCHAIN"
cp ./Build/ArmVirtQemu-"$arch"/"$target"_"$TOOLCHAIN"/FV/QEMU_EFI.fd ./firmware_artifacts/ArmVirtQemu/Linux/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
done
done
env:
ARCHS: ARM,AARCH64
TARGETS: RELEASE,DEBUG,NOOPT
Expand Down Expand Up @@ -272,6 +334,8 @@ jobs:
for arch in "${ARCHS[@]}"; do
echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --fw-arch "$arch"
echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN" for Linux
python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/Linux/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --fw-arch "$arch"
done
done
env:
Expand All @@ -289,6 +353,8 @@ jobs:
for arch in "${ARCHS[@]}"; do
echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --test-linux --fw-arch "$arch"
echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN" for Linux
python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/Linux/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --test-linux --fw-arch "$arch"
done
done
env:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/build_nolto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,38 @@ jobs:
cp ./Build/ArmVirtQemu-"$arch"/"$target"_"$TOOLCHAIN"/FV/QEMU_EFI.fd ./firmware_artifacts/ArmVirtQemu/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
done
done
rm -r ./Build/*
env:
ARCHS: ARM,AARCH64
TARGETS: RELEASE,DEBUG
TOOLCHAIN: GCC

- name: Build ArmVirtQemu for Linux
if: always()
run: ./efibuild.sh
env:
SELFPKG: ArmVirtQemu
SELFPKG_DIR: ArmVirtPkg
TOOLCHAINS: GCC
ARCHS: ARM,AARCH64
TARGETS: RELEASE,DEBUG
SKIP_TESTS: 1
SKIP_PACKAGE: 1
GCC_ARM_PREFIX: arm-linux-gnueabi-
GCC_AARCH64_PREFIX: aarch64-linux-gnu-
BUILD_ARGUMENTS: -D EDK2_GCC_NOLTO -D USER_SPACE

- name: Prepare artifacts with firmwares for Linux
if: always()
run: |
IFS=', ' read -r -a TARGETS <<< "$TARGETS"
IFS=', ' read -r -a ARCHS <<< "$ARCHS"
for target in "${TARGETS[@]}"; do
for arch in "${ARCHS[@]}"; do
mkdir -p ./firmware_artifacts/ArmVirtQemu/Linux/"$arch"/"$target"_"$TOOLCHAIN"
cp ./Build/ArmVirtQemu-"$arch"/"$target"_"$TOOLCHAIN"/FV/QEMU_EFI.fd ./firmware_artifacts/ArmVirtQemu/Linux/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd
done
done
env:
ARCHS: ARM,AARCH64
TARGETS: RELEASE,DEBUG
Expand Down Expand Up @@ -420,6 +452,8 @@ jobs:
for arch in "${ARCHS[@]}"; do
echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --fw-arch "$arch"
echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN" for Linux
python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/Linux/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --fw-arch "$arch"
done
done
env:
Expand All @@ -437,6 +471,8 @@ jobs:
for arch in "${ARCHS[@]}"; do
echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN"
python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --test-linux --fw-arch "$arch"
echo Checking "$PACKAGE""$arch" "$target"_"$TOOLCHAIN" for Linux
python3 test_qemu_fw.py ./firmware_artifacts/"$PACKAGE"/Linux/"$arch"/"$target"_"$TOOLCHAIN"/FW.fd --test-linux --fw-arch "$arch"
done
done
env:
Expand Down
2 changes: 1 addition & 1 deletion ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ ArmCrashDumpDxeInitialize (
return mCpu->RegisterInterruptHandler (
mCpu,
EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS,
&DefaultExceptionHandler
(EFI_CPU_INTERRUPT_HANDLER)&DefaultExceptionHandler
);
}
2 changes: 1 addition & 1 deletion ArmPkg/Drivers/CpuPei/CpuPei.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ SetMemoryPermissions (
return EFI_INVALID_PARAMETER;
}

return ArmSetMemoryAttributes (BaseAddress, Length, Attributes, AttributeMask);
return ArmSetMemoryAttributes (BaseAddress, Length, Attributes, AttributeMask, 0);
}

STATIC CONST EDKII_MEMORY_ATTRIBUTE_PPI mMemoryAttributePpi = {
Expand Down
12 changes: 11 additions & 1 deletion ArmPkg/Include/Library/ArmMmuLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ ArmConfigureMmu (
OUT UINTN *TranslationTableSize OPTIONAL
);

EFI_STATUS
EFIAPI
ArmMakeUserPageTableTemplate (
IN ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable,
OUT UINTN *TranslationTableBase,
OUT UINTN *TranslationTableSize
);

VOID
EFIAPI
ArmReplaceLiveTranslationEntry (
Expand Down Expand Up @@ -54,6 +62,7 @@ ArmReplaceLiveTranslationEntry (
@param[in] Length The size in bytes of the memory region.
@param[in] Attributes Mask of memory attributes to set.
@param[in] AttributeMask Mask of memory attributes to take into account.
@param[in] UserPageTable The base address of the User page table.

@retval EFI_SUCCESS The attributes were set for the memory region.
@retval EFI_INVALID_PARAMETER BaseAddress or Length is not suitably aligned.
Expand All @@ -68,7 +77,8 @@ ArmSetMemoryAttributes (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
IN UINT64 Attributes,
IN UINT64 AttributeMask
IN UINT64 AttributeMask,
IN UINTN UserPageTable OPTIONAL
);

#endif // ARM_MMU_LIB_H_
15 changes: 14 additions & 1 deletion ArmPkg/Include/Library/DefaultExceptionHandlerLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,30 @@
#ifndef DEFAULT_EXCEPTION_HANDLER_LIB_H_
#define DEFAULT_EXCEPTION_HANDLER_LIB_H_

typedef
EFI_STATUS
(EFIAPI *EFI_SYS_CALL_BOOT_SERVICE)(
IN EFI_SYSTEM_CONTEXT Context
);

/**
This is the default action to take on an unexpected exception

@param ExceptionType Type of the exception
@param SystemContext Register state at the time of the Exception

**/
VOID
EFI_STATUS
EFIAPI
DefaultExceptionHandler (
IN EFI_EXCEPTION_TYPE ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT SystemContext
);

VOID
EFIAPI
InitializeSysCallHandler (
IN EFI_SYS_CALL_BOOT_SERVICE Handler
);

#endif // DEFAULT_EXCEPTION_HANDLER_LIB_H_
Loading
Loading