summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Universal/Smbios/ProcessorSubClassDxe
Commit message (Collapse)AuthorAgeFilesLines
* ArmPkg/ProcessorSubClassDxe: Limit values to 0xFFJeff Brasen11 days1-3/+3
| | | | | | | | The CoreCount, EnabledCore and ThreadCount counts should be set to 0xFF if value is greater than 255 per the SMBIOS specification. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
* ArmPkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-101-1/+1
| | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout ArmPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* ArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID callMinh Nguyen2022-09-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | According to "SMC Calling Convention" specification, section 7.4, return value of Arm Architecture Calls is stored at first argument of SMC aguments (ARM_SMC_ARGS). This value can be negative values indicating error or positive values (including zero) indicating success. Positive value would contain information of respective Function ID (Section 7.3.4 and 7.4.4). For that reason, "SMCCC_VERSION" and "SMCCC_ARCH_FEATURES" Function ID calls read return value from "SmcCallStatus" variable (Args.Arg0 - first argument of SMC call). But "SMCCC_ARCH_SOC_ID" Function ID call is reading return value from "SmcParam" variable (Args.Arg1 - second argument of SMC call) so it leads to unexpected results of "Jep106Code" and "SocRevision". This patch is to correct it. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Rebecca Cran <rebecca@quicinc.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
* ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLibMinh Nguyen2022-09-231-1/+7
| | | | | | | | | | | | | | In some scenarios, the processor version may be updated dynamically from pre-UEFI firmware during booting. But the processor version is fixed with PCD (PcdProcessorVersion), so it can not be updated it dynamically. This patch will support setting that value both statically and dynamically. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Rebecca Cran <rebecca@quicinc.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
* ArmPkg/ProcessorSubClassDxe: Get serial and part number from OemMiscLibNhi Pham2021-12-161-2/+12
| | | | | | | | | | | Currently, the serial and part number of a processor are filled with fixed PCDs. However, they may be updated dynamically according to the information being passed from a the pre-UEFI firmware during booting. So, this patch is to support updating these string fields from OemMiscLib if the PCDs are empty. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Update SMC calls to use the new ArmCallSmc0/1/2/3 functionsRebecca Cran2021-12-141-24/+16
| | | | | | | | | New SMC helper functions have been added to reduce the amount of template code. Update ArmSmcPsciResetSystemLib and Smbios/ProcessorSubClassDxe to use them. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Apply uncrustify changesMichael Kubacki2021-12-075-302/+351
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the ArmPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Andrew Fish <afish@apple.com>
* ArmPkg: Reproduce builds across source format changesMichael D Kinney2021-11-081-1/+1
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3688 Use DEBUG_LINE_NUMBER instead of __LINE__. Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com> Tested-by: Michael Kubacki <michael.kubacki@microsoft.com>
* ArmPkg/Smbios: Fix max cache size 2 wrong issueMing Huang2021-10-151-1/+1
| | | | | | | | | As SMBIOS spec, bit-31 of maximum cache size 2 should be 1 for 64K granularity. Signed-off-by: Ming Huang <huangming@linux.alibaba.com> Reviewed-by: Rebecca Cran <rebecca@nuviainc.com> Acked-by: Leif Lindholm <leif@nuviainc.com>
* ArmPkg/ProcessorSubClassDxe: Fix the format of ProcessorIdNhi Pham2021-09-161-1/+2
| | | | | | | | | | | | | | According to SMBIOS 3.4, section 7.5.3.3 ARM64-class CPUs, if SMCCC_ARCH_SOC_ID is supported, the first DWORD is the JEP-106 code and the second DWORD is the SoC revision value. But in the current implementation, they are set in reverse. This patch is to correct it. Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Rebecca Cran <rebecca@nuviainc.com> Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Rebecca Cran <rebecca@nuviainc.com> Acked-by: Leif Lindholm <leif@nuviainc.com>
* ArmPkg: Move cache defs used in Universal/Smbios into ArmCache.hRebecca Cran2021-06-184-4/+4
| | | | | | | | | | | Many of the cache definitions in ArmLibPrivate.h are being used outside of ArmLib, in Universal/Smbios. Move them into ArmCache.h to make them public, and remove the include of ArmLibPrivate.h from files in Universal/Smbios. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
* ArmPkg: Rename some functions and parameters in OemMiscLibRebecca Cran2021-02-231-20/+20
| | | | | | | | | | | o Rename 'mHiiHandle' parameter in OemUpdateSmbiosInfo to 'HiiHandle'. o Rename 'Offset' parameter in OemUpdateSmbiosInfo to 'Field'. o Rename OemGetProcessorMaxSockets to OemGetMaxProcessors. o Rename OemIsSocketPresent to OemIsProcessorPresent. o Update Universal/Smbios to follow the changes to OemMiscLib. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
* ArmPkg: Fix ARM ProcessorSubClassDxe buildRebecca Cran2021-02-101-4/+2
| | | | | | | | The ARM ProcessorSubClassDxe build was broken due to changes in the SmbiosProcessor API and an unused variable. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
* ArmPkg: Add Universal/Smbios/ProcessorSubClassDxeRebecca Cran2021-02-087-0/+1385
ProcessorSubClassDxe provides SMBIOS CPU information using generic methods combined with calls into OemMiscLib. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>