alder_lake_bios/Intel/AlderLake/AlderLakeChipsetPkg/Include/OemSmbiosMemory.h

178 lines
7.9 KiB
C

/** @file
This file includes two parts.
1. Define the platform channel slot map.
2. Modify default String definitions for Smbios Memory SubClass data.(smbiosmeorystrings.uni) by OEM
;******************************************************************************
;* Copyright (c) 2014, Insyde Software Corporation. All Rights Reserved.
;*
;* You may not reproduce, distribute, publish, display, perform, modify, adapt,
;* transmit, broadcast, present, recite, release, license or otherwise exploit
;* any part of this publication in any form, by any means, without the prior
;* written permission of Insyde Software Corporation.
;*
;******************************************************************************
*/
#ifndef _OEM_SMBIOS_MEMORY_H_
#define _OEM_SMBIOS_MEMORY_H_
/**********************************************
Define the every channel slots map
**********************************************/
#define PRESENT 1
#define NOT_PRESENT 0
#define CHANNELA_SLOT1 PRESENT
#define CHANNELA_SLOT2 PRESENT
#define CHANNELB_SLOT1 PRESENT
#define CHANNELB_SLOT2 PRESENT
// Bit 0: Slot 1 of the channel
// Bit 1: Slot 2 of the channel
#define CHANNELA_SLOT_MAP (UINT8) ((CHANNELA_SLOT2 << 1) | (CHANNELA_SLOT1))
#define CHANNELB_SLOT_MAP (UINT8) ((CHANNELB_SLOT2 << 1) | (CHANNELB_SLOT1))
/*********************************************
Define OEM want change the string
*********************************************/
//
// Swithch of the SMBIOS string hook.
//
#define ENABLE_HOOK 1
#define DISABLE_HOOK 0
#define SMBIOS_MEMORY_STR_HOOK ENABLE_HOOK
//
// New strings define.
//
#define SMBIOS_MEMORY_STRING_HOOK_LIST \
{ \
{ STRING_TOKEN (STR_MEMORY_SUBCLASS_DEVICE_LOCATOR_2), L"DIMM1" }, \
{ 0xFFFF, NULL }\
}
//
// The below is sample. If you want to modify smbiosmemorystrings.uni, You can refer
// the below sample to add a data in the above SMBIOS_MEMORY_STRING_HOOK_LIST
//
// SMBIOSMemoryStrings.uni : udpate strings
// STR_MEMORY_SUBCLASS_DEVICE_LOCATOR_0 "MyDimm0"
// STR_MEMORY_SUBCLASS_DEVICE_LOCATOR_2 "MyDimm1"
// STR_MEMORY_SUBCLASS_BANK_LOCATOR_0 "MyBank0"
// STR_MEMORY_SUBCLASS_BANK_LOCATOR_2 "MyBank1"
//
// #define SMBIOS_MEMORY_STRING_HOOK_LIST \
// { \
// { STRING_TOKEN (STR_MEMORY_SUBCLASS_DEVICE_LOCATOR_0), L"MyDimm0" }, \
// { STRING_TOKEN (STR_MEMORY_SUBCLASS_DEVICE_LOCATOR_2), L"MyDimm1" }, \
// { STRING_TOKEN (STR_MEMORY_SUBCLASS_BANK_LOCATOR_0), L"MyBank0" }, \
// { STRING_TOKEN (STR_MEMORY_SUBCLASS_BANK_LOCATOR_2), L"MyBank1" }, \
// { STRING_TOKEN (STR_MEMORY_SUBCLASS_ASSET_TAG), L"Asset Tag" }, \
// { 0xFFFF, NULL }\
// }
/*********************************************
Define the Memory form factor by platform
*********************************************/
//
// According to EFI_MEMORY_FORM_FACTOR to define the memory form factor
// EfiMemoryFormFactorOther
// EfiMemoryFormFactorUnknown
// EfiMemoryFormFactorSimm
// EfiMemoryFormFactorSip
// EfiMemoryFormFactorChip
// EfiMemoryFormFactorDip
// EfiMemoryFormFactorZip
// EfiMemoryFormFactorProprietaryCard
// EfiMemoryFormFactorDimm
// EfiMemoryFormFactorTsop
// EfiMemoryFormFactorRowOfChips
// EfiMemoryFormFactorRimm
// EfiMemoryFormFactorSodimm
// EfiMemoryFormFactorSrimm
// EfiMemoryFormFactorFbDimm
#define MEM_FORM_FACTOR EfiMemoryFormFactorDimm
/*********************************************
Define Type17 Offset 15h/ 20h unit (If define, use "Clock rate" as the unit of measurement)
*********************************************/
////
//// Type 17 Offset 15h
////
//#define USE_CLOCK_RATE_AS_THE_UNIT_OF_MAX_CAPABLE_SPEED
//
////
//// Type 17 Offset 20h
////
//#define USE_CLOCK_RATE_AS_THE_UNIT_OF_CONFIGURED_CLOCK_SPEED
/*********************************************
Define On Broard SPD Data
*********************************************/
//
//#define USE_CUSTOMER_SPD_DATA TRUE
//
//#define CHANNEL_A 0
//#define CHANNEL_B 1
//
//#define DIMM0 0
//#define DIMM1 1
//
////
//// Please fill the 256 Bytes for every SPD.
////
//// If the Manufacture, Serial Number, Part Number want to display "Unknow",
//// please fill the 0xFF at offset 117~118(Manufacture), 122~125(Serial Number),
//// 128~145(Part Number).
////
//#define SPD_CHANLA_DIMM0_DATA \
// 0x92,0x05,0x0B,0x03,0x02,0x11,0x00,0x09,0x03,0x52,0x01,0x08,0x0F,0x00,0x1C,0x00,\
// 0x69,0x78,0x69,0x3C,0x69,0x11,0x2C,0x95,0x70,0x03,0x3C,0x3C,0x01,0x2C,0x83,0x01,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x11,0x05,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x01,0x4F,0x54,0x09,0x42,0x00,0x08,0x2E,0xB3,0xA4,0x8B,\
// 0x54,0x53,0x32,0x35,0x36,0x4D,0x53,0x4B,0x36,0x34,0x56,0x31,0x55,0x20,0x20,0x20,\
// 0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x70,0x61,0x73,0x73,0x47,0x50,0x34,0x35,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x70,0x61,0x73,0x73,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
//
//#define SPD_CHANLB_DIMM0_DATA \
// 0x92,0x05,0x0B,0x03,0x02,0x11,0x00,0x09,0x03,0x52,0x01,0x08,0x0F,0x00,0x1C,0x00,\
// 0x69,0x78,0x69,0x3C,0x69,0x11,0x2C,0x95,0x70,0x03,0x3C,0x3C,0x01,0x2C,0x83,0x01,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x11,0x05,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x01,0x4F,0x54,0x09,0x42,0x00,0x08,0x2E,0xB3,0xA4,0x8B,\
// 0x54,0x53,0x32,0x35,0x36,0x4D,0x53,0x4B,0x36,0x34,0x56,0x31,0x55,0x20,0x20,0x20,\
// 0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x70,0x61,0x73,0x73,0x47,0x50,0x34,0x35,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x70,0x61,0x73,0x73,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
//
//#define CUSTOMER_SPD {CHANNEL_A, DIMM0, {SPD_CHANLA_DIMM0_DATA}},\
// {CHANNEL_B, DIMM0, {SPD_CHANLB_DIMM0_DATA}},\
//
// Partition row position of Smbios memory device mapped address (type 20)
// The default value is 0xFF. By Smbios' definition:
// Identifies the position of the referenced Memory Device in a row of the
// address partition. For example, if two 8-bit devices form a 16-bit row,
// this field!|s value is either 1 or 2. The value 0 is reserved. If the
// position is unknown, the field contains FFh.
//
#define MEMORY_PARTITION_ROW_POSITION 0xFF // 1 or 2 will be applicable for lock step mode
#endif