Skip to content

Commit

Permalink
Optimize the current design for displaying BIOS MENU Information
Browse files Browse the repository at this point in the history
- Change the existing implementation from directly parsing conf.ini to retrieve information, to obtaining it from the SMBIOS tables.
- Organize the information into hierarchical categories based on SMBIOS table specifications and modify the display to support pagination.
- Update the SMBIOS extraction code to retrieve content based on the modified conf.ini.
- Add the Information INF entry to the SG2044.dsc and SG2044.fdf files.
- Remove the code related to parsing conf.ini and displaying information from UiApp.

Signed-off-by: lin peng <[email protected]>
  • Loading branch information
lin-fei authored and jingyu-li98 committed Dec 25, 2024
1 parent eafd19b commit 47295f3
Show file tree
Hide file tree
Showing 17 changed files with 1,234 additions and 296 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ SMBIOS_PLATFORM_DXE_TABLE_FUNCTION (PlatformBios) {
return Status;
}

if (IniGetValueBySectionAndName ("BIOS Information", "vendor", value) == 0) {
if (IniGetValueBySectionAndName ("BIOS Information", "bios_vendor", value) == 0) {
AsciiStrToUnicodeStrS (value, UnicodeStr, SMBIOS_UNICODE_STRING_MAX_LENGTH);
HiiSetString (mSmbiosPlatformDxeHiiHandle, InputStrToken->TokenArray[0], UnicodeStr, NULL);
}

if (IniGetValueBySectionAndName ("BIOS Information", "version", value) == 0) {
if (IniGetValueBySectionAndName ("BIOS Information", "bios_version", value) == 0) {
AsciiStrToUnicodeStrS (value, UnicodeStr, SMBIOS_UNICODE_STRING_MAX_LENGTH);
HiiSetString (mSmbiosPlatformDxeHiiHandle, InputStrToken->TokenArray[1], UnicodeStr, NULL);
}

if (IniGetValueBySectionAndName ("Date Time", "date", value) == 0) {
if (IniGetValueBySectionAndName ("BIOS Information", "date", value) == 0) {
AsciiStrToUnicodeStrS (value, UnicodeStr, SMBIOS_UNICODE_STRING_MAX_LENGTH);

if (IniGetValueBySectionAndName ("Date Time", "time", value) == 0) {
if (IniGetValueBySectionAndName ("BIOS Information", "time", value) == 0) {
AsciiStrToUnicodeStrS (value, UnicodeStrTmp, SMBIOS_UNICODE_STRING_MAX_LENGTH);
}
StrCatS(UnicodeStr, sizeof (UnicodeStr), L" ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ SMBIOS_PLATFORM_DXE_TABLE_FUNCTION (PlatformSystem) {
HiiSetString (mSmbiosPlatformDxeHiiHandle, InputStrToken->TokenArray[0], UnicodeStr, NULL);
}

if (IniGetValueBySectionAndName ("product", "name", value) == 0) {
if (IniGetValueBySectionAndName ("product", "product_name", value) == 0) {
AsciiStrToUnicodeStrS (value, UnicodeStr, SMBIOS_UNICODE_STRING_MAX_LENGTH);
HiiSetString (mSmbiosPlatformDxeHiiHandle, InputStrToken->TokenArray[1], UnicodeStr, NULL);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ SMBIOS_PLATFORM_DXE_TABLE_FUNCTION (PlatformBoard) {
return Status;
}

if (IniGetValueBySectionAndName ("board", "name", value) == 0) {
if (IniGetValueBySectionAndName ("board", "product_name", value) == 0) {
AsciiStrToUnicodeStrS (value, UnicodeStr, SMBIOS_UNICODE_STRING_MAX_LENGTH);
HiiSetString (mSmbiosPlatformDxeHiiHandle, InputStrToken->TokenArray[1], UnicodeStr, NULL);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ SMBIOS_PLATFORM_DXE_TABLE_FUNCTION (PlatformProcessor) {
return Status;
}

if (IniGetValueBySectionAndName ("CPU", "type", value) == 0) {
if (IniGetValueBySectionAndName ("CPU", "processor_version", value) == 0) {
AsciiStrToUnicodeStrS (value, UnicodeStr, SMBIOS_UNICODE_STRING_MAX_LENGTH);
HiiSetString (mSmbiosPlatformDxeHiiHandle, InputStrToken->TokenArray[2], UnicodeStr, NULL);
}
Expand Down
1 change: 1 addition & 0 deletions Platform/Sophgo/SG2044Pkg/SG2044.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,7 @@
}
Silicon/Sophgo/SG2044Pkg/Drivers/Settime/ShowTime.inf
Silicon/Sophgo/SG2044Pkg/Drivers/FirmwareManagerUiDxe/FirmwareManagerUiDxe.inf
Silicon/Sophgo/SG2044Pkg/Drivers/Information/ShowInformation.inf

#
# ACPI Support
Expand Down
2 changes: 1 addition & 1 deletion Platform/Sophgo/SG2044Pkg/SG2044.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ INF Silicon/Sophgo/SG2044Pkg/Drivers/UiApp/UiApp.inf
INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
INF Silicon/Sophgo/SG2044Pkg/Drivers/Settime/ShowTime.inf
INF Silicon/Sophgo/SG2044Pkg/Drivers/FirmwareManagerUiDxe/FirmwareManagerUiDxe.inf

INF Silicon/Sophgo/SG2044Pkg/Drivers/Information/ShowInformation.inf
#
# ACPI Support
#
Expand Down
Loading

0 comments on commit 47295f3

Please sign in to comment.