summaryrefslogtreecommitdiff
path: root/Core/EM/CmosManager/CmosTables.c
diff options
context:
space:
mode:
Diffstat (limited to 'Core/EM/CmosManager/CmosTables.c')
-rw-r--r--Core/EM/CmosManager/CmosTables.c235
1 files changed, 235 insertions, 0 deletions
diff --git a/Core/EM/CmosManager/CmosTables.c b/Core/EM/CmosManager/CmosTables.c
new file mode 100644
index 0000000..fa0ef32
--- /dev/null
+++ b/Core/EM/CmosManager/CmosTables.c
@@ -0,0 +1,235 @@
+//*************************************************************************
+//*************************************************************************
+//** **
+//** (C)Copyright 1985-2009, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//*************************************************************************
+//*************************************************************************
+
+//**********************************************************************
+// $Header: /Alaska/SOURCE/Modules/CMOS Manager/CMOS Core/CMOS Source/CmosTables.c 12 6/15/10 2:24p Michaela $
+//
+// $Revision: 12 $
+//
+// $Date: 6/15/10 2:24p $
+//**********************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/SOURCE/Modules/CMOS Manager/CMOS Core/CMOS Source/CmosTables.c $
+//
+// 12 6/15/10 2:24p Michaela
+//
+// 11 11/10/09 9:14p Michaela
+//
+// 10 7/29/09 9:59a Michaela
+// updates Aptio Enhancement EIP 22205
+// (no code changes)
+//
+// 9 6/15/09 5:11p Michaela
+//
+// 8 6/02/09 3:27p Michaela
+// For label: 4.6.3_CMOSMGR_11
+//
+// 7 2/06/09 2:01p Michaela
+// FIRST_CMOS_REGISTER is now generated by AmiSsp2
+//
+// 6 11/17/08 4:40p Michaela
+// --Removed Token Name strings in debug development code
+//
+// 5 11/17/08 3:40p Michaela
+// --Removed development debug code
+//
+// 4 3/07/08 4:07p Michaela
+// Label 4.6.3_CMOSMGR_05 fixes:
+// -- write errors to Optimal Defaults buffer before memory detection
+// -- CMOS Token table corruption when name strings are disabled
+//
+// 3 2/29/08 9:35p Michaela
+// - Added recovery path policy
+// - fixed other minor bugs
+//
+// 2 2/26/08 12:49p Michaela
+// Added/modified Helpbuilder headers
+//
+// 1 2/22/08 2:29p Michaela
+//
+// 1 2/04/08 6:00p MichaelA
+// Created
+//
+//**********************************************************************
+
+//<AMI_FHDR_START>
+//---------------------------------------------------------------------------
+//
+// Name: CmosTables.c
+//
+// Description: Contains the global static data tables that are initialized
+// from AmiSsp2.exe output during the build process. These
+// tables are used in the PEI phase and passed, as needed,
+// to DXE via HOB data structure.
+//
+// This file must always be included in source form.
+//
+//---------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+//<AMI_GHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: Initialization_Tables
+//
+// Description:
+// This page provides links to descriptions of the major tables used in
+// initializing/supporting the CMOS Manager module.
+//
+// Fields: Phase Name Description
+// ------------------------------------------------------------------
+// ALL gCmosTokenTable all SSP defined tokens
+// ALL gCmosOptimalDefaultTable default values for all CMOS registers
+// ALL gCmosNoCheckSumTable CMOS addresses that are not checksummed
+//
+//----------------------------------------------------------------------------
+//<AMI_GHDR_END>
+
+
+#include <Efi.h>
+#ifdef PEI_COMPILE
+ #include <Pei.h>
+ #include <AmiPeiLib.h>
+#else
+ #include <AmiDxeLib.h>
+#endif
+#include "CmosManager.h"
+#include "CmosManagerHob.h"
+#include <SspData.h>
+
+CONST UINT8 gFirstManagedRegister = FIRST_CMOS_REGISTER;
+CONST UINT8 gLastManagedRegister = LAST_CMOS_REGISTER;
+
+//<AMI_THDR_START>
+//---------------------------------------------------------------------------
+//
+// Name: gCmosTokenTable
+//
+// Description:
+// This is a table of CMOS tokens derived from macros defined in
+// SspData.h, which is generated by AmiSsp2.exe during the build
+// process.
+//
+// Notes:
+// This is an array of type: CMOS_TOKEN
+//
+//---------------------------------------------------------------------------
+//<AMI_THDR_END>
+
+#define USING_SSP_MACROS
+CMOS_TOKEN gCmosTokenTable[] = { // to DXE via HOB
+ {0}, // Index starts at 1
+ #define CmosTokenTable(name,val) {val},
+#include <SspData.h>
+};
+CONST UINT16 gCmosTokenTableSize = CMOS_TOKEN_COUNT(gCmosTokenTable);
+
+
+//<AMI_THDR_START>
+//---------------------------------------------------------------------------
+//
+// Name: gCmosOptimalDefaultTable
+//
+// Description:
+// This is a table of default (or optimal) CMOS register values derived
+// from macros defined in SspData.h, which is generated by AmiSsp2.exe
+// during the build process.
+//
+// Notes:
+// This is an array of type: CMOS_REGISTER
+//
+//---------------------------------------------------------------------------
+//<AMI_THDR_END>
+
+#define USING_SSP_MACROS
+CMOS_REGISTER gCmosOptimalDefaultTable[] = { // to DXE via HOB
+{0}, // Index starts at 1
+#define NvramOptimalDataTable(val) {val},
+#include <SspData.h>
+};
+CONST UINT16 gCmosOptimalDefaultTableSize =
+ CMOS_REGISTER_COUNT(gCmosOptimalDefaultTable);
+
+
+//<AMI_THDR_START>
+//---------------------------------------------------------------------------
+//
+// Name: gCmosNoCheckSumTable
+//
+// Description:
+// This is a table of CMOS registers excluded from checksum
+// calculations. This table is derived from macros defined in
+// SspData.h, which is generated by AmiSsp2.exe during the build
+// process.
+//
+// Notes:
+// This is an array of type: CMOS_REGISTER
+//
+//---------------------------------------------------------------------------
+//<AMI_THDR_END>
+
+#define USING_SSP_MACROS
+CONST CMOS_REGISTER gCmosNoCheckSumTable[] = { // to DXE via HOB
+{0}, // Index starts at 1
+#define NonChecksumTable(val) {val},
+#include <SspData.h>
+};
+CONST UINT16 gCmosNoCheckSumTableSize =
+ CMOS_REGISTER_COUNT(gCmosNoCheckSumTable);
+
+
+//<AMI_THDR_START>
+//---------------------------------------------------------------------------
+//
+// Name: gUnmanagedTable
+//
+// Description:
+// This is a table of CMOS registers that are allocated, but otherwise
+// unmanaged. The purpose is to provide support for locations that
+// must be written prior to CMOS Manager, and to provide alternative
+// mechanisms in situations where CMOS Manager's loading of default
+// values would cause major implementation problems.
+//
+// Notes:
+// This is an array of type: CMOS_REGISTER
+//
+// It is up to the owner of the SSP CMOS Token to determine whether
+// or not the value of an un-managed location is valid.
+//
+//---------------------------------------------------------------------------
+//<AMI_THDR_END>
+
+#define USING_SSP_MACROS
+CONST CMOS_REGISTER gUnmanagedTable[] = {
+{0}, // Index starts at 1
+#define UnmanagedTable(val) {val},
+#include <SspData.h>
+};
+CONST UINT16 gUnmanagedTableSize =
+ CMOS_REGISTER_COUNT(gUnmanagedTable);
+
+//*************************************************************************
+//*************************************************************************
+//** **
+//** (C)Copyright 1985-2009, American Megatrends, Inc. **
+//** **
+//** All Rights Reserved. **
+//** **
+//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
+//** **
+//** Phone: (770)-246-8600 **
+//** **
+//*************************************************************************
+//*************************************************************************