41 if (Template ==
NULL) {
42 return EFI_INVALID_PARAMETER;
47 for (Index = 0; Template[Index].Entry !=
NULL; Index++) {
85 IN CHAR8 **StringArray
89 EFI_SMBIOS_HANDLE SmbiosHandle;
97 Size = SmbiosEntry->Length;
98 if (StringArray ==
NULL) {
100 }
else if (StringArray[0] ==
NULL) {
103 for (Index = 0; StringArray[Index] !=
NULL; Index++) {
114 if (Record ==
NULL) {
115 return EFI_OUT_OF_RESOURCES;
118 CopyMem (Record, SmbiosEntry, SmbiosEntry->Length);
120 if (StringArray !=
NULL) {
122 Str = ((CHAR8 *)Record) + Record->Length;
123 for (Index = 0; StringArray[Index] !=
NULL; Index++) {
125 CopyMem (Str, StringArray[Index], StringSize);
162 IN EFI_SMBIOS_HANDLE SmbiosHandle,
169 if (String ==
NULL) {
170 return EFI_INVALID_PARAMETER;
173 if (*String ==
'\0') {
175 return EFI_INVALID_PARAMETER;
178 StringIndex = StringNumber;
179 return gSmbios->UpdateString (
gSmbios, &SmbiosHandle, &StringIndex, String);
200 IN EFI_SMBIOS_HANDLE SmbiosHandle,
209 if (String ==
NULL) {
210 return EFI_INVALID_PARAMETER;
213 if (*String ==
'\0') {
215 return EFI_INVALID_PARAMETER;
220 return EFI_OUT_OF_RESOURCES;
225 StringIndex = StringNumber;
226 Status =
gSmbios->UpdateString (
gSmbios, &SmbiosHandle, &StringIndex, Ascii);
245 IN EFI_SMBIOS_STRING StringNumber
251 Data = (CHAR8 *)Header + Header->Length;
252 for (
Match = 1; !(*Data == 0 && *(Data+1) == 0); ) {
253 if (StringNumber ==
Match) {
258 if (*(Data - 1) ==
'\0') {
279 IN EFI_SMBIOS_TYPE Type,
281 OUT EFI_SMBIOS_HANDLE *SmbiosHandle
292 if (!EFI_ERROR (Status)) {
293 if (
Match == Instance) {
299 }
while (!EFI_ERROR (Status));
317 OUT EFI_SMBIOS_HANDLE SmbiosHandle
338 return gBS->LocateProtocol (&gEfiSmbiosProtocolGuid,
NULL, (VOID **)&
gSmbios);
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
RETURN_STATUS EFIAPI UnicodeStrToAsciiStrS(IN CONST CHAR16 *Source, OUT CHAR8 *Destination, IN UINTN DestMax)
UINTN EFIAPI AsciiStrSize(IN CONST CHAR8 *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)
UINT8 SMBIOS_TABLE_STRING
#define SMBIOS_HANDLE_PI_RESERVED
STATIC BOOLEAN Match(IN CONST CHAR16 *Translated, IN UINTN TranslatedLength, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
EFI_STATUS EFIAPI SmbiosLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
SMBIOS_STRUCTURE *EFIAPI SmbiosLibGetRecord(IN EFI_SMBIOS_TYPE Type, IN UINTN Instance, OUT EFI_SMBIOS_HANDLE *SmbiosHandle)
EFI_SMBIOS_PROTOCOL * gSmbios
EFI_STATUS EFIAPI SmbiosLibRemove(OUT EFI_SMBIOS_HANDLE SmbiosHandle)
EFI_STATUS EFIAPI SmbiosLibCreateEntry(IN SMBIOS_STRUCTURE *SmbiosEntry, IN CHAR8 **StringArray)
EFI_STATUS EFIAPI SmbiosLibInitializeFromTemplate(IN SMBIOS_TEMPLATE_ENTRY *Template)
EFI_STATUS EFIAPI SmbiosLibUpdateString(IN EFI_SMBIOS_HANDLE SmbiosHandle, IN SMBIOS_TABLE_STRING StringNumber, IN CHAR8 *String)
CHAR8 *EFIAPI SmbiosLibReadString(IN SMBIOS_STRUCTURE *Header, IN EFI_SMBIOS_STRING StringNumber)
EFI_STATUS EFIAPI SmbiosLibUpdateUnicodeString(IN EFI_SMBIOS_HANDLE SmbiosHandle, IN SMBIOS_TABLE_STRING StringNumber, IN CHAR16 *String)