mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OpenCorePlatform: Add support for SMC version SMBIOS table
This commit is contained in:
parent
fc883db8ca
commit
4e5c22d5c2
@ -15,6 +15,7 @@ OpenCore Changelog
|
||||
- Added `Security` -> `ScanPolicy` preference
|
||||
- Fixed invalid `board-rev` exposure in Data Hub
|
||||
- Fixed SMBIOS Type 133 table exposure
|
||||
- Added support for SMBIOS Type 134 table exposure
|
||||
|
||||
#### v0.0.1
|
||||
- Initial developer preview release
|
||||
|
||||
Binary file not shown.
@ -2491,13 +2491,20 @@ Apple ROM Version
|
||||
\texttt{MacBook-Aluminum}.
|
||||
\item
|
||||
\texttt{PlatformFeature}\\
|
||||
\textbf{Type}: \texttt{plist\ integer}\\
|
||||
\textbf{Default value}: \texttt{0}\\
|
||||
\textbf{Type}: \texttt{plist\ integer}, 32-bit\\
|
||||
\textbf{Default value}: \texttt{0xFFFFFFFF}\\
|
||||
\textbf{SMBIOS}: \texttt{APPLE\_SMBIOS\_TABLE\_TYPE133} -
|
||||
\texttt{PlatformFeature}\\
|
||||
\textbf{Description}: Platform features bitmask. Refer to
|
||||
\href{https://github.com/acidanthera/EfiPkg/blob/master/Include/IndustryStandard/AppleFeatures.h}{AppleFeatures.h}
|
||||
for more details.
|
||||
for more details. Use \texttt{0xFFFFFFFF} value to not provide this table.
|
||||
\item
|
||||
\texttt{SmcVersion}\\
|
||||
\textbf{Type}: \texttt{plist\ data}, 16 bytes\\
|
||||
\textbf{Default value}: All zero\\
|
||||
\textbf{SMBIOS}: \texttt{APPLE\_SMBIOS\_TABLE\_TYPE134} - \texttt{Version}\\
|
||||
\textbf{Description}: ASCII string containing SMC version in upper case.
|
||||
Missing on T2 based Macs. Ignored when zero.
|
||||
\item
|
||||
\texttt{FirmwareFeatures}\\
|
||||
\textbf{Type}: \texttt{plist\ data}, 8 bytes\\
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
\documentclass[]{article}
|
||||
%DIF LATEXDIFF DIFFERENCE FILE
|
||||
%DIF DEL PreviousConfiguration.tex Fri May 3 12:13:06 2019
|
||||
%DIF ADD ../Configuration.tex Wed May 15 01:27:22 2019
|
||||
%DIF ADD ../Configuration.tex Sun May 19 09:05:08 2019
|
||||
|
||||
\usepackage{lmodern}
|
||||
\usepackage{amssymb,amsmath}
|
||||
@ -2657,15 +2657,22 @@ Apple ROM Version
|
||||
\texttt{MacBook-Aluminum}.
|
||||
\item
|
||||
\texttt{PlatformFeature}\\
|
||||
\textbf{Type}: \texttt{plist\ integer}\\
|
||||
\textbf{Default value}: \texttt{0}\\
|
||||
\textbf{Type}: \texttt{plist\ integer}\DIFaddbegin \DIFadd{, 32-bit}\DIFaddend \\
|
||||
\textbf{Default value}: \texttt{\DIFdelbegin \DIFdel{0}\DIFdelend \DIFaddbegin \DIFadd{0xFFFFFFFF}\DIFaddend }\\
|
||||
\textbf{SMBIOS}: \texttt{APPLE\_SMBIOS\_TABLE\_TYPE133} -
|
||||
\texttt{PlatformFeature}\\
|
||||
\textbf{Description}: Platform features bitmask. Refer to
|
||||
\href{https://github.com/acidanthera/EfiPkg/blob/master/Include/IndustryStandard/AppleFeatures.h}{AppleFeatures.h}
|
||||
for more details.
|
||||
\item
|
||||
\texttt{FirmwareFeatures}\\
|
||||
for more details. \DIFaddbegin \DIFadd{Use }\texttt{\DIFadd{0xFFFFFFFF}} \DIFadd{value to not provide this table.
|
||||
}\DIFaddend \item
|
||||
\DIFaddbegin \texttt{\DIFadd{SmcVersion}}\\
|
||||
\textbf{\DIFadd{Type}}\DIFadd{: }\texttt{\DIFadd{plist\ data}}\DIFadd{, 16 bytes}\\
|
||||
\textbf{\DIFadd{Default value}}\DIFadd{: All zero}\\
|
||||
\textbf{\DIFadd{SMBIOS}}\DIFadd{: }\texttt{\DIFadd{APPLE\_SMBIOS\_TABLE\_TYPE134}} \DIFadd{- }\texttt{\DIFadd{Version}}\\
|
||||
\textbf{\DIFadd{Description}}\DIFadd{: ASCII string containing SMC version in upper case.
|
||||
Missing on T2 based Macs. Ignored when zero.
|
||||
}\item
|
||||
\DIFaddend \texttt{FirmwareFeatures}\\
|
||||
\textbf{Type}: \texttt{plist\ data}, 8 bytes\\
|
||||
\textbf{Default value}: \texttt{0}\\
|
||||
\textbf{SMBIOS}: \texttt{APPLE\_SMBIOS\_TABLE\_TYPE128} -
|
||||
|
||||
@ -573,6 +573,8 @@
|
||||
<integer>0</integer>
|
||||
<key>MemoryFormFactor</key>
|
||||
<integer>9</integer>
|
||||
<key>SmcVersion</key>
|
||||
<data>AAAAAAAAAAAAAAAAAAAAAA==</data>
|
||||
</dict>
|
||||
<key>UpdateDataHub</key>
|
||||
<true/>
|
||||
|
||||
@ -28,6 +28,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||
|
||||
#include <IndustryStandard/AppleSmBios.h>
|
||||
|
||||
#include <Guid/AppleVariable.h>
|
||||
|
||||
STATIC
|
||||
@ -168,6 +170,7 @@ OcPlatformUpdateSmbios (
|
||||
EFI_STATUS Status;
|
||||
OC_SMBIOS_DATA Data;
|
||||
EFI_GUID Uuid;
|
||||
UINT8 SmcVersion[APPLE_SMBIOS_SMC_VERSION_SIZE];
|
||||
|
||||
ZeroMem (&Data, sizeof (Data));
|
||||
|
||||
@ -275,7 +278,13 @@ OcPlatformUpdateSmbios (
|
||||
Data.ProcessorType = &Config->PlatformInfo.Smbios.ProcessorType;
|
||||
}
|
||||
|
||||
Data.PlatformFeature = Config->PlatformInfo.Smbios.PlatformFeature;
|
||||
if (Config->PlatformInfo.Smbios.PlatformFeature != MAC_INFO_PLATFORM_FEATURE_MISSING) {
|
||||
Data.PlatformFeature = &Config->PlatformInfo.Smbios.PlatformFeature;
|
||||
}
|
||||
|
||||
if (Config->PlatformInfo.Smbios.SmcVersion[0] != '\0') {
|
||||
Data.SmcVersion = &Config->PlatformInfo.Smbios.SmcVersion[0];
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Automatic mode read data from Generic & MacInfo.
|
||||
@ -326,12 +335,14 @@ OcPlatformUpdateSmbios (
|
||||
Data.FirmwareFeaturesMask = MacInfo->Smbios.FirmwareFeaturesMask;
|
||||
Data.ProcessorType = NULL;
|
||||
|
||||
OC_INLINE_STATIC_ASSERT (
|
||||
MAC_INFO_PLATFORM_FEATURE_MISSING == PLATFORM_FEATURE_MISSING,
|
||||
"MacInfoPkg and OcSupportPkg have inconsistent data!"
|
||||
);
|
||||
if (MacInfo->Smbios.PlatformFeature != MAC_INFO_PLATFORM_FEATURE_MISSING) {
|
||||
Data.PlatformFeature = &MacInfo->Smbios.PlatformFeature;
|
||||
}
|
||||
|
||||
Data.PlatformFeature = MacInfo->Smbios.PlatformFeature;
|
||||
if (MacInfo->DataHub.SmcRevision != NULL) {
|
||||
SmbiosGetSmcVersion (MacInfo->DataHub.SmcRevision, SmcVersion);
|
||||
Data.SmcVersion = SmcVersion;
|
||||
}
|
||||
}
|
||||
|
||||
Status = CreateSmbios (&Data, UpdateMode, CpuInfo);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user