edk2/ArmPkg/Include/Library/ArmSmcccSocIdLib.h
VarshitPandya 5c6e9d475f ArmPkg: Add Arm SMCCC SoC ID library
Add ArmSmcccSocIdLib to provide a shared interface for checking support
for the SMCCC Architecture SoC ID service and retrieving the JEP106
identification code and SoC revision.

Move the existing SMCCC SoC ID handling out of ProcessorSubClassDxe and
update the driver to use the new library. Continue to use the MIDR value
for the SMBIOS Processor ID when the SMCCC SoC ID service is unavailable.

This allows other SMBIOS implementations to reuse the SMCCC handling
without duplicating it or depending on the legacy ProcessorSubClassDxe
driver.

Signed-off-by: Varshit Pandya <Varshit.Pandya@arm.com>
2026-07-24 21:55:19 +00:00

39 lines
1.1 KiB
C

/** @file
Arm SMCCC SoC ID library.
Copyright (c) 2026, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#pragma once
/**
Check whether the SMCCC Architecture SoC ID interface is supported.
@retval TRUE The SMCCC Architecture SoC ID interface is supported.
@retval FALSE The SMCCC Architecture SoC ID interface is not supported.
**/
BOOLEAN
ArmSmcccSocIdIsSupported (
VOID
);
/**
Get the JEP106 identification code and SoC revision using the SMCCC
Architecture SoC ID interface.
@param[out] Jep106Code Pointer to the JEP106 identification code.
@param[out] SocRevision Pointer to the SoC revision.
@retval EFI_SUCCESS The SoC identification information was
returned successfully.
@retval EFI_INVALID_PARAMETER A required output parameter is NULL.
@retval EFI_UNSUPPORTED The SMCCC Architecture SoC ID interface is
unsupported or an SoC ID call failed.
**/
EFI_STATUS
ArmSmcccGetSocId (
OUT UINT32 *Jep106Code,
OUT UINT32 *SocRevision
);