96 IN CONST CHAR8 *ProductName,
102 ZeroMem (MacInfo,
sizeof (*MacInfo));
105 if (InternalEntry == NULL) {
115 MacInfo->DataHub.PlatformName =
"platform";
116 MacInfo->DataHub.SystemProductName = ProductName;
117 MacInfo->DataHub.BoardProduct = InternalEntry->BoardProduct;
119 MacInfo->DataHub.BoardRevision = &InternalEntry->BoardRevision;
126 if (InternalEntry->SmcGeneration < 3) {
127 MacInfo->DataHub.SmcRevision = InternalEntry->SmcRevision;
128 MacInfo->DataHub.SmcBranch = InternalEntry->SmcBranch;
131 MacInfo->DataHub.SmcPlatform = InternalEntry->SmcPlatform;
133 MacInfo->Smbios.BIOSVersion = InternalEntry->BIOSVersion;
134 MacInfo->Smbios.BIOSReleaseDate = InternalEntry->BIOSReleaseDate;
135 MacInfo->Smbios.SystemProductName = ProductName;
136 MacInfo->Smbios.SystemVersion = InternalEntry->SystemVersion;
137 MacInfo->Smbios.SystemSKUNumber = InternalEntry->SystemSKUNumber;
138 MacInfo->Smbios.SystemFamily = InternalEntry->SystemFamily;
139 MacInfo->Smbios.BoardProduct = InternalEntry->BoardProduct;
140 MacInfo->Smbios.BoardVersion = InternalEntry->BoardVersion;
141 MacInfo->Smbios.BoardAssetTag = InternalEntry->BoardAssetTag;
142 MacInfo->Smbios.BoardLocationInChassis = InternalEntry->BoardLocationInChassis;
143 MacInfo->Smbios.BoardType = &InternalEntry->BoardType;
144 MacInfo->Smbios.ChassisType = &InternalEntry->ChassisType;
145 MacInfo->Smbios.ChassisVersion = InternalEntry->BoardProduct;
146 MacInfo->Smbios.ChassisAssetTag = InternalEntry->ChassisAssetTag;
147 MacInfo->Smbios.MemoryFormFactor = &InternalEntry->MemoryFormFactor;
148 MacInfo->Smbios.FirmwareFeatures = InternalEntry->FirmwareFeatures;
149 MacInfo->Smbios.FirmwareFeaturesMask = InternalEntry->FirmwareFeaturesMask;
152 MacInfo->Smbios.PlatformFeature = &InternalEntry->PlatformFeature;
216 IN CONST CHAR8 *ProductName,
222 UINTN CurrentModelLength;
223 UINTN SystemModelLength;
224 CONST CHAR8 *SystemModelSuffix;
225 CHAR8 *SystemModelSeparator;
226 UINT64 SystemModelMajor;
228 ASSERT (ProductName != NULL);
239 SystemModelLength = AsciiStrLen (ProductName);
246 if (SystemModelLength <= CurrentModelLength + 1) {
250 if (AsciiStrnCmp (ProductName,
gMac64BitModels[Index].ModelName, CurrentModelLength) == 0) {
251 SystemModelSuffix = &ProductName[CurrentModelLength];
256 SystemModelSeparator = AsciiStrStr (SystemModelSuffix,
",");
257 Status = AsciiStrDecimalToUint64S (SystemModelSuffix, &SystemModelSeparator, &SystemModelMajor);
258 if (!EFI_ERROR (Status)) {