summaryrefslogtreecommitdiff
path: root/Core/EM/AMIDebugRx/binaries/LIBS
diff options
context:
space:
mode:
Diffstat (limited to 'Core/EM/AMIDebugRx/binaries/LIBS')
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.cif10
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.mak150
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.sdl9
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/AsmDbgrx64Libs.h202
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.cif11
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.libbin0 -> 12612 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.mak110
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.sdl16
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.cif13
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.libbin0 -> 8834 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.mak133
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.sdl29
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLibX64.libbin0 -> 12232 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLibX64_PI_1_1.libbin0 -> 12222 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib_PI_1_1.libbin0 -> 8830 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLib.mak287
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLib.sdl49
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLibBin.cif14
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/DbgrHelp.c260
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/HostConStatus.c213
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/AMIDbgPortStatusCodeDxe.objbin0 -> 3181 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/AMIDbgPortStatusCodePei.objbin0 -> 1319 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/DummyAmiSerialIO.objbin0 -> 872 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/GetDbgInterfaceDxe.objbin0 -> 1337 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/GetDbgInterfacePei.objbin0 -> 657 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/PeiDbgStatusCode.objbin0 -> 2835 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/StsCodeObjsIA32Rx.cif13
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/AMIDbgPortStatusCodeDxe.objbin0 -> 5036 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/AMIDbgPortStatusCodePei.objbin0 -> 893 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/DummyAmiSerialIO.objbin0 -> 652 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/GetDbgInterfaceDxe.objbin0 -> 1892 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/PeiDbgStatusCode.objbin0 -> 3260 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/StsCodeObjsx64Rx.cif12
-rw-r--r--Core/EM/AMIDebugRx/binaries/LIBS/UsbCableSelect.c180
34 files changed, 1711 insertions, 0 deletions
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.cif b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.cif
new file mode 100644
index 0000000..c9471bc
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.cif
@@ -0,0 +1,10 @@
+<component>
+ name = "DbgrUsbCableSelectLib"
+ category = ModulePart
+ LocalRoot = "Core\EM\AMIDebugRx\binaries\LIBS\"
+ RefName = "DbgrUsbCableSelectLib"
+[files]
+"\DbgrUsbCableSelectLib.mak"
+"\UsbCableSelect.c"
+"\DbgrUsbCableSelectLib.sdl"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.mak b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.mak
new file mode 100644
index 0000000..4b0c304
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.mak
@@ -0,0 +1,150 @@
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (C)Copyright 2009, American Megatrends, Inc. **//
+#//** **//
+#//** All Rights Reserved. **//
+#//** **//
+#//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+#//** **//
+#//** Phone (770)-246-8600 **//
+#//** **//
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+# $Header: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.mak 2 7/17/09 7:15p Madhans $
+#
+# $Revision: 2 $
+#
+# $Date: 7/17/09 7:15p $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.mak $
+#
+# 2 7/17/09 7:15p Madhans
+# DebugRx 1.30.0022
+#
+# 2 7/13/09 2:43p Sudhirv
+# Updated with Coding Standards
+#
+# 1 7/07/09 4:46p Sudhirv
+# Restructure Binaries Created
+#
+# 1 5/01/09 7:48p Madhans
+# AMIDebug Rx Module. Intial Checkin.
+#
+# 2 5/01/09 7:44p Madhans
+#
+# 1 4/29/09 7:51a Sudhirv
+# AMI Debug Rx module created
+#
+# 9 12/12/08 5:13p Madhans
+# USB Redirecion Module.
+#
+# 7 9/07/07 12:07a Madhans
+# 1.07.0008 Eng Release
+#
+# 6 6/13/07 3:38p Madhans
+# Copyright Year updated.
+#
+# 5 3/12/07 6:19p Madhans
+# !!!coding standards!!!!
+#
+# 4 1/22/07 4:14p Madhans
+# 1.04.0002 Binary Version.
+#
+# 3 12/26/06 7:07p Ashrafj
+# Support added to support the Aptio 4.5 x64 EFI BIOS (use latest
+# Host.zip).
+# PEI Debugger in FV_MAIN (use new PEIDEBUGFIXUP).
+# Support added for StatusCode redirection without Debug feature enabled
+# (not working if DXE only and x64 is enabled).
+# Plus, some new SDL tokens defined to support the Aptio 4.5 build
+# process in Debug or non-debug mode.
+# All the components of Debugger eModule in source form.
+#
+# 2 9/22/06 11:33a Ashrafj
+# Removed the previous specific changes made to support the new USB
+# cable, by means of SDL token.
+# New changes made to support the new USB cables by means of providing
+# the USB Standard Device Requests command functions in USB Transport
+# modules, so that the porting engineer can use those in
+# DbgrUsbCableSelectLib library sources.
+#
+#**********************************************************************
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: DbgrUsbCableSelectLib.mak
+#
+# Description: Makefile of Debugger Usb Cable select lib
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+
+!IF "$(USB_DEBUG_TRANSPORT)" == "1"
+AMITransportBin : $(AMIDXELIB) $(BUILD_DIR)\DbgrUsbCableSelectLib.lib
+
+!IF "$(PeiDebugger_SUPPORT)"=="1"
+!IF "$(x64_BUILD)"!="1"
+PeiDbgXportBin : $(BUILD_DIR)\DbgrUsbCableSelectLib.lib
+!ELSE
+PeiDbgXportBin : $(BUILD_DIR)\PeiDbgrUsbCableSelectLib.lib
+PeiDbgXportx64Bin : $(BUILD_DIR)\DbgrUsbCableSelectLib.lib
+!ENDIF
+!ENDIF
+
+!ENDIF
+
+$(BUILD_DIR)\DbgrUsbCableSelectLib.lib : DbgrUsbCableSelectLib
+
+DbgrUsbCableSelectLib : $(BUILD_DIR)\DbgrUsbCableSelectLib.mak DbgrUsbCableSelectLibBin
+
+$(BUILD_DIR)\DbgrUsbCableSelectLib.mak : $(DbgrUsbCableSelectLib_DIR)\$(@B).cif $(DbgrUsbCableSelectLib_DIR)\DbgrUsbCableSelectLib.mak $(BUILD_RULES)
+ $(CIF2MAK) $(DbgrUsbCableSelectLib_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+!IF "$(x64_BUILD)"!="1"
+
+DbgrUsbCableSelectLibBin :
+ @set INCLUDE=%%INCLUDE%%
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\DbgrUsbCableSelectLib.mak all\
+ TYPE=LIBRARY \
+ "EXT_HEADERS=$(BUILD_DIR)\Token.mak" \
+ "CFLAGS = $(CFLAGS) /DALASKA_SUPPORT"
+!ELSE
+
+$(BUILD_DIR)\PeiDbgrUsbCableSelectLib.lib : DbgrUsbCableSelectLib
+
+DbgrUsbCableSelectLibBin :
+ @set INCLUDE=%%INCLUDE%%
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\DbgrUsbCableSelectLib.mak all\
+ TYPE=LIBRARY LIBRARY_NAME=$(BUILD_DIR)\DbgrUsbCableSelectLib.lib\
+ "EXT_HEADERS=$(BUILD_DIR)\Token.mak" \
+ "CFLAGS = $(CFLAGS) /DALASKA_SUPPORT"
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\DbgrUsbCableSelectLib.mak all\
+ BUILD_DIR=$(BUILD_DIR)\IA32\
+ TYPE=PEI_LIBRARY LIBRARY_NAME=$(BUILD_DIR)\PeiDbgrUsbCableSelectLib.lib\
+ "EXT_HEADERS=$(BUILD_DIR)\Token.mak" \
+ "CFLAGS = $(CFLAGS) /DALASKA_SUPPORT"
+!ENDIF
+
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (C)Copyright 2009, American Megatrends, Inc. **//
+#//** **//
+#//** All Rights Reserved. **//
+#//** **//
+#//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+#//** **//
+#//** Phone (770)-246-8600 **//
+#//** **//
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.sdl b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.sdl
new file mode 100644
index 0000000..394be27
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrUsbCableSelectLib.sdl
@@ -0,0 +1,9 @@
+PATH
+ Name = "DbgrUsbCableSelectLib_DIR"
+End
+
+MODULE
+ Help = "Includes DbgrUsbCableSelect.mak to Project"
+ File = "DbgrUsbCableSelectLib.mak"
+End
+
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/AsmDbgrx64Libs.h b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/AsmDbgrx64Libs.h
new file mode 100644
index 0000000..ade7358
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/AsmDbgrx64Libs.h
@@ -0,0 +1,202 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2009, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Header: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/DbgrX64Lib/AsmDbgrx64Libs.h 4 3/13/12 10:52a Sudhirv $
+//
+// $Revision: 4 $
+//
+// $Date: 3/13/12 10:52a $
+//*****************************************************************
+//**********************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/DbgrX64Lib/AsmDbgrx64Libs.h $
+//
+// 4 3/13/12 10:52a Sudhirv
+// [TAG] EIP60224
+// [Category] Improvement
+// [Description] Function implement When broken in SMM, show the register
+// context for 'outside' SMM.
+//
+// [TAG] EIP80406
+// [Category] Improvement
+// [Description] Debugger support for Dynamic pci express base token
+//
+// [TAG] EIP81423
+// [Category] Improvement
+// [Description] VeB Debugger - Improve the EFI tab's Handle Display
+// feature
+//
+// [TAG] EIP84201
+// [Category] Improvement
+// [Description] AMIDebugRx\Debugger Target modules usage of the Port 80
+// must be controlable
+//
+// 3 9/22/10 7:09p Sudhirv
+// 4.6.2_AMIDebugRx_2.01.0026_Beta Release
+//
+// 2 7/17/09 7:15p Madhans
+// DebugRx 1.30.0022
+//
+// 3 7/16/09 3:07p Madhans
+// To fix the Serial Debugger issuel and To do cleanup.
+//
+// 2 7/13/09 2:44p Sudhirv
+// Updated with Coding Standards
+//
+// 1 7/07/09 4:46p Sudhirv
+// Restructure Binaries Created
+//
+// 1 5/01/09 7:48p Madhans
+// AMIDebug Rx Module. Intial Checkin.
+//
+// 1 4/29/09 7:51a Sudhirv
+// AMI Debug Rx module created
+//
+// 3 9/07/07 12:07a Madhans
+// 1.07.0008 Eng Release
+//
+// 7 6/13/07 3:16p Madhans
+// Copyright Year updated.
+//
+// 6 2/23/07 5:34p Madhans
+// EnableMasterPICIRQ function added
+//
+// 5 1/22/07 11:36a Madhans
+// Modification made for Binary Release 1.04.0003.
+//
+// 2 1/05/07 1:05p Ashrafj
+// Latest version 1.04.0001 Beta
+// Known issues from previous 1.04.000 Beta release has been fixed.
+//
+//**********************************************************************
+//*****************************************************************
+//*****************************************************************
+
+//**********************************************************************
+//<AMI_FHDR_START>
+//
+// Name: AsmDbgrx64Libs.h
+//
+// Description: File containing the Prototypes for the library functions
+//
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+
+#include "Efi.h"
+
+UINT8
+DbgrIoRead8 (
+ IN UINT64 Address
+ )
+/*++
+
+Routine Description:
+ Do a one byte IO read
+
+Arguments:
+ Address - IO address to read
+
+Returns:
+ Data read
+
+--*/
+;
+VOID
+DbgrIoWrite8 (
+ IN UINT64 Address,
+ IN UINT8 Data
+ )
+/*++
+
+Routine Description:
+ Do a one byte IO write
+
+Arguments:
+ Address - IO address to write
+ Data - Data to write to Address
+
+Returns:
+ NONE
+
+--*/
+;
+void DbgrDisableInterrupt();
+void DbgrRestoreInterrupt();
+
+void DebugWriteChkPort(UINT8 DbgChkPoint);
+
+UINT32 ReadPCIConfigSpace(IN UINT32 PCIAddr);
+VOID WritePCIConfigSpace(UINT32 PCIAddr,UINT32 Data);
+
+void DisableMasterPICIRQ(UINT8 IrqBit);
+void EnableMasterPICIRQ(UINT8 IrqBit);
+
+#define DISABLE_INTx64 DbgrDisableInterrupt()
+#define RESTORE_INTx64 DbgrRestoreInterrupt()
+
+void DisableDebugFeature(UINTN *pStoreDr7);
+void EnableDebugFeature(UINTN *pLoadDr7);
+
+VOID SetHWBreakpointX64_DR2(UINTN Address);
+VOID DisableIF(VOID);
+VOID EnableIF(VOID);
+void EnableBreakpointOnIO();
+void DisableBreakpointOnIO();
+VOID GetIdtr(VOID *addr);
+
+UINT8 IoReadByte(UINT16 Port);
+VOID IoWriteByte(UINT16 Port, UINT8 Value);
+UINT32 GetCPUInfo0(VOID);
+UINT32 GetCPUInfo4(VOID);
+UINT32 GetCPUInfo8(VOID);
+UINT32 GetVersion(VOID);
+UINT32 GetFeature(VOID);
+UINT8 ReadIoAsm8(UINT16 Port);
+VOID WriteIoAsm8 (UINT16 Port,UINT8 Val);
+UINT16 IoReadWord(UINT16 Port);
+VOID IoWriteWord(UINT16 Port, UINT16 Value);
+UINT32 IoReadDword(UINT16 Port);
+VOID IoWriteDword(UINT16 Port, UINT32 Value);
+VOID SET_SOFTWAREBREAKPOINT();
+
+// For IndirectIO Support
+UINT8 IIoReadByte(UINT16 DataPort, UINT16 IndexPort, UINT16 Port);
+VOID IIoWriteByte(UINT16 DataPort, UINT16 IndexPort, UINT16 Port, UINT8 Value);
+UINT16 IIoReadWord(UINT16 DataPort, UINT16 IndexPort, UINT16 Port);
+VOID IIoWriteWord(UINT16 DataPort, UINT16 IndexPort, UINT16 Port, UINT16 Value);
+UINT32 IIoReadDword(UINT16 DataPort, UINT16 IndexPort, UINT16 Port);
+VOID IIoWriteDword(UINT16 DataPort, UINT16 IndexPort, UINT16 Port, UINT32 Value);
+UINT64 GetCpuTmr();
+
+//EIP 80406 - Debugger support for Dynamic pci express base token
+UINT32 IoRead32(UINT16);
+VOID IoWrite32(UINT16 Port, UINT32 Value);
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2009, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.cif b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.cif
new file mode 100644
index 0000000..329b6ca
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.cif
@@ -0,0 +1,11 @@
+<component>
+ name = "DbgrX64Lib"
+ category = ModulePart
+ LocalRoot = "Core\EM\AMIDebugRx\binaries\LIBS\DbgrX64Lib\"
+ RefName = "DbgrX64Lib"
+[files]
+"DbgrX64Lib.sdl"
+"DbgrX64Lib.mak"
+"DbgrX64Lib.lib"
+"AsmDbgrx64Libs.h"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.lib b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.lib
new file mode 100644
index 0000000..aa1607c
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.lib
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.mak b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.mak
new file mode 100644
index 0000000..80f213a
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.mak
@@ -0,0 +1,110 @@
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (C)Copyright 2009, American Megatrends, Inc. **//
+#//** **//
+#//** All Rights Reserved. **//
+#//** **//
+#//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+#//** **//
+#//** Phone (770)-246-8600 **//
+#//** **//
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+# $Header: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.mak 3 4/20/11 8:59a Sudhirv $
+#
+# $Revision: 3 $
+#
+# $Date: 4/20/11 8:59a $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.mak $
+#
+# 3 4/20/11 8:59a Sudhirv
+# [TAG] EIP58619
+# [Category] Defect
+# [Severity] Major
+# [Symptom] Statuscode 16 and 17 have build errors with USBRedirection
+# [RootCause] StatuscodeRuntimeBin added after Statuscode_15 was having
+# build errors in accessing Dbgrx64 lib functions.
+# [Solution] StatusCodeRuntimeBin build support with DbgrX64Lib.lib
+# [Files] DbgrX64Lib.mak
+#
+# 2 7/17/09 7:15p Madhans
+# DebugRx 1.30.0022
+#
+# 2 7/13/09 2:44p Sudhirv
+# Updated with Coding Standards
+#
+# 1 7/07/09 4:46p Sudhirv
+# Restructure Binaries Created
+#
+# 1 5/01/09 7:48p Madhans
+# AMIDebug Rx Module. Intial Checkin.
+#
+# 1 4/29/09 7:51a Sudhirv
+# AMI Debug Rx module created
+#
+# 2 6/13/07 3:38p Madhans
+# Copyright Year updated.
+#
+# 1 1/22/07 4:14p Madhans
+# 1.04.0002 Binary Version.
+#
+# 2 1/05/07 1:05p Ashrafj
+# Latest version 1.04.0001 Beta
+# Known issues from previous 1.04.000 Beta release has been fixed.
+#
+# 1 12/26/06 7:09p Ashrafj
+# Support added to support the Aptio 4.5 x64 EFI BIOS (use latest
+# Host.zip).
+# PEI Debugger in FV_MAIN (use new PEIDEBUGFIXUP).
+# Support added for StatusCode redirection without Debug feature enabled
+# (not working if DXE only and x64 is enabled).
+# Plus, some new SDL tokens defined to support the Aptio 4.5 build
+# process in Debug or non-debug mode.
+# All the components of Debugger eModule in source form.
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: DbgrX64Lib.mak
+#
+# Description: Common library to support the porting of Debugger to
+# support EFIx64
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+
+!IF "$(PROCESSOR)"=="x64"
+PeiDbgDbgrx64Bin : $(DbgrX64_DIR)\DbgrX64Lib.lib
+PeiDbgXportx64Bin : $(DbgrX64_DIR)\DbgrX64Lib.lib
+PeiDbgDxeCpuLibBin : $(DbgrX64_DIR)\DbgrX64Lib.lib
+#AMIDebuggerBin : $(DbgrX64_DIR)\DbgrX64Lib.lib
+IsaSerialDbgBin : $(DbgrX64_DIR)\DbgrX64Lib.lib
+PeiDbgStatusCodeLibBin : $(DbgrX64_DIR)\DbgrX64Lib.lib
+AMITransportBin : $(DbgrX64_DIR)\DbgrX64Lib.lib
+CORE_DXEBin : $(DbgrX64_DIR)\DbgrX64Lib.lib
+#EIP 58619 - Building issue between UsbRedirection and StatusCode modules (16-17) on HuronRiver project
+StatusCodeRuntimeBin : $(DbgrX64_DIR)\DbgrX64Lib.lib
+!ENDIF
+
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (C)Copyright 2009, American Megatrends, Inc. **//
+#//** **//
+#//** All Rights Reserved. **//
+#//** **//
+#//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+#//** **//
+#//** Phone (770)-246-8600 **//
+#//** **//
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.sdl b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.sdl
new file mode 100644
index 0000000..99c5060
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DbgrX64Lib/DbgrX64Lib.sdl
@@ -0,0 +1,16 @@
+PATH
+ Name = "DbgrX64_DIR"
+End
+
+MODULE
+ Help = "Includes DbgrX64Lib.mak to Project"
+ File = "DbgrX64Lib.mak"
+End
+
+ELINK
+ Name = "Init_AMI_USBDebugPort_HOB,"
+ Parent = "DxeCoreInitialize"
+ Token = "x64_BUILD" "=" "1"
+ InvokeOrder = AfterParent
+End
+
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.cif b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.cif
new file mode 100644
index 0000000..3c3f435
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.cif
@@ -0,0 +1,13 @@
+<component>
+ name = "DebuggerLib"
+ category = ModulePart
+ LocalRoot = "Core\EM\AMIDebugRx\binaries\LIBS\DebuggerLib\"
+ RefName = "DebuggerLib"
+[files]
+"DebuggerLib.sdl"
+"DebuggerLib.mak"
+"DebuggerLib.lib"
+"DebuggerLibX64.lib"
+"DebuggerLib_PI_1_1.lib"
+"DebuggerLibX64_PI_1_1.lib"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.lib b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.lib
new file mode 100644
index 0000000..998b4ee
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.lib
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.mak b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.mak
new file mode 100644
index 0000000..ac53106
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.mak
@@ -0,0 +1,133 @@
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (C)Copyright 2009, American Megatrends, Inc. **//
+#//** **//
+#//** All Rights Reserved. **//
+#//** **//
+#//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+#//** **//
+#//** Phone (770)-246-8600 **//
+#//** **//
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+# $Header: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.mak 4 3/16/11 4:42p Sudhirv $
+#
+# $Revision: 4 $
+#
+# $Date: 3/16/11 4:42p $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.mak $
+#
+# 4 3/16/11 4:42p Sudhirv
+# Changes to Support Older Core before 4.6.5.0
+#
+# 3 3/09/11 8:16a Sudhirv
+# EIP 53658 - AMIDebugRx\Debugger support for PI 1.1
+#
+# 2 7/17/09 7:15p Madhans
+# DebugRx 1.30.0022
+#
+# 2 7/13/09 2:45p Sudhirv
+# Updated with Coding Standards
+#
+# 1 7/07/09 4:46p Sudhirv
+# Restructure Binaries Created
+#
+# 1 5/01/09 7:48p Madhans
+# AMIDebug Rx Module. Intial Checkin.
+#
+# 1 4/29/09 7:51a Sudhirv
+# AMI Debug Rx module created
+#
+# 4 12/12/08 5:14p Madhans
+# USB Redirecion Module.
+#
+# 3 9/07/07 11:14a Madhans
+# 1.07.0008 Eng Release
+#
+# 2 6/13/07 3:38p Madhans
+# Copyright Year updated.
+#
+# 1 3/10/07 2:37p Madhans
+# For 1.05.binary Release.
+#
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: DebuggerLib.mak
+#
+# Description: Library to send Ld image notifications to PEI debugger
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+
+!IFDEF PI_SPECIFICATION_VERSION
+!IF $(PI_SPECIFICATION_VERSION)>=0x00010000
+
+CORE_PEIBin : $(DebuggerLib_DIR)\DebuggerLib_PI_1_1.lib
+
+PeiDebugSupportBin : $(DebuggerLib_DIR)\DebuggerLib_PI_1_1.lib
+
+!IF "$(x64_BUILD)"!="1"
+CORE_DXEBin : $(DebuggerLib_DIR)\DebuggerLib_PI_1_1.lib
+
+!ELSE
+CORE_DXEBin : $(DebuggerLib_DIR)\DebuggerLibX64_PI_1_1.lib
+
+
+!ENDIF
+
+!ELSE
+CORE_PEIBin : $(DebuggerLib_DIR)\DebuggerLib.lib
+
+#!IF "$(DbgPortStatusRedirectionOnly_SUPPORT)" != "1"
+PeiDebugSupportBin : $(DebuggerLib_DIR)\DebuggerLib.lib
+
+!IF "$(x64_BUILD)"!="1"
+CORE_DXEBin : $(DebuggerLib_DIR)\DebuggerLib.lib
+
+!ELSE
+CORE_DXEBin : $(DebuggerLib_DIR)\DebuggerLibX64.lib
+
+
+!ENDIF
+!ENDIF
+!ELSE
+
+CORE_PEIBin : $(DebuggerLib_DIR)\DebuggerLib.lib
+
+#!IF "$(DbgPortStatusRedirectionOnly_SUPPORT)" != "1"
+PeiDebugSupportBin : $(DebuggerLib_DIR)\DebuggerLib.lib
+
+!IF "$(x64_BUILD)"!="1"
+CORE_DXEBin : $(DebuggerLib_DIR)\DebuggerLib.lib
+
+!ELSE
+CORE_DXEBin : $(DebuggerLib_DIR)\DebuggerLibX64.lib
+
+
+!ENDIF
+#!ENDIF
+!ENDIF
+
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (C)Copyright 2009, American Megatrends, Inc. **//
+#//** **//
+#//** All Rights Reserved. **//
+#//** **//
+#//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+#//** **//
+#//** Phone (770)-246-8600 **//
+#//** **//
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.sdl b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.sdl
new file mode 100644
index 0000000..042f87d
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib.sdl
@@ -0,0 +1,29 @@
+PATH
+ Name = "DebuggerLib_DIR"
+End
+
+MODULE
+ Help = "Includes DebuggerLib.mak to Project"
+ File = "DebuggerLib.mak"
+End
+
+ELINK
+ Name = "InitDbgLdImageNotify,"
+ Parent = "DxeCoreInitialize"
+ Token = "REDIRECTION_ONLY_MODE" "!=" "1"
+ Token = "PeiDebugger_SUPPORT" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "PeiDbgSptLdr,"
+ Parent = "PeiCoreInitialize"
+ Token = "PeiDebugger_SUPPORT" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "ReadyToBootFunc,"
+ Parent = "DxeCoreInitialize"
+ InvokeOrder = AfterParent
+End \ No newline at end of file
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLibX64.lib b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLibX64.lib
new file mode 100644
index 0000000..9bfdc32
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLibX64.lib
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLibX64_PI_1_1.lib b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLibX64_PI_1_1.lib
new file mode 100644
index 0000000..e45046a
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLibX64_PI_1_1.lib
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib_PI_1_1.lib b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib_PI_1_1.lib
new file mode 100644
index 0000000..e0b06b4
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/DebuggerLib/DebuggerLib_PI_1_1.lib
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLib.mak b/Core/EM/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLib.mak
new file mode 100644
index 0000000..dedc6d7
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLib.mak
@@ -0,0 +1,287 @@
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (C)Copyright 2009, American Megatrends, Inc. **//
+#//** **//
+#//** All Rights Reserved. **//
+#//** **//
+#//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+#//** **//
+#//** Phone (770)-246-8600 **//
+#//** **//
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+# $Header: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLib.mak 5 3/14/11 9:15p Madhans $
+#
+# $Revision: 5 $
+#
+# $Date: 3/14/11 9:15p $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLib.mak $
+#
+# 5 3/14/11 9:15p Madhans
+# To contribute to CSPLib a function to know if DebugRx is connected or
+# Not connected.
+#
+# 4 9/30/09 8:00p Madhans
+# Updated for 1.31. Refer release notes.
+#
+# 2 7/17/09 7:15p Madhans
+# DebugRx 1.30.0022
+#
+# 6 7/16/09 6:35p Sudhirv
+# Updated the Path to avoid build errors with GENERIC_CABLE_SUPPORT
+#
+# 5 7/16/09 5:20p Madhans
+# Fix for Build error in Peidebugger Off
+#
+# 4 7/16/09 3:07p Madhans
+# To fix the Serial Debugger issuel and To do cleanup.
+#
+# 3 7/15/09 5:56p Madhans
+# X64 Support and clean up.
+#
+# 2 7/13/09 2:43p Sudhirv
+# Updated with Coding Standards
+#
+# 1 7/07/09 4:46p Sudhirv
+# Restructure Binaries Created
+#
+# 1 5/01/09 7:48p Madhans
+# AMIDebug Rx Module. Intial Checkin.
+#
+# 3 5/01/09 7:44p Madhans
+#
+# 2 4/30/09 8:52a Sudhirv
+# Added DummySerialIo for AMI Debug Rx
+#
+# 1 4/29/09 7:51a Sudhirv
+# AMI Debug Rx module created
+#
+# 15 12/12/08 5:13p Madhans
+# USB Redirecion Module.
+#
+# 13 5/21/08 12:26p Madhans
+# To Support New Status Code Lib changes.
+#
+# 12 10/26/07 5:03p Madhans
+# For 1.20.0011 Release
+#
+# 10 6/13/07 3:38p Madhans
+# Copyright Year updated.
+#
+# 9 4/05/07 6:36p Madhans
+# Debugger 1.05.0005
+#
+# 8 3/12/07 6:19p Madhans
+# !!!coding standards!!!!
+#
+# 7 3/10/07 2:36p Madhans
+# For 1.05.binary Release.
+#
+# 6 2/28/07 7:57p Madhans
+# Dbgrhelp.obj kept as source.
+#
+# 5 1/25/07 10:33a Madhans
+# PLATFORM_DIR symbol name canged to _DBG_PLATFORM_DIR as it confilicts
+# with SantaROSA.
+#
+# 4 1/22/07 4:46p Madhans
+# Fixed the build issue.
+#
+# 3 1/22/07 4:14p Madhans
+# 1.04.0002 Binary Version.
+#
+# 7 1/05/07 1:05p Ashrafj
+# Latest version 1.04.0001 Beta
+# Known issues from previous 1.04.000 Beta release has been fixed.
+#
+# 6 12/26/06 7:07p Ashrafj
+# Support added to support the Aptio 4.5 x64 EFI BIOS (use latest
+# Host.zip).
+# PEI Debugger in FV_MAIN (use new PEIDEBUGFIXUP).
+# Support added for StatusCode redirection without Debug feature enabled
+# (not working if DXE only and x64 is enabled).
+# Plus, some new SDL tokens defined to support the Aptio 4.5 build
+# process in Debug or non-debug mode.
+# All the components of Debugger eModule in source form.
+#
+# 5 6/30/06 12:12p Ashrafj
+# Modified to support the redirection of StatusCode debug messages
+# through DXE debugger, which was previously possible only if PEI Debug
+# support is enabled.
+# The PeiDbgStatusCodeLib component's ELINK is now enabled for DXE
+# debugger, without PEI Debug support. This means that StatusCode
+# messages will not cross over the wire until DXE debugger gets control
+# of the target.
+#
+# 4 6/14/06 7:33p Ashrafj
+# Minor build error fix - added dependency of AMIDXELIB
+#
+# 3 3/15/06 7:41p Ashrafj
+# Modfication done to provide the Binary integration for Aptio 4
+# projects.
+#
+# 2 10/20/05 10:07a Felixp
+# missing dependencies added
+#
+# 1 10/19/05 10:54a Felixp
+#
+# 1 10/19/05 10:44a Felixp
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: PeiDbgStatusCodeLib.mak
+#
+# Description: Makefile of pei debugger status code lib
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+STSCODELIB_CFLAGS = /DALASKA_SUPPORT /I $(AMI_DebugRx_DIR)\binaries\PeiAMIDebugRx\INC
+
+BUILD_DBGSTATUSCODE_DIR=$(BUILD_DIR)\$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib
+
+!IF "$(x64_BUILD)"=="1"
+_DBG_PLATFORM_DIR=x64
+!ELSE
+_DBG_PLATFORM_DIR=ia32
+!ENDIF
+
+!IF "$(REDIRECTION_ONLY_MODE)" == "1"
+!IF "$(PeiDebugger_SUPPORT)"=="1"
+DBGSTATUSCODE_OBJS= \
+$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\$(_DBG_PLATFORM_DIR)\PeiDbgStatusCode.obj \
+$(BUILD_DBGSTATUSCODE_DIR)\DbgrHelp.obj \
+$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\$(_DBG_PLATFORM_DIR)\GetDbgInterfaceDxe.obj \
+!IF "$(CONSOLE_REDIRECTION_SUPPORT)" != "1" || "$(REDIRECTION_ONLY_MODE)" != "1"
+$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\$(_DBG_PLATFORM_DIR)\DummyAmiSerialIO.obj
+!ENDIF
+
+IA32_DBGSTATUSCODE_OBJS= \
+$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\IA32\PeiDbgStatusCode.obj \
+$(BUILD_DIR)\IA32\$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\DbgrHelp.obj \
+$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\IA32\GetDbgInterfacePei.obj
+
+!ELSE
+DBGSTATUSCODE_OBJS= \
+$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\$(_DBG_PLATFORM_DIR)\AMIDbgPortStatusCodeDxe.obj\
+!IF "$(CONSOLE_REDIRECTION_SUPPORT)" != "1" || "$(REDIRECTION_ONLY_MODE)" != "1"
+$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\$(_DBG_PLATFORM_DIR)\DummyAmiSerialIO.obj
+!ENDIF
+
+IA32_DBGSTATUSCODE_OBJS= \
+$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\IA32\AMIDbgPortStatusCodePei.obj \
+!ENDIF
+
+!ELSE
+DBGSTATUSCODE_OBJS= \
+$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\$(_DBG_PLATFORM_DIR)\PeiDbgStatusCode.obj \
+$(BUILD_DBGSTATUSCODE_DIR)\DbgrHelp.obj \
+$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\$(_DBG_PLATFORM_DIR)\GetDbgInterfaceDxe.obj \
+!IF "$(CONSOLE_REDIRECTION_SUPPORT)" != "1" || "$(REDIRECTION_ONLY_MODE)" != "1"
+$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\$(_DBG_PLATFORM_DIR)\DummyAmiSerialIO.obj
+!ENDIF
+
+IA32_DBGSTATUSCODE_OBJS= \
+$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\IA32\PeiDbgStatusCode.obj \
+$(BUILD_DIR)\IA32\$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\DbgrHelp.obj \
+$(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\IA32\GetDbgInterfacePei.obj
+!ENDIF
+
+PeiDbgStatusCodeLib : $(BUILD_DIR)\PeiDbgStatusCodeLibBin.mak PeiDbgStatusCodeLibBin DxeDbgStatusCodeLibBin
+
+$(BUILD_DIR)\PeiDbgStatusCodeLibBin.mak : $(PeiDbgStatusCodeLib_DIR)\PeiDbgStatusCodeLibBin.cif $(PeiDbgStatusCodeLib_DIR)\PeiDbgStatusCodeLib.mak $(BUILD_RULES)
+ $(CIF2MAK) $(PeiDbgStatusCodeLib_DIR)\PeiDbgStatusCodeLibBin.cif $(CIF2MAK_DEFAULTS)
+
+!IF "$(x64_BUILD)"!="1"
+
+PEIDBGSTATUSCODELIB = $(BUILD_DIR)\PeiDbgStatusCodeLib.lib
+
+PEIDBGSTATUSCODEPEILIB = $(BUILD_DIR)\PeiDbgStatusCodePeiLib.lib
+
+StatusCodeBin : $(PEIDBGSTATUSCODELIB) $(AMIDXELIB)
+StatusCodePeiBin: $(PEIDBGSTATUSCODEPEILIB)
+StatusCodeDxeBin: $(PEIDBGSTATUSCODELIB)
+
+CORE_DXEBin: $(PEIDBGSTATUSCODELIB) $(AMIDXELIB)
+
+$(PEIDBGSTATUSCODELIB) $(PEIDBGSTATUSCODEPEILIB) : PeiDbgStatusCodeLib
+
+PeiDbgStatusCodeLibBin :
+ @set INCLUDE=%%INCLUDE%%
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\PeiDbgStatusCodeLibBin.mak all\
+ BUILD_DIR=$(BUILD_DIR)\IA32\
+ TYPE=PEI_LIBRARY LIBRARY_NAME=$(PEIDBGSTATUSCODEPEILIB)\
+ "EXT_HEADERS=$(BUILD_DIR)\Token.mak" \
+ "OBJECTS=$(IA32_DBGSTATUSCODE_OBJS)"\
+ "CFLAGS = $(CFLAGS) /DALASKA_SUPPORT /DPEIDBG_BUILD_ONLY $(STSCODELIB_CFLAGS)"
+
+DxeDbgStatusCodeLibBin :
+ @set INCLUDE=%%INCLUDE%%
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\PeiDbgStatusCodeLibBin.mak all\
+ TYPE=LIBRARY LIBRARY_NAME=$(PEIDBGSTATUSCODELIB)\
+ "EXT_HEADERS=$(BUILD_DIR)\Token.mak" \
+ "OBJECTS=$(DBGSTATUSCODE_OBJS)"\
+ "CFLAGS = $(CFLAGS) /DALASKA_SUPPORT $(STSCODELIB_CFLAGS)"
+
+
+!ELSE
+
+PEIDBGSTATUSCODELIB = $(BUILD_DIR)\PeiDbgStatusCodeLib.lib
+PEIDBGSTATUSCODELIBX64 = $(BUILD_DIR)\PeiDbgStatusCodeLibX64.lib
+
+StatusCodeBin : $(PEIDBGSTATUSCODELIB)
+StatusCodeBin : $(PEIDBGSTATUSCODELIBX64)
+StatusCodePeiBin : $(PEIDBGSTATUSCODELIB)
+StatusCodeDxeBin: $(PEIDBGSTATUSCODELIBX64)
+
+$(PEIDBGSTATUSCODELIB) $(PEIDBGSTATUSCODELIBX64) : PeiDbgStatusCodeLib
+
+PeiDbgStatusCodeLibBin :
+ @set INCLUDE=%%INCLUDE%%
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\PeiDbgStatusCodeLibBin.mak all\
+ BUILD_DIR=$(BUILD_DIR)\IA32\
+ TYPE=PEI_LIBRARY LIBRARY_NAME=$(PEIDBGSTATUSCODELIB)\
+ "EXT_HEADERS=$(BUILD_DIR)\Token.mak" \
+ "OBJECTS=$(IA32_DBGSTATUSCODE_OBJS)"\
+ "CFLAGS = $(CFLAGS) /DALASKA_SUPPORT /DPEIDBG_BUILD_ONLY $(STSCODELIB_CFLAGS)"
+
+DxeDbgStatusCodeLibBin :
+ @set INCLUDE=%%INCLUDE%%
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\PeiDbgStatusCodeLibBin.mak all\
+ TYPE=LIBRARY LIBRARY_NAME=$(PEIDBGSTATUSCODELIBX64)\
+ "EXT_HEADERS=$(BUILD_DIR)\Token.mak" \
+ "OBJECTS=$(DBGSTATUSCODE_OBJS)"\
+ "CFLAGS = $(CFLAGS) /DALASKA_SUPPORT $(STSCODELIB_CFLAGS)"
+
+!ENDIF
+
+AMICSPLibBin : $(BUILD_DIR)\HostConStatus.obj
+$(BUILD_DIR)\HostConStatus.obj : $(BUILD_DIR)\Token.mak $(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\HostConStatus.c
+ $(CC) $(C_FLAGS) $(STSCODELIB_CFLAGS) /DALASKA_SUPPORT /c $(PeiDbgStatusCodeLib_DIR)\StatusCodeLib\HostConStatus.c /Fo$@ /FR$(@R).SBR
+
+
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (C)Copyright 2009, American Megatrends, Inc. **//
+#//** **//
+#//** All Rights Reserved. **//
+#//** **//
+#//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+#//** **//
+#//** Phone (770)-246-8600 **//
+#//** **//
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLib.sdl b/Core/EM/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLib.sdl
new file mode 100644
index 0000000..c4dafba
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLib.sdl
@@ -0,0 +1,49 @@
+PATH
+ Name = "PeiDbgStatusCodeLib_DIR"
+End
+
+MODULE
+ Help = "Includes PeiDbgStatusCodeLib.mak to Project"
+ File = "PeiDbgStatusCodeLib.mak"
+End
+
+# (EIP 54793)>
+ELINK
+ Name = "PeiDbgrSendDebugText,"
+ Parent = "ReportStringStatus"
+ InvokeOrder = AfterParent
+ Token = "SEND_DEBUG_MESSAGE_SUPPORT" "=" "1"
+End
+# (EIP 54793)>
+
+ELINK
+ Name = "PeiDbgrSendCheckPoint,"
+ Parent = "ReportSimpleStatus"
+ InvokeOrder = AfterParent
+ Token = "SEND_CHECKPOINT_SUPPORT" "=" "1"
+End
+
+
+ELINK
+ Name = "PeiDbgrSendProgressCode,"
+ Parent = "ReportCheckpoint"
+ InvokeOrder = AfterParent
+ Token = "SEND_CHECKPOINT_SUPPORT" "=" "1"
+ Token = "STATUS_CODE_VERSION" ">=" "15"
+End
+
+
+ELINK
+ Name = " "
+ Parent = "PeiDbgrSendCheckPoint,"
+ InvokeOrder = ReplaceParent
+ Token = "STATUS_CODE_VERSION" ">=" "15"
+ Token = "SEND_CHECKPOINT_SUPPORT" "=" "1"
+End
+
+ELINK
+ Name = "PeiDbgStatusToDBGMsg,"
+ Parent = "ReportSimpleStatus"
+ InvokeOrder = AfterParent
+ Token = "SEND_DEBUG_MESSAGE_SUPPORT" "=" "1"
+End
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLibBin.cif b/Core/EM/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLibBin.cif
new file mode 100644
index 0000000..493510f
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/PeiDbgStatusCodeLibBin.cif
@@ -0,0 +1,14 @@
+<component>
+ name = "PeiDbgStatusCodeLibBin"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\LIBS\"
+ RefName = "PeiDbgStatusCodeLibBin"
+[files]
+"PeiDbgStatusCodeLib.sdl"
+"PeiDbgStatusCodeLib.mak"
+"StatusCodeLib\DbgrHelp.c"
+"StatusCodeLib\HostConStatus.c"
+[parts]
+"StsCodeObjsIa32Rx"
+"StsCodeObjsx64Rx"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/DbgrHelp.c b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/DbgrHelp.c
new file mode 100644
index 0000000..7d75b33
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/DbgrHelp.c
@@ -0,0 +1,260 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2009, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Header: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/StatusCodeLib/DbgrHelp.c 5 3/17/11 7:54a Sudhirv $
+//
+// $Revision: 5 $
+//
+// $Date: 3/17/11 7:54a $
+//*****************************************************************
+//*****************************************************************
+//**********************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/StatusCodeLib/DbgrHelp.c $
+//
+// 5 3/17/11 7:54a Sudhirv
+// Support to Boot with S3 Resume in Core_4.6.5.0
+//
+// 4 3/11/11 8:41a Sudhirv
+// Added support to return Database Address correctly with Cores older
+// than 4.6.4x
+//
+// 3 3/09/11 8:18a Sudhirv
+// EIP 53658 - AMIDebugRx\Debugger support for PI 1.1
+//
+// 2 7/17/09 7:15p Madhans
+// DebugRx 1.30.0022
+//
+// 4 7/16/09 3:07p Madhans
+// To fix the Serial Debugger issuel and To do cleanup.
+//
+// 3 7/15/09 5:56p Madhans
+// Release mode binaries. With S3 resume Off.
+//
+// 2 7/13/09 2:46p Sudhirv
+// Update with Coding Standards
+//
+// 1 7/07/09 4:46p Sudhirv
+// Restructure Binaries Created
+//
+// 1 5/01/09 7:48p Madhans
+// AMIDebug Rx Module. Intial Checkin.
+//
+// 1 4/29/09 7:51a Sudhirv
+// AMI Debug Rx module created
+//
+// 13 12/12/08 5:14p Madhans
+// USB Redirecion Module.
+//
+// 11 6/26/08 3:09p Sudhirv
+// Uploaded after checking coding standards
+//
+// 10 8/29/07 3:49p Madhans
+// To resolve AMD Platfrom issues.
+//
+// 9 8/29/07 12:44p Madhans
+// Common code for 4.x and 3.x
+//
+// 8 6/13/07 3:16p Madhans
+// Copyright Year updated.
+//
+// 7 3/12/07 6:19p Madhans
+// !!!coding standards!!!!
+//
+// 6 3/10/07 2:22p Madhans
+// For non PEI debuggers it should return 0.
+//
+// 5 3/01/07 10:44a Madhans
+// token.h included
+//
+// 4 1/22/07 11:36a Madhans
+// Modification made for Binary Release 1.04.0003.
+//
+// 3 1/05/07 1:05p Ashrafj
+// Latest version 1.04.0001 Beta
+// Known issues from previous 1.04.000 Beta release has been fixed.
+//
+//*****************************************************************
+
+//**********************************************************************
+//<AMI_FHDR_START>
+//
+// Name: DbgrHelp.c
+//
+// Description: File containing the globals for CAR base address & size.
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+
+#include <EFI.h>
+#include <AmiPeiLib.h>
+
+#include "misc.h"
+#include "AMIPeiDebug.h"
+#ifdef ALASKA_SUPPORT
+#include "token.h"
+#else
+#include "tokens.h"
+#endif
+
+//**********************************************************************
+#if defined (PI_SPECIFICATION_VERSION) && (PI_SPECIFICATION_VERSION >= 0x00010000)
+UINTN AMI_PEIDEBUGGER_DS_BASEADDRESS = 0;
+UINTN AMI_PEIDEBUGGER_DS_SIZE = 0x2048;
+#else
+const UINTN AMI_PEIDEBUGGER_DS_BASEADDRESS = PEI_DEBUG_DATASECTION_BASEADDRESS;
+const UINTN AMI_PEIDEBUGGER_DS_SIZE = PEI_DEBUG_DATASECTION_SIZE;
+#endif
+volatile UINT16 gS3ResumeSupport = AMI_DEBUG_RX_IN_S3_SUPPORT;
+
+VOID CPULib_SaveIdt(DESCRIPTOR_TABLE);
+
+UINTN GetCARBaseAddress()
+{
+#if defined (PI_SPECIFICATION_VERSION) && (PI_SPECIFICATION_VERSION >= 0x00010000)
+ EFI_PEI_SERVICES **PeiServices;
+ VOID *PeiDbgData;
+ EFI_GUID mPeiDbgBasePpiGuid = EFI_PEI_DBG_BASEADDRESS_PPI_GUID;
+ EFI_STATUS Status;
+ IDTBASE Idtr;
+
+#ifndef EFIx64
+ _asm{
+ sidt fword ptr Idtr
+ }
+#else
+ CPULib_SaveIdt(&Idtr);
+#endif
+ PeiServices = (EFI_PEI_SERVICES **) (*(UINTN*)(Idtr.IDTBaseAddr - sizeof (UINTN)));
+
+ if (PeiServices == NULL)
+ return (Idtr.IDTBaseAddr); //Point to the area after PEI Services
+ else
+ {
+ Status = (**PeiServices).LocatePpi(
+ PeiServices,
+ &mPeiDbgBasePpiGuid, // GUID
+ 0, // INSTANCE
+ NULL, // EFI_PEI_PPI_DESCRIPTOR
+ &PeiDbgData // PPI
+ );
+ if (!EFI_ERROR(Status))
+ return *((UINTN*)PeiDbgData);
+ else
+ return (Idtr.IDTBaseAddr);
+ }
+#else
+ return AMI_PEIDEBUGGER_DS_BASEADDRESS;
+#endif
+
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: IsAmiDbgrBaseValid
+//
+// Description: It is a function that helps to behave the status
+// code redirection through debugger differently
+// based in SDL tokens in different cases.
+//
+// Input: void
+//
+// Output: UINT8
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+UINT8 IsAmiDbgrBaseValid(void)
+{
+
+#if REDIRECTION_ONLY_MODE
+ return 1;
+#else
+#ifndef AMI_PEI_DEBUG_SUPPORT
+ return 0;
+#else
+// if PEI Debugger is enabled
+#ifdef EFIx64
+ return 0;
+#else
+ IDTBASE Idtr;
+ _asm{
+ sidt fword ptr Idtr
+ }
+#if defined (PI_SPECIFICATION_VERSION) && (PI_SPECIFICATION_VERSION >= 0x00010000)
+ // Doubtful code recheck again
+ if(Idtr.IDTBaseAddr != NULL)
+#else
+ if(Idtr.IDTBaseAddr == AMI_PEIDEBUGGER_DS_BASEADDRESS)
+#endif
+ return 1;
+ else
+ return 0;
+#endif
+#endif
+#endif
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: IsBsp()
+//
+// Description:
+//
+// Input: void
+//
+// Output: UINT8
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT8 IsBsp(void)
+{
+#ifdef EFIx64
+ return 1;
+#else
+ UINT8 IsBsp = 1;
+#define MSR_XAPIC_BASE 0x1B
+#define XAPIC_BASE_BSP_BIT 8
+#define XAPIC_BASE_BSP_BIT_MASK (1 << XAPIC_BASE_BSP_BIT)
+ _asm
+ {
+ mov ecx,MSR_XAPIC_BASE
+ rdmsr
+ and eax,0x100
+ cmp eax,0x100
+ je BSP
+ mov IsBsp,0
+BSP:
+ }
+ return IsBsp;
+#endif
+}
+
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2009, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/HostConStatus.c b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/HostConStatus.c
new file mode 100644
index 0000000..d782224
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/HostConStatus.c
@@ -0,0 +1,213 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2010, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Header: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/StatusCodeLib/HostConStatus.c 2 4/15/11 7:09p Madhans $
+//
+// $Revision: 2 $
+//
+// $Date: 4/15/11 7:09p $
+//
+//*********************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/StatusCodeLib/HostConStatus.c $
+//
+// 2 4/15/11 7:09p Madhans
+// [TAG] EIP58122
+// [Category] Bug Fix
+// [Severity] Minor
+// [Symptom] IsAMIDebugRxConnected() CSPLIB function used in PEI gives
+// build issues.
+// [RootCause] IsAMIDebugRxConnected in PEI case code is incomplete.
+// [Solution] IsAMIDebugRxConnected fixed.
+// [Files] HostConStatus.c
+//
+// 1 3/14/11 9:13p Madhans
+// To contribute CSPLib tO check if DebugRx is connected or Not.
+//
+//*********************************************************************
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: HostConStatus.C
+//
+// Description: Checks whether the target is connected with host or not.
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+#include "efi.h"
+#include "pei.h"
+#include "amidxelib.h"
+#include "Hob.h"
+#ifndef EFIx64
+#include "AMIPeiDebug.h"
+#else
+#include "AMIPeiDebugX64.h"
+#endif
+
+
+BOOLEAN CheckForHostConnectedinPEI (EFI_PEI_SERVICES **PeiServices);
+#define PEI_DBGSUPPORT_DATA_GUID \
+ {0x41cac730, 0xe64e, 0x463b, 0x89, 0x72, 0x25, 0x5e, 0xec, 0x55, 0x55, 0xc2}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: GetEfiConfigurationTableLocal
+//
+// Description: Gets the efi configuration table
+//
+// Input: EFI_SYSTEM_TABLE *, EFI_GUID *
+//
+// Output: void *
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+VOID * GetEfiConfigurationTableLocal(
+ IN EFI_SYSTEM_TABLE *SystemTable,
+ IN EFI_GUID *Guid
+ )
+{
+ EFI_CONFIGURATION_TABLE *Table = SystemTable->ConfigurationTable;
+ UINTN i = SystemTable->NumberOfTableEntries;
+
+ for (;i;--i,++Table)
+ {
+ if (guidcmp(&Table->VendorGuid,Guid)==0) return Table->VendorTable;
+ }
+ return 0;
+}
+
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: IsAMIDebugRxConnected
+//
+// Description: checks whether the target is connected with host or not.
+//
+// Input: EFI_PEI_SERVICES **, EFI_SYSTEM_TABLE *
+//
+// Output: BOOLEAN
+// TRUE: If host is connected
+// FALSE : If host is not connected
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+BOOLEAN IsAMIDebugRxConnected (EFI_PEI_SERVICES **PeiServices, EFI_SYSTEM_TABLE *ST)
+{
+ EFI_STATUS Status = EFI_NOT_FOUND;
+ BOOLEAN RetStatus = FALSE;
+ EFI_GUID HobListGuid = HOB_LIST_GUID;
+ EFI_GUID mPeiDebugDataGuid = PEI_DBGSUPPORT_DATA_GUID;
+ EFI_HOB_MEMORY_ALLOCATION *MemoryHob = NULL;
+ PEIDebugData_T *pPeiDbgDataSection;
+ EFI_PHYSICAL_ADDRESS DSMemoryBaseAddress = 0;
+ SerXPortGblData_T *pSerXPortGblData_T = NULL;
+
+ if (PeiServices == NULL) //For DXE check
+ {
+ MemoryHob = (EFI_HOB_MEMORY_ALLOCATION*)GetEfiConfigurationTableLocal (ST,&HobListGuid);
+ if (MemoryHob)
+ {
+ //Status = FindNextHobByGuid(&mPeiDebugDataGuid,(VOID**)&MemoryHob);
+ for(;;){
+ Status = FindNextHobByType (EFI_HOB_TYPE_MEMORY_ALLOCATION,&MemoryHob);
+ if (EFI_ERROR(Status)) break;
+ if (!guidcmp(&MemoryHob->AllocDescriptor.Name,&mPeiDebugDataGuid)) {
+ DSMemoryBaseAddress = MemoryHob->AllocDescriptor.MemoryBaseAddress;
+ pPeiDbgDataSection = (PEIDebugData_T*) DSMemoryBaseAddress;
+ pSerXPortGblData_T = (SerXPortGblData_T *)pPeiDbgDataSection->XportLocalVar;
+ if (pSerXPortGblData_T->m_IsHostConnected)
+ {
+ RetStatus = TRUE;
+ break;
+ }
+ }
+ }
+ }
+ }
+ else //For PEI Check
+ {
+ RetStatus = CheckForHostConnectedinPEI (PeiServices);
+ }
+ return RetStatus;
+}
+
+//<AMI_PHDR_START>
+//----------------------------------------------------------------------------
+// Procedure: CheckForHostConnectedinPEI
+//
+// Description: checks whether the target is connected with host in PEI
+//
+// Input: void
+//
+// Output: BOOLEAN
+// TRUE: If host is connected
+// FALSE : If host is not connected
+//
+//----------------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+BOOLEAN CheckForHostConnectedinPEI (EFI_PEI_SERVICES **PeiServices)
+{
+ PEIDebugData_T *pData;
+ SerXPortGblData_T *SerData;
+ VOID *FirstHob = NULL;
+ EFI_HOB_MEMORY_ALLOCATION *Hob = NULL;
+ EFI_GUID mPeiDebugDataGuid = PEI_DBGSUPPORT_DATA_GUID;
+
+ //Find PEI Debugger Data section by HOB
+ for((*PeiServices)->GetHobList(PeiServices,&FirstHob);
+ !EFI_ERROR(FindNextHobByType(EFI_HOB_TYPE_MEMORY_ALLOCATION,&FirstHob));
+ )
+ {
+ Hob = (EFI_HOB_MEMORY_ALLOCATION *) FirstHob;
+
+ if (guidcmp (&mPeiDebugDataGuid, &Hob->AllocDescriptor.Name) == 0) {
+ pData = (PEIDebugData_T *)Hob->AllocDescriptor.MemoryBaseAddress;
+ break;
+ }
+ }
+ if(pData == NULL)
+ return FALSE;
+
+ SerData = (SerXPortGblData_T *)(pData->XportLocalVar);
+
+ if(SerData->m_IsHostConnected)
+ {
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2010, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************// \ No newline at end of file
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/AMIDbgPortStatusCodeDxe.obj b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/AMIDbgPortStatusCodeDxe.obj
new file mode 100644
index 0000000..97f4622
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/AMIDbgPortStatusCodeDxe.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/AMIDbgPortStatusCodePei.obj b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/AMIDbgPortStatusCodePei.obj
new file mode 100644
index 0000000..4f01b7d
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/AMIDbgPortStatusCodePei.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/DummyAmiSerialIO.obj b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/DummyAmiSerialIO.obj
new file mode 100644
index 0000000..e89056e
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/DummyAmiSerialIO.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/GetDbgInterfaceDxe.obj b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/GetDbgInterfaceDxe.obj
new file mode 100644
index 0000000..f6e3ddc
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/GetDbgInterfaceDxe.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/GetDbgInterfacePei.obj b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/GetDbgInterfacePei.obj
new file mode 100644
index 0000000..9cf6a2f
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/GetDbgInterfacePei.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/PeiDbgStatusCode.obj b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/PeiDbgStatusCode.obj
new file mode 100644
index 0000000..fae0606
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/PeiDbgStatusCode.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/StsCodeObjsIA32Rx.cif b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/StsCodeObjsIA32Rx.cif
new file mode 100644
index 0000000..0bdcb20
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/ia32/StsCodeObjsIA32Rx.cif
@@ -0,0 +1,13 @@
+<component>
+ name = "StsCodeObjsIa32Rx"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\LIBS\StatusCodeLib\ia32"
+ RefName = "StsCodeObjsIa32Rx"
+[files]
+"PeiDbgStatusCode.obj"
+"GetDbgInterfaceDxe.obj"
+"GetDbgInterfacePei.obj"
+"DummyAmiSerialIO.obj"
+"AMIDbgPortStatusCodePei.obj"
+"AMIDbgPortStatusCodeDxe.obj"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/AMIDbgPortStatusCodeDxe.obj b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/AMIDbgPortStatusCodeDxe.obj
new file mode 100644
index 0000000..960321c
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/AMIDbgPortStatusCodeDxe.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/AMIDbgPortStatusCodePei.obj b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/AMIDbgPortStatusCodePei.obj
new file mode 100644
index 0000000..e1d01bf
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/AMIDbgPortStatusCodePei.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/DummyAmiSerialIO.obj b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/DummyAmiSerialIO.obj
new file mode 100644
index 0000000..02fac5f
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/DummyAmiSerialIO.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/GetDbgInterfaceDxe.obj b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/GetDbgInterfaceDxe.obj
new file mode 100644
index 0000000..015cc2f
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/GetDbgInterfaceDxe.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/PeiDbgStatusCode.obj b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/PeiDbgStatusCode.obj
new file mode 100644
index 0000000..01a5ccc
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/PeiDbgStatusCode.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/StsCodeObjsx64Rx.cif b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/StsCodeObjsx64Rx.cif
new file mode 100644
index 0000000..e10ed22
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/StatusCodeLib/x64/StsCodeObjsx64Rx.cif
@@ -0,0 +1,12 @@
+<component>
+ name = "StsCodeObjsx64Rx"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\LIBS\StatusCodeLib\x64"
+ RefName = "StsCodeObjsx64Rx"
+[files]
+"PeiDbgStatusCode.obj"
+"GetDbgInterfaceDxe.obj"
+"DummyAmiSerialIO.obj"
+"AMIDbgPortStatusCodePei.obj"
+"AMIDbgPortStatusCodeDxe.obj"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/LIBS/UsbCableSelect.c b/Core/EM/AMIDebugRx/binaries/LIBS/UsbCableSelect.c
new file mode 100644
index 0000000..d67bec5
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/LIBS/UsbCableSelect.c
@@ -0,0 +1,180 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2009, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+// $Header: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/UsbCableSelect.c 3 9/29/11 3:21p Madhans $
+//
+// $Revision: 3 $
+//
+// $Date: 9/29/11 3:21p $
+//*****************************************************************
+//*****************************************************************
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/LIBS/UsbCableSelect.c $
+//
+// 3 9/29/11 3:21p Madhans
+// File revision # 2 Comments corrected.
+//
+// 2 7/17/09 7:15p Madhans
+// DebugRx 1.30.0022
+//
+// 2 7/13/09 2:43p Sudhirv
+// Updated with Coding Standards
+//
+// 1 7/07/09 4:46p Sudhirv
+// Restructure Binaries Created
+//
+// 1 5/01/09 7:48p Madhans
+// AMIDebug Rx Module. Intial Checkin.
+//
+// 1 4/29/09 7:51a Sudhirv
+// AMI Debug Rx module created
+//
+// 8 3/27/09 8:24a Sudhirv
+// Updated Coding Standards.
+//
+// 7 8/29/07 12:45p Madhans
+// Common code for 4.x and 3.x
+//
+// 6 6/13/07 3:16p Madhans
+// Copyright Year updated.
+//
+// 5 1/22/07 11:36a Madhans
+// Modification made for Binary Release 1.04.0003.
+//
+// 3 1/05/07 1:05p Ashrafj
+// Latest version 1.04.0001 Beta
+// Known issues from previous 1.04.000 Beta release has been fixed.
+//
+// 2 9/21/06 6:40p Ashrafj
+// Remove the specific changes made previously to support for the USB File transfer
+// Cable, which was provided by means of SDL token support
+// and instead provided the USB Device Request command interface to the
+// DbgrUsbCableSelectLib, so any new cables support can be added through
+// this library.
+//
+// 1 9/13/06 6:54p Ashrafj
+// New Usb Cable support (Multi-LinQ Usb 2.0 cable) added. The usage of
+// this cable is based on new SDL token named USE_ALI_5632_CTRL_USB2_CABLE is
+// added, along with new library named DbgrUsbCableSelectLib. This library
+// is common for both PEI and DXE Transport modules to select between 2
+// USB cables.
+//
+//*****************************************************************
+
+//<AMI_FHDR_START>
+//--------------------------------------------------------------------
+//
+// Name: UsbCableSelect.c
+//
+// Description: DbgrUsbCableSelectLib library source file.
+//
+//--------------------------------------------------------------------
+//<AMI_FHDR_END>
+
+//--------------------------------------------------------------------
+#include <Efi.h>
+#ifdef ALASKA_SUPPORT
+#include "token.h"
+#else
+#include "tokens.h"
+#endif
+//--------------------------------------------------------------------
+//
+// The following functions are from the USB Transport module, to INIT USB
+// Cable Device.
+//
+EFI_STATUS InitUsb2DebugCableDevice();
+EFI_STATUS SetFeature(UINT16 FeatureSelector);
+EFI_STATUS SetAddress(UINT8 Addr);
+EFI_STATUS SetConfiguration(UINT16 ConfigValue);
+void UpdateBulkTransferEndpoints(UINT8 InEndpoint, UINT8 OutEndpoint);
+//--------------------------------------------------------------------
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: Init_ALi5632Ctrl_Usb2Cable
+//
+// Description: Sets ALi 5632 Controller USB Cable device address
+// and issues configuration commands.
+// This is left as an example for porting engineer.
+//
+// Input: UINT8 Addr
+//
+// Output: EFI_STATUS
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+#if USE_ALI_5632_CTRL_USB2_CABLE
+
+EFI_STATUS Init_ALi5632Ctrl_Usb2Cable(UINT8 Addr)
+{
+ EFI_STATUS Status = EFI_NOT_FOUND;
+ Status = SetAddress(Addr);
+ if(Status == EFI_SUCCESS){
+
+ Status = SetConfiguration(1);
+
+ //update the globals for bulk transfer endpoints
+ UpdateBulkTransferEndpoints(1,2);
+ }
+
+ return Status;
+}
+
+#endif
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: InitUsbCableDevice()
+//
+// Description: To select between Usb 2.0 Debug Cable device or any
+// other OEM specific USB 2.0 USB cable like ALi 5632 Usb2.0 Cable.
+//
+// Input: None
+//
+// Output: EFI_STATUS
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+EFI_STATUS InitUsbCableDevice()
+{
+#if USE_ALI_5632_CTRL_USB2_CABLE
+ //
+ //This is just left as an example to porting Engineer
+ //
+ return Init_ALi5632Ctrl_Usb2Cable(MULTI_LINQ_USB2_DEVICE_ADDRESS);
+#else
+ return InitUsb2DebugCableDevice();
+#endif
+}
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2009, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//