CloverBootloader/rEFIt_UEFI/Platform/smbios.h
jief666 6ff5bab8a5 Create section Smbios and BootGraphics.
Move OptionsBits and FlagsBits in GlobalConfig.
Move OEMVendor, OEMProduct, OEMBoard in GlobalConfig.
Move KernelPatchesAllowed, KextPatchesAllowed, EnabledCores and
BlockKexts in GlobalConfig.
Create RomVersionUsed, EfiVersionUsed and ReleaseDateUsed in
GlobalConfig.
Move gFwFeatures, gFwFeaturesMask, gPlatformFeature, SlotDevices in
Smbios section.
Move UserInUse, UserChannels and User from gRAM to Smbios settings
section.
Rename enum LANGUAGES to LanguageCode.
2021-04-03 17:42:49 +03:00

76 lines
1.2 KiB
C

/*
* smbios.h
*
* Created on: 16 Apr 2020
* Author: jief
*/
#ifndef PLATFORM_SMBIOS_H_
#define PLATFORM_SMBIOS_H_
extern "C" {
#include <IndustryStandard/AppleSmBios.h>
}
// The maximum number of RAM slots to detect
// even for 3-channels chipset X58 there are no more then 8 slots
#define MAX_RAM_SLOTS 24
// The maximum sane frequency for a RAM module
#define MAX_RAM_FREQUENCY 5000
typedef struct {
UINT32 ModuleSize;
UINT32 Frequency;
XString8 Vendor;
XString8 PartNo;
XString8 SerialNo;
UINT8 Type;
bool InUse;
} RAM_SLOT_INFO;
typedef struct
{
UINT32 Frequency;
UINT32 Divider;
UINT8 TRC;
UINT8 TRP;
UINT8 RAS;
UINT8 Channels;
UINT8 Slots;
UINT8 Type;
UINT8 SPDInUse;
UINT8 SMBIOSInUse;
UINT8 pad[2];
RAM_SLOT_INFO SPD[MAX_RAM_SLOTS * 4];
RAM_SLOT_INFO SMBIOS[MAX_RAM_SLOTS * 4];
} MEM_STRUCTURE;
extern APPLE_SMBIOS_STRUCTURE_POINTER SmbiosTable;
extern MEM_STRUCTURE gRAM;
extern BOOLEAN gMobile;
UINTN
iStrLen(
CONST CHAR8* String,
UINTN MaxLen
);
EFI_STATUS
PrepatchSmbios (void);
void
PatchSmbios (void);
void
FinalizeSmbios (void);
#endif /* PLATFORM_SMBIOS_H_ */