24 CONST CHAR8 *MonthStr;
61 Size = ((Value + (SIZE_64KB - 1)) >> 16);
76 CONST CHAR8 *ReleaseDate = __DATE__;
77 CONST CHAR8 *ReleaseTime = __TIME__;
80 for (i = 0; i < 12; i++) {
81 if (
AsciiStrnCmp (ReleaseDate, mMonthDescription[i].MonthStr, 3) == 0) {
86 Time->Month = mMonthDescription[i].MonthInt;
109 if (ReleaseDate ==
NULL) {
139 CHAR16 *DefaultVersionString;
141 EFI_STRING_ID TokenToUpdate;
144 mSmbiosMiscHiiHandle,
150 mSmbiosMiscHiiHandle,
156 mSmbiosMiscHiiHandle,
161 if (((
StrCmp (Version, DefaultVersionString) == 0) || (
StrLen (Version) == 0))) {
163 if (
StrLen (Version) > 0) {
182SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor) {
183 CHAR8 *OptionalStrStart;
188 UINT64 BiosPhysicalSize;
192 CHAR16 *Char16String;
194 EFI_STRING_ID TokenToUpdate;
195 EFI_STRING_ID TokenToGet;
202 if (RecordData ==
NULL) {
203 return EFI_INVALID_PARAMETER;
208 Vendor = (CHAR16 *)
PcdGetPtr (PcdFirmwareVendor);
210 if (
StrLen (Vendor) > 0) {
218 if (
StrLen (Char16String) > 0) {
219 TokenToUpdate =
STRING_TOKEN (STR_MISC_BIOS_RELEASE_DATE);
225 VendorStrLen =
StrLen (Vendor);
229 VerStrLen =
StrLen (Version);
233 DateStrLen =
StrLen (ReleaseDate);
248 if (SmbiosRecord ==
NULL) {
249 Status = EFI_OUT_OF_RESOURCES;
256 SmbiosRecord->BiosSegment = 0;
257 if (BiosPhysicalSize < SIZE_16MB) {
260 SmbiosRecord->BiosSize = 0xFF;
261 if (BiosPhysicalSize < SIZE_16GB) {
262 SmbiosRecord->ExtendedBiosSize.Size = BiosPhysicalSize / SIZE_1MB;
263 SmbiosRecord->ExtendedBiosSize.Unit = 0;
265 SmbiosRecord->ExtendedBiosSize.Size = BiosPhysicalSize / SIZE_1GB;
266 SmbiosRecord->ExtendedBiosSize.Unit = 1;
276 OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);
278 StrStart = OptionalStrStart + VendorStrLen + 1;
280 StrStart += VerStrLen + 1;
286 if (EFI_ERROR (Status)) {
289 "[%a]:[%dL] Smbios Type00 Table Log Failed! %r \n",
299 if (Vendor !=
NULL) {
303 if (Version !=
NULL) {
307 if (ReleaseDate !=
NULL) {
311 if (Char16String !=
NULL) {
INTN EFIAPI StrCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString)
INTN EFIAPI AsciiStrnCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString, IN UINTN Length)
RETURN_STATUS EFIAPI UnicodeStrToAsciiStrS(IN CONST CHAR16 *Source, OUT CHAR8 *Destination, IN UINTN DestMax)
UINTN EFIAPI AsciiStrDecimalToUintn(IN CONST CHAR8 *String)
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 HiiGetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL)
EFI_STRING EFIAPI HiiGetPackageString(IN CONST EFI_GUID *PackageListGuid, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL)
EFI_STRING_ID EFIAPI HiiSetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId OPTIONAL, IN CONST EFI_STRING String, IN CONST CHAR8 *SupportedLanguages OPTIONAL)
#define SMBIOS_STRING_MAX_LENGTH
UINTN EFIAPI UnicodeSPrintAsciiFormat(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
#define DEBUG(Expression)
CHAR16 * GetBiosReleaseDate(VOID)
VOID SetBiosVersion(VOID)
UINT8 Base2ToByteWith64KUnit(IN UINTN Value)
VOID GetReleaseTime(OUT EFI_TIME *Time)
VOID EFIAPI OemUpdateSmbiosInfo(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID TokenToUpdate, IN OEM_MISC_SMBIOS_HII_STRING_FIELD Field)
UINT16 EFIAPI OemGetEmbeddedControllerFirmwareRelease(VOID)
UINT16 EFIAPI OemGetBiosRelease(VOID)
#define FixedPcdGet32(TokenName)
#define FixedPcdGetPtr(TokenName)
#define PcdGetPtr(TokenName)
EFI_STATUS SmbiosMiscAddRecord(IN UINT8 *Buffer, IN OUT EFI_SMBIOS_HANDLE *SmbiosHandle OPTIONAL)
VOID EFIAPI Exit(IN EFI_STATUS Status)