mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-29 16:44:10 +02:00
ArmPkg: Update OemGetChassisType function to return MISC_CHASSIS_TYPE
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>
This commit is contained in:
parent
869ccd4a3e
commit
a2b5ea38a6
@ -128,14 +128,12 @@ OemGetMaxProcessors (
|
|||||||
|
|
||||||
/** Gets the type of chassis for the system.
|
/** Gets the type of chassis for the system.
|
||||||
|
|
||||||
@param ChassisType The type of the chassis.
|
@retval The type of the chassis.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The chassis type was fetched successfully.
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
MISC_CHASSIS_TYPE
|
||||||
EFIAPI
|
EFIAPI
|
||||||
OemGetChassisType (
|
OemGetChassisType (
|
||||||
OUT UINT8 *ChassisType
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
/** Returns whether the specified processor is present or not.
|
/** Returns whether the specified processor is present or not.
|
||||||
|
@ -95,19 +95,16 @@ OemGetMaxProcessors (
|
|||||||
|
|
||||||
/** Gets the type of chassis for the system.
|
/** Gets the type of chassis for the system.
|
||||||
|
|
||||||
@param ChassisType The type of the chassis.
|
@retval The type of the chassis.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The chassis type was fetched successfully.
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
MISC_CHASSIS_TYPE
|
||||||
EFIAPI
|
EFIAPI
|
||||||
OemGetChassisType (
|
OemGetChassisType (
|
||||||
UINT8 *ChassisType
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
*ChassisType = MiscChassisTypeUnknown;
|
return MiscChassisTypeUnknown;
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns whether the specified processor is present or not.
|
/** Returns whether the specified processor is present or not.
|
||||||
|
@ -23,27 +23,6 @@
|
|||||||
|
|
||||||
#include "SmbiosMisc.h"
|
#include "SmbiosMisc.h"
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the chassis type in SMBIOS format.
|
|
||||||
*
|
|
||||||
* @return Chassis type
|
|
||||||
**/
|
|
||||||
UINT8
|
|
||||||
GetChassisType (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
UINT8 ChassisType;
|
|
||||||
|
|
||||||
Status = OemGetChassisType (&ChassisType);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ChassisType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function makes boot time changes to the contents of the
|
This function makes boot time changes to the contents of the
|
||||||
MiscChassisManufacturer (Type 3) record.
|
MiscChassisManufacturer (Type 3) record.
|
||||||
@ -80,8 +59,6 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer)
|
|||||||
CONTAINED_ELEMENT ContainedElements;
|
CONTAINED_ELEMENT ContainedElements;
|
||||||
UINT8 ExtendLength;
|
UINT8 ExtendLength;
|
||||||
|
|
||||||
UINT8 ChassisType;
|
|
||||||
|
|
||||||
ExtendLength = 0;
|
ExtendLength = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -165,10 +142,7 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer)
|
|||||||
|
|
||||||
SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE3) + ExtendLength + 1;
|
SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE3) + ExtendLength + 1;
|
||||||
|
|
||||||
ChassisType = GetChassisType ();
|
SmbiosRecord->Type = OemGetChassisType ();
|
||||||
if (ChassisType != 0) {
|
|
||||||
SmbiosRecord->Type = ChassisType;
|
|
||||||
}
|
|
||||||
|
|
||||||
//ContainedElements
|
//ContainedElements
|
||||||
ASSERT (ContainedElementCount < 2);
|
ASSERT (ContainedElementCount < 2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user