From 81ba76f7df45b7bb18edae55375ea3b6abde4351 Mon Sep 17 00:00:00 2001 From: Oliver Smith-Denny Date: Tue, 7 Jan 2025 09:13:31 -0800 Subject: PrmPkg: Clarify Architecture Support Remove IA32 from supported architectures, as the MSVC build actually fails due to the linker expecting a __stdcall calling convention. IA32 PRMs are not supported anyway, only 64 bit OSes support PRM, so simply drop the building of IA32 PrmPkg and clarify the README. While there, clean up some markdown errors. Signed-off-by: Oliver Smith-Denny --- PrmPkg/PrmPkg.dsc | 8 ++++---- PrmPkg/Readme.md | 14 +++++++++----- PrmPkg/Samples/Readme.md | 7 +++++-- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/PrmPkg/PrmPkg.dsc b/PrmPkg/PrmPkg.dsc index 83d1f43580..86ad1cf90f 100644 --- a/PrmPkg/PrmPkg.dsc +++ b/PrmPkg/PrmPkg.dsc @@ -12,7 +12,7 @@ PLATFORM_VERSION = 0.1 DSC_SPECIFICATION = 0x00010005 OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME) - SUPPORTED_ARCHITECTURES = IA32|X64|AARCH64 + SUPPORTED_ARCHITECTURES = X64|AARCH64 BUILD_TARGETS = DEBUG|RELEASE|NOOPT SKUID_IDENTIFIER = DEFAULT @@ -40,7 +40,7 @@ UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf -[LibraryClasses.IA32, LibraryClasses.X64] +[LibraryClasses.X64] MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf [LibraryClasses.common.DXE_DRIVER, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.UEFI_APPLICATION] @@ -140,9 +140,9 @@ # $(PLATFORM_PACKAGE)/Application/PrmInfo/PrmInfo.inf -[Components.IA32, Components.X64] +[Components.X64] # - # PRM Sample Modules for IA32 and X64 + # PRM Sample Modules for X64 # $(PLATFORM_PACKAGE)/Samples/PrmSampleHardwareAccessModule/PrmSampleHardwareAccessModule.inf diff --git a/PrmPkg/Readme.md b/PrmPkg/Readme.md index 5933f4df29..557cb9cbef 100644 --- a/PrmPkg/Readme.md +++ b/PrmPkg/Readme.md @@ -53,11 +53,13 @@ To build `PrmPkg` as a standalone package: 5. Build PrmPkg \ -The PrmPkg can be built targetting the IA32/X64 and AArch64 architectures. +The PrmPkg can be built targeting the X64 and AArch64 architectures. PRM is not supported on IA32 and ARM primarily +because the OS support for PRM is only in 64 bit OSes. In addition, the MSVC toolchain does not support export tables +on IA32 with the unique UEFI configuration required. - - IA32/X64 +* X64 - ``build -p PrmPkg/PrmPkg.dsc -a IA32 -a X64`` + ``build -p PrmPkg/PrmPkg.dsc -a X64`` > ***Note***: Due to the way PRM modules are compiled with exports, **only building on Visual Studio compiler tool chains has been tested**. @@ -68,11 +70,13 @@ The PrmPkg can be built targetting the IA32/X64 and AArch64 architectures. > You can add your own PRM modules into the build and check them with the `PrmInfo` UEFI application described > later in this document and dump the PRMT table in the OS to check if your PRM module is represented as expected. - - AArch64 +* AArch64 ``build -p PrmPkg/PrmPkg.dsc -a AARCH64 -t GCC5`` > ***Note***: Only builds with the GCC5 toolchain have been tested. - > ***Note***: For builds with the GCC5 toolchain, the PrmModuleExportDescriptor and any other handler entry points symbols, to be listed in the PRMT, must be explicitly preserved by enumerating these in the AARCH64 linker flags. The --require-defined linker flag must be used for each symbol to be preserved. + > ***Note***: For builds with the GCC5 toolchain, the PrmModuleExportDescriptor and any other handler entry points + symbols, to be listed in the PRMT, must be explicitly preserved by enumerating these in the AARCH64 linker flags. + The --require-defined linker flag must be used for each symbol to be preserved. ### PRM Platform GUID diff --git a/PrmPkg/Samples/Readme.md b/PrmPkg/Samples/Readme.md index c09fb148a6..1ba4e839f7 100644 --- a/PrmPkg/Samples/Readme.md +++ b/PrmPkg/Samples/Readme.md @@ -23,8 +23,11 @@ location: \ Note that the build command does provide the option to build a specific module in a package which can result in faster build time. If you would like to just build a single PRM module that can be done by specifying the path to the module INF file with the "-m" argument to `build`. For example, this command builds 32-bit and 64-bit binaries -with Visual Studio 2019: \ -``build -p PrmPkg/PrmPkg.dsc -m PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf -a IA32 -a X64 -t VS2022`` +with Visual Studio 2022: \ + +```shell +build -p PrmPkg/PrmPkg.dsc -m PrmPkg/Samples/PrmSampleContextBufferModule/PrmSampleContextBufferModule.inf -a X64 -t VS2022 +``` ## PRM Sample Module User's Guide -- cgit