diff options
Diffstat (limited to 'Core/EM/OFBD/MEUD/MEAU')
-rw-r--r-- | Core/EM/OFBD/MEUD/MEAU/AutoUpdate.c | 519 | ||||
-rw-r--r-- | Core/EM/OFBD/MEUD/MEAU/AutoUpdate.cif | 13 | ||||
-rw-r--r-- | Core/EM/OFBD/MEUD/MEAU/AutoUpdate.dxs | 53 | ||||
-rw-r--r-- | Core/EM/OFBD/MEUD/MEAU/AutoUpdate.h | 98 | ||||
-rw-r--r-- | Core/EM/OFBD/MEUD/MEAU/AutoUpdate.mak | 78 | ||||
-rw-r--r-- | Core/EM/OFBD/MEUD/MEAU/AutoUpdate.sdl | 103 | ||||
-rw-r--r-- | Core/EM/OFBD/MEUD/MEAU/MERegion.bin | bin | 0 -> 8388608 bytes |
7 files changed, 864 insertions, 0 deletions
diff --git a/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.c b/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.c new file mode 100644 index 0000000..0c16ea6 --- /dev/null +++ b/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.c @@ -0,0 +1,519 @@ +//********************************************************************** +//********************************************************************** +//** ** +//** (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/OFBD Intel ME Update/AutoUpdate.c 3 10/04/11 5:08a Klzhan $ +// +// $Revision: 3 $ +// +// $Date: 10/04/11 5:08a $ +//********************************************************************** +// Revision History +// ---------------- +// $Log: /Alaska/SOURCE/Modules/OFBD Intel ME Update/AutoUpdate.c $ +// +// 3 10/04/11 5:08a Klzhan +// Support update OPR region with auto update. +// +// 2 9/09/11 7:25a Klzhan +// Fix system hang issue. +// +// 1 8/30/11 8:17a Klzhan +// +// +//********************************************************************** +//<AMI_FHDR_START> +// +// Name: AutoUpdate.c +// +// Description: +// +//<AMI_FHDR_END> +//********************************************************************** +#include <AmiDxeLib.h> +#include <Protocol/ConsoleControl.h> +#include <Protocol/LoadedImage.h> +#include <Flash.h> +#include "AutoUpdate.h" +#include <Protocol/SimpleTextOut.h> +#include <Core\EM\OFBD\MEUD\MEUD.h> + +UINT32 FlashCapacity; + +EFI_GUID guidConsoleControl = EFI_CONSOLE_CONTROL_PROTOCOL_GUID; +EFI_GUID guidLoadedImage = EFI_LOADED_IMAGE_PROTOCOL_GUID; + +//defined in Tokens.c +extern const UINT32 FlashBlockSize; + +//defined in CSP_MEUD module +extern EFI_STATUS GET_FW_VERSION( + UINT16 *MeFwVersionData +); +extern UINT32 GetHFS(VOID); + +extern UINT32 GetFlashCapacity(VOID); + +extern EFI_STATUS +GetRegionOffset( + UINT8 Region, + UINT32* Offset, + UINT32* Length +); + +extern OFBD_TC_55_ME_PROCESS_STRUCT *StructPtr; + +extern EFI_STATUS UpdateRegions( + UINT8* Buffer, + BOOLEAN InSmm +); + +#define BDS_ALL_DRIVERS_CONNECTED_PROTOCOL_GUID \ + { 0xdbc9fd21, 0xfad8, 0x45b0, 0x9e, 0x78, 0x27, 0x15, 0x88, 0x67, 0xcc, 0x93 } +EFI_GUID gBdsAllDriversConnectedProtocolGuid = \ + BDS_ALL_DRIVERS_CONNECTED_PROTOCOL_GUID; +EFI_GUID gMEAUVariableGuid = MEAU_VAR_GUID; +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: NeedtoUpdate +// +// Description: Check ME version. +// +// Input: +// VOID +// +// Output: +// TRUE - Update ME in this BOOT. +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +BOOLEAN +NeedtoUpdate( + VOID +) +{ + ME_FW_VERSION Image_MEversion = IMAGE_ME_FW_VERSION, CurrentMEVersion; + EFI_STATUS Status; + + if(REFLASH_UPDATE_FORCE) + { + UINTN SetupVariableSize = 1; + UINT8 Data8; + Status = pRS->GetVariable ( + L"MEAU", + &gMEAUVariableGuid, + NULL, + &SetupVariableSize, + &Data8); + + // Flag Not Found, just return TRUE + if(Status == EFI_NOT_FOUND) + return TRUE; + } + Status = GET_FW_VERSION((UINT16*)&CurrentMEVersion); + + if(EFI_ERROR(Status)) + return FALSE; + + // Check version +#if ME_UPDATE_DOWNGRADE + // Downgrade allow, update when the version is different. + if(MemCmp(&Image_MEversion, &CurrentMEVersion, sizeof(ME_FW_VERSION)) == 0) + return FALSE; + else + return TRUE; +#else + // Because parameters in ME verions are words + // so check version in 2 parts + if(ME_VERSION_VALUE(CurrentMEVersion) < ME_VERSION_VALUE(Image_MEversion)) + return TRUE; + + if((ME_VERSION_VALUE(CurrentMEVersion) == ME_VERSION_VALUE(Image_MEversion)) + && (ME_VERSION_VALUE1(CurrentMEVersion) < ME_VERSION_VALUE1(Image_MEversion))) + return TRUE; + +#endif + + return FALSE; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: GetRawImage +// +// Description: Find ME binary in FV_MAIN. +// +// Input: +// NameGuid - Guid of FFS need to find. +// Buffer - Input buffer +// Size - Size of Input buffer +// +// Output: +// Status +// Buffer - FFS data +// Size - Size of Output buffer +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS +GetRawImage ( + IN EFI_GUID *NameGuid, + IN OUT VOID **Buffer, + IN OUT UINTN *Size + ) + +{ + EFI_STATUS Status; + UINTN HandleCount; + UINTN Index; + EFI_FIRMWARE_VOLUME_PROTOCOL *Fv; + EFI_HANDLE *HandleBuff; + UINT32 AuthenticationStatus; + + Status = pBS->LocateHandleBuffer ( + ByProtocol, + &gEfiFirmwareVolumeProtocolGuid, + NULL, + &HandleCount, + &HandleBuff + ); + + if (EFI_ERROR (Status) || HandleCount == 0) { + return EFI_NOT_FOUND; + } + // + // Find desired image in all Fvs + // + for (Index = 0; Index < HandleCount; Index++) { + Status = pBS->HandleProtocol ( + HandleBuff[Index], + &gEfiFirmwareVolumeProtocolGuid, + &Fv + ); + + if (EFI_ERROR (Status)) { + if (HandleBuff != NULL) { + pBS->FreePool (HandleBuff); + } + + return EFI_LOAD_ERROR; + } + // + // Try a raw file + // + Status = Fv->ReadSection ( + Fv, + NameGuid, + EFI_SECTION_RAW, + 0, + Buffer, + Size, + &AuthenticationStatus + ); + + if (!EFI_ERROR (Status)) { + break; + } + } + + if (HandleBuff != NULL) { + pBS->FreePool (HandleBuff); + } + + if (Index >= HandleCount) { + + return EFI_NOT_FOUND; + } + + return EFI_SUCCESS; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: ProgressMEUpdate +// +// Description: Do ME update +// +// Input: +// NameGuid - Guid of FFS need to find. +// Buffer - Input buffer +// Size - Size of Input buffer +// +// Output: +// Status +// Buffer - FFS data +// Size - Size of Output buffer +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID +ProgressMEUpdate( + IN UINT8* Buffer, + IN UINTN Size +) +{ + EFI_STATUS Status; + UINTN SetupVariableSize; + UINT8 Data8 = 0; + UINT32 TempReg, i; + OFBD_TC_55_ME_PROCESS_STRUCT MEProcessStructPtr; + CHAR8 String[256]; + CHAR8* StringBuffer = String; + CHAR16 wString[256]; + + // Init Global variable + MEProcessStructPtr.ddMessageBuffer = (UINT32)StringBuffer; + StructPtr = &MEProcessStructPtr; + + FlashCapacity = GetFlashCapacity(); + if((Size) != FlashCapacity) + return; + +#ifdef CSP_MEUD_SUPPORT +#if CSP_MEUD_SUPPORT == 1 + // For Desktop and Mobile + if (((GetHFS() >> 16) & 0x0F) == 0) + IoWrite8(SW_SMI_IO_ADDRESS, Disable_ME_SW_SMI); + // Comes here, System should be in Disabled mode. + // If not, just return + if (((GetHFS() >> 16) & 0x0F) != 5) + return; +#endif +#endif + + // Get ME Region. + if(REFLASH_UPDATE_ME) + { + // Prepare Buffer + if(DIRECT_FW_UPDATE) + StructPtr->bBlockType = ME_OPR_BLK; + else + StructPtr->bBlockType = ME_BLK; + + StructPtr->bHandleRequest = BIT02; + + pST->ConOut->OutputString (pST->ConOut, + L"ME is updated now ... \r\n"); + + pST->ConOut->OutputString (pST->ConOut, + L"Please don't shut down or reset system \r\n"); + + do{ + Status = UpdateRegions(Buffer, FALSE); + // Request to continue + if((StructPtr->UpdateResult & BIT01)) + StructPtr->bHandleRequest = BIT03; + + // Show string + if((StructPtr->UpdateResult & BIT02)) + { + StructPtr->bHandleRequest = BIT03; + MemSet(wString, 512, 0); + for(i = 0 ; String[i] ; (CHAR8)wString[i] = String[i], i++); + wString[i] = 0; + pST->ConOut->OutputString (pST->ConOut,wString); + pST->ConOut->OutputString (pST->ConOut,L"\r\n"); + } + // End + if((StructPtr->UpdateResult & BIT03)) + break; + // TODO : Error Handle + }while(1); + } + + if(REFLASH_UPDATE_GBE) + { + // Prepare Buffer + StructPtr->bBlockType = GBE_BLK; + StructPtr->bHandleRequest = BIT02; + + pST->ConOut->OutputString (pST->ConOut, + L"GBE region is updated now ... \r\n"); + + Status = UpdateRegions(Buffer, FALSE); + + // Show string + if((StructPtr->UpdateResult & BIT02)) + { + StructPtr->bHandleRequest = BIT03; + MemSet(wString, 512, 0); + for(i = 0 ; String[i] ; (CHAR8)wString[i] = String[i], i++); + wString[i] = 0; + pST->ConOut->OutputString (pST->ConOut,wString); + pST->ConOut->OutputString (pST->ConOut,L"\r\n"); + } + } + + if(REFLASH_UPDATE_MEDS) + { + // Prepare Buffer + StructPtr->bBlockType = GBE_BLK; + StructPtr->bHandleRequest = BIT02; + + pST->ConOut->OutputString (pST->ConOut, + L"GBE region is updated now ... \r\n"); + + Status = UpdateRegions(Buffer, FALSE); + + // Show string + if((StructPtr->UpdateResult & BIT02)) + { + StructPtr->bHandleRequest = BIT03; + MemSet(wString, 512, 0); + for(i = 0 ; String[i] ; (CHAR8)wString[i] = String[i], i++); + wString[i] = 0; + pST->ConOut->OutputString (pST->ConOut,wString); + pST->ConOut->OutputString (pST->ConOut,L"\r\n"); + } + } + + // Update Finish, update Flag + if(REFLASH_UPDATE_FORCE) + { + SetupVariableSize = 1; + Status = pRS->SetVariable ( + L"MEAU", + &gMEAUVariableGuid, + EFI_VARIABLE_NON_VOLATILE + | EFI_VARIABLE_BOOTSERVICE_ACCESS + | EFI_VARIABLE_RUNTIME_ACCESS, + SetupVariableSize, + &Data8); + } + // Reset System and ME + IoWrite32(0xCF8, 0x8000F8AC); + TempReg = IoRead32(0xCFC); + + if(!(TempReg & BIT20)) + { + IoWrite32(0xCF8, 0x8000F8AC); + IoWrite32(0xCFC, TempReg | BIT20); + } + + pRS->ResetSystem( EfiResetCold, EFI_SUCCESS, 0, NULL ); +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: MEAutoUpdate +// +// Description: System updaete ME in POST. +// +// Input: +// VOID +// +// Output: +// VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS +MEAutoUpdate( + VOID +) +{ + UINTN Size; + EFI_PHYSICAL_ADDRESS ImageLocation; + UINT8* ImageBuffer; + EFI_STATUS Status; + EFI_GUID gMEUDfileguid = MEUD_FILE_GUID; + + if(!NeedtoUpdate()) + return EFI_SUCCESS; + + + Size = ME_UPDATE_BINARY_SIZE * 0x100000 / 0x1000; + Status = pBS->AllocatePages ( + AllocateAnyPages, + EfiBootServicesData, + Size, + &ImageLocation ); + + ImageBuffer = (UINT8*)ImageLocation; + + if(EFI_ERROR(Status)) + return Status; + + Size = Size * 0x1000; + Status = GetRawImage (&gMEUDfileguid, &ImageBuffer, &Size); + + ProgressMEUpdate(ImageBuffer, Size); + + pBS->FreePages(ImageLocation, Size ); + + return EFI_SUCCESS; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// +// Procedure: AllDriverConnectEvent +// +// Description: This routine for reset the TPM Establishment flag. +// +// Input: EFI_EVENT - Efi event. +// VOID* - Image handle. +// +// Output: None. +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID +MEAUAllDriverConnectEvent ( + IN EFI_EVENT Event, + IN VOID *Context +) +{ + MEAutoUpdate(); +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: ReFlashEntry +// +// Description: This is the standard EFI driver entry point called for +// Recovery flash module initlaization +// Input: IN EFI_HANDLE ImageHandle - ImageHandle of the loaded driver +// IN EFI_SYSTEM_TABLE SystemTable - Pointer to the System Table +// +// Output: EFI_SUCCESS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS AUTOUPDEntry (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) +{ + EFI_STATUS Status; + EFI_EVENT AllDriverConnectEvent; + VOID *Registration; + + + InitAmiLib(ImageHandle,SystemTable); + + //---Set up Callback---------------- + Status = RegisterProtocolCallback ( &gBdsAllDriversConnectedProtocolGuid, \ + MEAUAllDriverConnectEvent, \ + NULL, \ + &AllDriverConnectEvent, \ + &Registration ); + + return EFI_SUCCESS; +} +//********************************************************************** +//********************************************************************** +//** ** +//** (C)Copyright 1985-2009, American Megatrends, Inc. ** +//** ** +//** All Rights Reserved. ** +//** ** +//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +//** ** +//** Phone: (770)-246-8600 ** +//** ** +//********************************************************************** +//**********************************************************************
\ No newline at end of file diff --git a/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.cif b/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.cif new file mode 100644 index 0000000..a32e4ad --- /dev/null +++ b/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.cif @@ -0,0 +1,13 @@ +<component> + name = "MEAU" + category = ModulePart + LocalRoot = "Core\EM\OFBD\MEUD\MEAU" + RefName = "AutoUpdate" +[files] +"AutoUpdate.sdl" +"AutoUpdate.mak" +"AutoUpdate.c" +"AutoUpdate.dxs" +"AutoUpdate.h" +"MERegion.bin" +<endComponent> diff --git a/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.dxs b/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.dxs new file mode 100644 index 0000000..b150b49 --- /dev/null +++ b/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.dxs @@ -0,0 +1,53 @@ +//********************************************************************** +//********************************************************************** +//** ** +//** (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/OFBD Intel ME Update/AutoUpdate.dxs 1 8/30/11 8:17a Klzhan $ +// +// $Revision: 1 $ +// +// $Date: 8/30/11 8:17a $ +//********************************************************************** +// Revision History +// ---------------- +// $Log: /Alaska/SOURCE/Modules/OFBD Intel ME Update/AutoUpdate.dxs $ +// +// 1 8/30/11 8:17a Klzhan +// +// +//********************************************************************** +//<AMI_FHDR_START> +// +// Name: AutoUpdate.dxs +// +// Description: Dependancy expression for the component +// +//<AMI_FHDR_END> +//********************************************************************** +DEPENDENCY_START + TRUE +DEPENDENCY_END +//********************************************************************** +//********************************************************************** +//** ** +//** (C)Copyright 1985-2009, American Megatrends, Inc. ** +//** ** +//** All Rights Reserved. ** +//** ** +//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +//** ** +//** Phone: (770)-246-8600 ** +//** ** +//********************************************************************** +//**********************************************************************
\ No newline at end of file diff --git a/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.h b/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.h new file mode 100644 index 0000000..00a5718 --- /dev/null +++ b/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.h @@ -0,0 +1,98 @@ +//********************************************************************** +//********************************************************************** +//** ** +//** (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/OFBD Intel ME Update/AutoUpdate.h 1 8/30/11 8:17a Klzhan $ +// +// $Revision: 1 $ +// +// $Date: 8/30/11 8:17a $ +//********************************************************************** +// Revision History +// ---------------- +// $Log: /Alaska/SOURCE/Modules/OFBD Intel ME Update/AutoUpdate.h $ +// +// 1 8/30/11 8:17a Klzhan +// +// +//********************************************************************** +//<AMI_FHDR_START> +// +// Name: AutoUpdate.h +// +// Description: Header file for component +// +//<AMI_FHDR_END> +//********************************************************************** +#ifndef __AUTOUPDATE__H__ +#define __AUTOUPDATE__H__ +#ifdef __cplusplus +extern "C" +{ +#endif + +#include <Token.h> + +// {80E1202E-2697-4264-9CC9-80762C3E5863} +#define MEAU_VAR_GUID { 0xC87690DC, 0x9005, 0x47EA, 0xAC, 0x34, 0x12, 0xF, 0xD8, 0x36, 0x33, 0x7D} + + +#define MEUD_FILE_GUID \ +{ 0xfeaaa7a6, 0xcb95, 0x4670, 0xb4, 0x99, 0x87, 0x7f, 0xa6, 0xca, 0x6b, 0xae } + +#define ME_VERSION_VALUE(a) \ +(UINT32)((a.CoreMajor << 16) + (a.CoreMinor)) + +#define ME_VERSION_VALUE1(a) \ +(UINT32)((a.CoreBuild << 16) + (a.CorePatch)) + +#define FLASH_BASE_ADDRESS(a) (UINTN)(0xFFFFFFFF - GetFlashCapacity() + 1 + (UINTN)a) + + +#pragma pack(1) +typedef struct +{ + UINT8 UpdateGBE; + UINT8 UpdateME; + UINT8 UpdateMEDS; + UINT8 ForceME; +} MEAUTOUpdate; + +#pragma pack() + +#define MEAUTOUPD_MAIN 1 +#define MEAUTOUPD_FLASH 2 + +#define FLASH_PROGRESS_KEY 100 +#define FLASH_START_KEY 101 + +#include <Setup.h> + /****** DO NOT WRITE BELOW THIS LINE *******/ +#ifdef __cplusplus +} +#endif +#endif +//********************************************************************** +//********************************************************************** +//** ** +//** (C)Copyright 1985-2009, American Megatrends, Inc. ** +//** ** +//** All Rights Reserved. ** +//** ** +//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +//** ** +//** Phone: (770)-246-8600 ** +//** ** +//********************************************************************** +//**********************************************************************
\ No newline at end of file diff --git a/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.mak b/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.mak new file mode 100644 index 0000000..dd1d567 --- /dev/null +++ b/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.mak @@ -0,0 +1,78 @@ +#********************************************************************** +#********************************************************************** +#** ** +#** (C)Copyright 1985-2010, American Megatrends, Inc. ** +#** ** +#** All Rights Reserved. ** +#** ** +#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +#** ** +#** Phone: (770)-246-8600 ** +#** ** +#********************************************************************** +#********************************************************************** + +#********************************************************************** +# $Header: /Alaska/SOURCE/Modules/OFBD Intel ME Update/AutoUpdate.mak 1 8/30/11 8:17a Klzhan $ +# +# $Revision: 1 $ +# +# $Date: 8/30/11 8:17a $ +#********************************************************************** +# Revision History +# ---------------- +# $Log: /Alaska/SOURCE/Modules/OFBD Intel ME Update/AutoUpdate.mak $ +# +# 1 8/30/11 8:17a Klzhan +# +# +#********************************************************************** +#<AMI_FHDR_START> +# +# Name: AutoUpdate.mak +# +# Description: +# +#<AMI_FHDR_END> +#********************************************************************** +all : MEAUTOUPD + +SetupData : MEAUTOUPD + +MEAUTOUPD : $(BUILD_DIR)\AutoUpdate.mak MEAUTOUPDBin $(BUILD_DIR)\MERegion.ffs + +$(BUILD_DIR)\AutoUpdate.mak : $(MEAUPD_DIR)\$(@B).cif $(MEAUPD_DIR)\$(@B).mak $(BUILD_RULES) + $(CIF2MAK) $(MEAUPD_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS) + +MEUDMSG_CFLAGS=$(CFLAGS) \ + -I $(TSEBIN_DIR)\Inc \ + -I $(TSEBIN_DIR)\ + +MEAUTOUPDBin : $(AMIDXELIB) $(FLASHLIB) $(CSP_MEUDLIB) $(BUILD_DIR)\MELib.lib + $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\ + /f $(BUILD_DIR)\AutoUpdate.mak all\ + GUID=39d1830f-259b-4d7e-b1a3-074135b4c934\ + ENTRY_POINT=AUTOUPDEntry\ + "EXT_HEADERS=$(BUILD_DIR)\token.h"\ + TYPE=BS_DRIVER \ + COMPRESS=1 + +$(BUILD_DIR)\MERegion.ffs: $(ME_UPDATE_BINARY_FILE) + $(MAKE) /$(MAKEFLAGS) /f Core\FFS.mak \ + GUID=feaaa7a6-cb95-4670-b499-877fa6ca6bae \ + TYPE=EFI_FV_FILETYPE_FREEFORM \ + BINFILE=$** FFSFILE=$@ COMPRESS=1 NAME=$(**B) + +#********************************************************************** +#********************************************************************** +#** ** +#** (C)Copyright 1985-2010, American Megatrends, Inc. ** +#** ** +#** All Rights Reserved. ** +#** ** +#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +#** ** +#** Phone: (770)-246-8600 ** +#** ** +#********************************************************************** +#**********************************************************************
\ No newline at end of file diff --git a/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.sdl b/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.sdl new file mode 100644 index 0000000..050e758 --- /dev/null +++ b/Core/EM/OFBD/MEUD/MEAU/AutoUpdate.sdl @@ -0,0 +1,103 @@ +TOKEN + Name = "ME_AUTO_UPDATE_SUPPORT" + Value = "0" + Help = "Main switch to enable ReFlash support in Project" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes +End + +PATH + Name = "MEAUPD_DIR" +End + +ELINK + Name = "$(BUILD_DIR)\AutoUpdate.ffs" + Parent = "FV_MAIN" + InvokeOrder = AfterParent +End + +MODULE + Help = "Includes ReFlash.mak to Project" + File = "AutoUpdate.mak" +End + +TOKEN + Name = "REFLASH_UPDATE_ME" + Value = "1" + Help = "Enables/Disables update of the NVRAM flash area.\When REFLASH_INTERACTIVE is on and REFLASH_UPDATE_NVRAM_CONTROL is on\this value can be overriden by the user using setup option." + TokenType = Boolean + TargetH = Yes +End + +TOKEN + Name = "DIRECT_FW_UPDATE" + Value = "1" + Help = "1 = Support Direct ME FW Update , 0 = ME FW full image updated." + TokenType = Boolean + TargetH = Yes + Token = "REFLASH_UPDATE_ME" "=" "1" +End + +TOKEN + Name = "REFLASH_UPDATE_GBE" + Value = "1" + Help = "Enables/Disables update of the NVRAM flash area.\When REFLASH_INTERACTIVE is on and REFLASH_UPDATE_NVRAM_CONTROL is on\this value can be overriden by the user using setup option." + TokenType = Boolean + TargetH = Yes +End + +TOKEN + Name = "REFLASH_UPDATE_MEDS" + Value = "1" + Help = "Enables/Disables update of the NVRAM flash area.\When REFLASH_INTERACTIVE is on and REFLASH_UPDATE_NVRAM_CONTROL is on\this value can be overriden by the user using setup option." + TokenType = Boolean + TargetH = Yes +End + +TOKEN + Name = "REFLASH_UPDATE_FORCE" + Value = "1" + Help = "Enables/Disables update of the NVRAM flash area.\When REFLASH_INTERACTIVE is on and REFLASH_UPDATE_NVRAM_CONTROL is on\this value can be overriden by the user using setup option." + TokenType = Boolean + TargetH = Yes +End + +TOKEN + Name = "ME_UPDATE_BINARY_SIZE" + Value = "8" + TokenType = Integer + TargetH = Yes + Help = "Size in MB of Image." +End + +TOKEN + Name = "ME_UPDATE_BINARY_FILE" + Value = "$(MEAUPD_DIR)\MERegion.BIN" + Help = "Eaglelake BIOS Authenticated Code Module - Production/Release Version." + TokenType = File + TargetMAK = Yes +End + +ELINK + Name = "$(BUILD_DIR)\MERegion.ffs" + Parent = "FV_MAIN" + InvokeOrder = AfterParent +End + +TOKEN + Name = "IMAGE_ME_FW_VERSION" + Value = "{{2},{2},{0},{5}}" + TokenType = Expression + TargetH = Yes + Help = "ME version, {Major, Minor, Patch, Build}." +End + +TOKEN + Name = "ME_UPDATE_DOWNGRADE" + Value = "1" + TokenType = Boolean + TargetH = Yes + Help = "Set to 1, System will auto-update ME even the image in BIOS is old version." +End diff --git a/Core/EM/OFBD/MEUD/MEAU/MERegion.bin b/Core/EM/OFBD/MEUD/MEAU/MERegion.bin Binary files differnew file mode 100644 index 0000000..36bb9c8 --- /dev/null +++ b/Core/EM/OFBD/MEUD/MEAU/MERegion.bin |