38SMBIOS_MISC_TABLE_FUNCTION (MiscChassisManufacturer) {
39 CHAR8 *OptionalStrStart;
41 UINT8 *SkuNumberField;
45 UINTN AssertTagStrLen;
46 UINTN SerialNumStrLen;
48 EFI_STRING Manufacturer;
50 EFI_STRING SerialNumber;
52 EFI_STRING ChassisSkuNumber;
53 EFI_STRING_ID TokenToGet;
58 UINT8 ContainedElementCount;
67 if (RecordData ==
NULL) {
68 return EFI_INVALID_PARAMETER;
99 TokenToGet =
STRING_TOKEN (STR_MISC_CHASSIS_MANUFACTURER);
101 ManuStrLen =
StrLen (Manufacturer);
105 VerStrLen =
StrLen (Version);
107 TokenToGet =
STRING_TOKEN (STR_MISC_CHASSIS_SERIAL_NUMBER);
109 SerialNumStrLen =
StrLen (SerialNumber);
113 AssertTagStrLen =
StrLen (AssertTag);
115 TokenToGet =
STRING_TOKEN (STR_MISC_CHASSIS_SKU_NUMBER);
117 ChaNumStrLen =
StrLen (ChassisSkuNumber);
119 ContainedElementCount = InputData->ContainedElementCount;
129 SerialNumStrLen + 1 +
130 AssertTagStrLen + 1 +
131 ChaNumStrLen + 1 + 1;
133 if (SmbiosRecord ==
NULL) {
134 Status = EFI_OUT_OF_RESOURCES;
145 ASSERT (ContainedElementCount < 2);
146 (VOID)
CopyMem (SmbiosRecord + 1, &ContainedElements, ExtendLength);
149 SkuNumberField = (UINT8 *)SmbiosRecord +
158 StrStart = OptionalStrStart + ManuStrLen + 1;
160 StrStart += VerStrLen + 1;
162 StrStart += SerialNumStrLen + 1;
164 StrStart += AssertTagStrLen + 1;
178 if (EFI_ERROR (Status)) {
181 "[%a]:[%dL] Smbios Type03 Table Log Failed! %r \n",
191 if (Manufacturer !=
NULL) {
195 if (Version !=
NULL) {
199 if (SerialNumber !=
NULL) {
203 if (AssertTag !=
NULL) {
207 if (ChassisSkuNumber !=
NULL) {
RETURN_STATUS EFIAPI UnicodeStrToAsciiStrS(IN CONST CHAR16 *Source, OUT CHAR8 *Destination, IN UINTN DestMax)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_STRING EFIAPI HiiGetPackageString(IN CONST EFI_GUID *PackageListGuid, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL)
#define DEBUG(Expression)
MISC_CHASSIS_STATE EFIAPI OemGetChassisBootupState(VOID)
UINT8 EFIAPI OemGetChassisNumPowerCords(VOID)
VOID EFIAPI OemUpdateSmbiosInfo(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID TokenToUpdate, IN OEM_MISC_SMBIOS_HII_STRING_FIELD Field)
UINT8 EFIAPI OemGetChassisHeight(VOID)
MISC_CHASSIS_SECURITY_STATE EFIAPI OemGetChassisSecurityStatus(VOID)
MISC_CHASSIS_TYPE EFIAPI OemGetChassisType(VOID)
MISC_CHASSIS_STATE EFIAPI OemGetChassisPowerSupplyState(VOID)
MISC_CHASSIS_STATE EFIAPI OemGetChassisThermalState(VOID)
EFI_STATUS SmbiosMiscAddRecord(IN UINT8 *Buffer, IN OUT EFI_SMBIOS_HANDLE *SmbiosHandle OPTIONAL)
VOID EFIAPI Exit(IN EFI_STATUS Status)
UINT8 SecurityStatus
The enumeration value from MISC_CHASSIS_SECURITY_STATE.
UINT8 ThermalState
The enumeration value from MISC_CHASSIS_STATE.
UINT8 BootupState
The enumeration value from MISC_CHASSIS_STATE.
UINT8 PowerSupplyState
The enumeration value from MISC_CHASSIS_STATE.