summaryrefslogtreecommitdiff
path: root/ArmPkg/Universal
AgeCommit message (Collapse)AuthorFilesLines
2023-08-30ArmPkg/SmbiosMiscDxe: use UINT64 for BiosPhysicalSizeLeif Lindholm1-1/+1
The top two bits of the Extended BIOS ROM Size field indicates the unit used for the remaining 14 bits. If the size is greater than 16GB, the unit is gigabytes. The test for this uses the local BiosPhysicalSize variable, which is a UINTN, meaning that when building for ARM/CLANGDWARF we have a tautological constant comparison, which the toolchain flags now we've stopped disabling that warning. So switch the BiosPhysicalSize variable to UINT64. Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2023-04-10ArmPkg: Update code to be more C11 compliant by using __func__Rebecca Cran7-7/+7
__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>
2023-03-28ArmPkg/SmbiosMiscDxe: Adjust the priority of getting firmware versionTinh Nguyen1-24/+38
The BIOS Firmware Version in the SMBIOS Type 0 can be fetched from the fixed PcdFirmwareVersionString or platform specific OemMiscLib. In fact, the support from OemMiscLib comes into play when the firmware version may be modified at boot time for extended information. Therefore, the priority of getting the version from OemMiscLib should be higher. In case there is no modification in the OemMiscLib, we have to keep HII string STR_MISC_BIOS_VERSION empty or 'Not Specified' to indicate that the firmware version should be fetched from the PcdFirmwareVersionString. Signed-off-by: Tinh Nguyen <tinhnguyen@os.amperecomputing.com> Reviewed-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
2022-09-23ArmPkg/SmbiosMiscDxe: Get SMBIOS information from OemMiscLibMinh Nguyen3-11/+45
In some scenarios, the information of Bios Version, Bios Release and Embedded Controller Firmware Release are fetched during UEFI booting. This patch supports updating those fields dynamically when the PCDs are empty. 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>
2022-09-23ArmPkg/SmbiosMiscDxe: Remove redundant updates in SMBIOS Type 2Minh Nguyen1-10/+0
This patch removes redundant updates of "BoardManufacturerType02" and "SerialNumberType02". 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>
2022-09-23ArmPkg/SmbiosMiscDxe: Fix typo of "AssetTagType02"Minh Nguyen1-1/+2
This patch fixes typo from "AssertTagType02" to "AssetTagType02". 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>
2022-09-23ArmPkg/SmbiosMiscDxe: Support fetching System UUIDNhi Pham3-1/+24
This adds an API to OemMiscLib for fetching the system UUID according to the platform. 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>
2022-09-23ArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID callMinh Nguyen1-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>
2022-09-23ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLibMinh Nguyen1-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>
2021-12-16ArmPkg/ProcessorSubClassDxe: Get serial and part number from OemMiscLibNhi Pham1-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>
2021-12-16ArmPkg/SmbiosMiscDxe: Get full SMBIOS strings from OemMiscLibNhi Pham2-0/+30
Typically, the information of the SMBIOS type 1/2/3 is fetched from an FRU device during UEFI booting intead of fixed PCDs. Therefore, this patch is to add more HII string fields in the OemMiscLib and support updating these SMBIOS types with the strings provided by the OemMiscLib if the PCDs are empty. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-12-16ArmPkg/SmbiosMiscDxe: Remove duplicate HII string definitionNhi Pham via groups.io1-1/+0
This patch removes duplicate HII string definition in the MiscSystemManufacturer.uni. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-12-14ArmPkg: Update SMC calls to use the new ArmCallSmc0/1/2/3 functionsRebecca Cran1-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>
2021-12-07ArmPkg: Apply uncrustify changesMichael Kubacki21-716/+829
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>
2021-11-08ArmPkg: Reproduce builds across source format changesMichael D Kinney7-7/+7
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>
2021-10-15ArmPkg/Smbios: Fix max cache size 2 wrong issueMing Huang1-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>
2021-10-05ArmPkg: SmbiosMiscDxe: Don't populate ExtendedBiosSize when size < 16MBRebecca Cran1-3/+4
According to the SMBIOS specification, the ExtendedBiosSize field should be zero when the BIOS size is less than 16MB: "Size (n) where 64K * (n+1) is the size of the physical device containing the BIOS, in bytes. FFh - size is 16MB or greater, see Extended BIOS ROM Size for actual size." Fix the code in MiscBiosVendorFunction.c to only populate the ExtendedBiosSize field if the BIOS size is greater than 16MB. Fix the code to correctly populate the ExtendedBiosSize field with the unit bits set to MB if the size is between 16MB and 16GB. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Acked-by: Nhi Pham <nhi@os.amperecomputing.com>
2021-09-16ArmPkg/ProcessorSubClassDxe: Fix the format of ProcessorIdNhi Pham1-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>
2021-06-18ArmPkg: Move cache defs used in Universal/Smbios into ArmCache.hRebecca Cran4-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>
2021-04-28ArmPkg: Correct small typosPierre Gondois1-3/+3
The 'cspell' CI test detected some small typos in ArmPkg. Correct them. Cc: Bret Barkelew <bret.barkelew@microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-04-27ArmPkg: Fix typo of Manufacturer in comment in SmbiosMiscDxeRebecca Cran1-1/+1
'Manufacturer' was spelled wrongly in a comment in MiscChassisManufacturerData.c. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-04-27ArmPkg: Fix calculation of offset of chassis SKU Number in SmbiosMiscDxeRebecca Cran1-5/+7
The calculation of the chassis SKU number field was being calculated incorrectly, forgetting that there's one element already present in the structure. Fix the calculation and improve code readability by introducing a SkuNumberField variable. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-04-27ArmPkg: Allow platforms to report their boot status via OemMiscLib callRebecca Cran2-0/+17
Add a new function to OemMiscLib to allow platforms to report their boot status into the Type32 SMBIOS table. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-04-27ArmPkg: Allow platforms to supply more data for SMBIOS Type3 recordRebecca Cran2-0/+92
Add OemMiscLib calls to allow platforms to provide the following information about the chassis: o Bootup state o Power supply/supplies state o Thermal state o Security state o Chassis height (in RMU) o Number of power cords Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-02-23ArmPkg: Update OemGetChassisType function to return MISC_CHASSIS_TYPERebecca Cran2-34/+5
Update OemGetChassisType in OemMiscLib to return MISC_CHASSIS_TYPE instead of EFI_STATUS, which matches other OemMiscLib functions. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-02-23ArmPkg: Rename some functions and parameters in OemMiscLibRebecca Cran2-29/+28
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>
2021-02-23ArmPkg: Fix ordering of return type and EFIAPI specifier in OemMiscLibRebecca Cran1-6/+6
The return type should be on the line before any EFIAPI specifier. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-02-10ArmPkg: Fix ARM ProcessorSubClassDxe buildRebecca Cran1-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>
2021-02-09ArmPkg: add DebugLib to OemMiscLibNullLeif Lindholm2-1/+2
The just added OemMiscLibNull fails to build due to DebugLib.h not being included, missing the ASSERT definition. Add the include and the library dependency. Cc: Rebecca Cran <rebecca@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Signed-off-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Rebecca Cran <rebecca@nuviainc.com> Acked-by: Ard Biesheuvel <ardb@kernel.org>
2021-02-08ArmPkg: Add Universal/Smbios/SmbiosMiscDxeRebecca Cran5-0/+530
SmbiosMiscDxe provides SMBIOS tables 0, 1, 2, 3, 13, and 32. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
2021-02-08ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type32Rebecca Cran2-0/+105
This code provides information for the SMBIOS Type 32 table. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
2021-02-08ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type13Rebecca Cran3-0/+242
This code provides information for the SMBIOS Type 13 table. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-02-08ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type03Rebecca Cran3-0/+294
This code provides information for the SMBIOS Type 3 table. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
2021-02-08ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type02Rebecca Cran3-0/+296
This code provides information for the SMBIOS Type 2 table. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
2021-02-08ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type01Rebecca Cran3-0/+252
This code provides information for the SMBIOS Type 1 table. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
2021-02-08ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type00Rebecca Cran3-0/+407
This code provides information for the SMBIOS Type 0 table. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-02-08ArmPkg: Add Universal/Smbios/ProcessorSubClassDxeRebecca Cran7-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>
2021-02-08ArmPkg: Add Universal/Smbios/OemMiscLibNullRebecca Cran2-0/+175
Add a Null implementation of OemMiscLib. OemMiscLib provides functions that platforms implement to fill in SMBIOS information for the SmbiosMiscDxe and ProcessSubClassDxe drivers. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Acked-by: Leif Lindholm <leif@nuviainc.com>
2011-06-03EmbeddedPkg: Move Universal/MmcDxe from ArmPkg to EmbeddedPkgoliviermartin6-1714/+0
The MmcDxe is not ARM architecture specific. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11725 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-31ArmPkg/MmcDxe: Fix some returned conditions for MMC/SD commandsoliviermartin2-59/+117
Additional support for some states covered by the specifications. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11465 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-31EmbeddedPkg/MmcDxe: Fix protocols uninstallation in Stop() functionoliviermartin1-2/+2
The EFI handle argument passed to disconnect the protocol was not correct. A pointer to this handle was passed as argument instead to be only the handle itself. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11464 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-03Fixes to get CodeSourcery GCC and RVCT 3.1 compiling.andrewfish1-8/+8
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11298 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-02Fix issue with fixing tabs.andrewfish1-6/+6
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11297 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-02Remove tabs from all text files in the package.andrewfish1-6/+6
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11295 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-02Sync up ArmPkg with patch from mailing list. Changed name of BdsLib.h to ↵andrewfish6-0/+1656
BdsUnixLib.h and fixed a lot of issues with Xcode building. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11293 6f19259b-4bc3-4df7-8a09-765794883524