summaryrefslogtreecommitdiff
path: root/Core/EM/AMIDebugRx
diff options
context:
space:
mode:
authorraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
committerraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
commitb7c51c9cf4864df6aabb99a1ae843becd577237c (patch)
treeeebe9b0d0ca03062955223097e57da84dd618b9a /Core/EM/AMIDebugRx
downloadzprj-b7c51c9cf4864df6aabb99a1ae843becd577237c.tar.xz
init. 1AQQW051HEADmaster
Diffstat (limited to 'Core/EM/AMIDebugRx')
-rw-r--r--Core/EM/AMIDebugRx/AMIDebugRx.chmbin0 -> 99141 bytes
-rw-r--r--Core/EM/AMIDebugRx/AMIDebugRx.cif11
-rw-r--r--Core/EM/AMIDebugRx/AMIDebugRx.mak88
-rw-r--r--Core/EM/AMIDebugRx/AMIDebugRx.sd66
-rw-r--r--Core/EM/AMIDebugRx/AMIDebugRx.sdl34
-rw-r--r--Core/EM/AMIDebugRx/AMIDebugRx.unibin0 -> 5718 bytes
-rw-r--r--Core/EM/AMIDebugRx/DebugRx.cif18
-rw-r--r--Core/EM/AMIDebugRx/DebugRx.sdl121
-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
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/DBGR/DbgrHdr.c357
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/DBGR/mindbgr.objbin0 -> 1690 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/IDT/emptyidt.objbin0 -> 549 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/AMIpeidebug.h469
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/AMIpeidebugX64.h509
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/EHCI.h244
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/INC.cif11
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/misc.h178
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/MAIN/PeiDbgMain.ffsbin0 -> 958 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/MAIN/PeiDbgMain_PI_1_1.ffsbin0 -> 926 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiAMIDebugRx.cif18
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiAMIDebugRx.sdl44
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.cif12
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.dxs57
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.mak136
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.sdl22
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.cif11
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.dxs59
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.mak112
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.sdl22
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgMain.cif10
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgMain.sdl55
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.c390
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.cif12
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.dxs60
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.mak176
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.sdl51
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPortUSB.objbin0 -> 1421 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.cif14
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.dxs59
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.mak160
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.sdl32
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/AmiDebugPort.objbin0 -> 1881 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/CopyDbgXPortUsb.objbin0 -> 727 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/DbgrHelp.c168
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/DebugPortUsb.objbin0 -> 1217 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/EmptyNotify.objbin0 -> 1248 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/Emptyrelocdbgidt.objbin0 -> 1315 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDbgSupportX64.objbin0 -> 4231 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDbgSupportX64_PI_1_1.objbin0 -> 4315 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.cif23
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.dxs54
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.mak191
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.objbin0 -> 1857 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.sdl24
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport_PI_1_1.objbin0 -> 1781 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/emptyX64idt.objbin0 -> 848 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/relocdbg.objbin0 -> 5592 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/relocdbg_PI_1_1.objbin0 -> 5688 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/UsbDebugPort.objbin0 -> 11962 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/transport.objbin0 -> 3723 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/usb_acc.objbin0 -> 1826 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/usb_xp.objbin0 -> 5159 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/xp_layer.objbin0 -> 8805 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/PeiXportDbgr.cif12
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/PeiXportRedir.cif12
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/UsbDebugPort.objbin0 -> 11966 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/transport.objbin0 -> 3683 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/usb_acc.objbin0 -> 1830 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/usb_xp.objbin0 -> 4310 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/xp_layer.objbin0 -> 8290 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/XportHdr.c454
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.cif11
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.dxs60
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.mak125
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.sdl35
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/mindbgr.objbin0 -> 2117 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/UsbDebugPort.objbin0 -> 13845 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/transport.objbin0 -> 2689 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/usb_acc.objbin0 -> 1494 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/usb_xp.objbin0 -> 7235 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/xp_layer.objbin0 -> 11340 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.cif14
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.dxs59
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.mak139
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.sdl34
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiXportDbgrx64.cif12
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiXportx64Redir.cif12
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/UsbDebugPort.objbin0 -> 13853 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/transport.objbin0 -> 2604 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/usb_acc.objbin0 -> 1502 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/usb_xp.objbin0 -> 6059 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/xp_layer.objbin0 -> 11241 bytes
-rw-r--r--Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/XportHdr.c445
126 files changed, 7213 insertions, 0 deletions
diff --git a/Core/EM/AMIDebugRx/AMIDebugRx.chm b/Core/EM/AMIDebugRx/AMIDebugRx.chm
new file mode 100644
index 0000000..257131c
--- /dev/null
+++ b/Core/EM/AMIDebugRx/AMIDebugRx.chm
Binary files differ
diff --git a/Core/EM/AMIDebugRx/AMIDebugRx.cif b/Core/EM/AMIDebugRx/AMIDebugRx.cif
new file mode 100644
index 0000000..9dc6679
--- /dev/null
+++ b/Core/EM/AMIDebugRx/AMIDebugRx.cif
@@ -0,0 +1,11 @@
+<component>
+ name = "AMI Debug Rx"
+ category = eModule
+ Rank = 46
+ LocalRoot = "Core\em\AMIDebugRx\"
+ RefName = "AMIDebugRx"
+[files]
+"AMIDebugRx.sdl"
+[parts]
+"DebugRx"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/AMIDebugRx.mak b/Core/EM/AMIDebugRx/AMIDebugRx.mak
new file mode 100644
index 0000000..93f67fe
--- /dev/null
+++ b/Core/EM/AMIDebugRx/AMIDebugRx.mak
@@ -0,0 +1,88 @@
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (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/AMIDebugRx.mak 3 8/28/12 8:59a Sudhirv $Revision: 1 $
+#
+# $Date: 8/28/12 8:59a $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/BIN/Modules/AMIDebugRx/AMIDebugRx.mak $(BUILD_DIR)\AMIDebugRx.mak
+#
+# 3 8/28/12 8:59a Sudhirv
+# Updated for AMI Debug for UEFI 2.04.0073 Label
+#
+# 2 7/17/09 7:15p Madhans
+# DebugRx 1.30.0022
+#
+# 2 7/13/09 2:41p Sudhirv
+# Updated with Coding Standards
+#
+# 1 7/07/09 4:45p Sudhirv
+# Restructure Binaries Created
+#
+# 2 4/29/09 8:05a Sudhirv
+# Updated
+#
+# 1 4/29/09 7:51a Sudhirv
+# AMI Debug Rx module created
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: AMIDebugRx_mak
+#
+# Description: Make file for the USB Redirection component
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+!IF "$(AMI_DEBUGGER_SUPPORT)"!="1" && "$(USB_REDIRECTION_SUPPORT)"!="1" && "$(AMIDEBUG_RX_SUPPORT)"=="1" && "$(PeiDebugger_SUPPORT)"=="0"
+!ERROR AMIDEBUG_RX_SUPPORT requires the PeiDebugger_SUPPORT SDL token to be 1.\
+ AMIDebugRx requires the PeiDebugger_SUPPORT SDL token to be enabled.
+!ENDIF
+
+!IF "$(AMI_DEBUGGER_SUPPORT)"!="1" && "$(USB_REDIRECTION_SUPPORT)"!="1" && "$(AMIDEBUG_RX_SUPPORT)"=="1" && "$(USB_DEBUG_TRANSPORT)"=="0"
+!ERROR AMIDEBUG_RX_SUPPORT requires the USB_DEBUG_TRANSPORT SDL token to be 1.\
+ AMIDebugRx requires the USB_DEBUG_TRANSPORT SDL token to be enabled.
+!ENDIF
+
+all : AMIDebugRx
+
+AMIDebugRx : $(BUILD_DIR)\AMIDebugRx.mak
+
+$(BUILD_DIR)\AMIDebugRx.mak : $(AMI_DebugRx_DIR)\$(@B).cif $(AMI_DebugRx_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(AMI_DebugRx_DIR)\DebugRx.cif $(CIF2MAK_DEFAULTS)
+
+SetupSdbs : AMIDebugRxSDB
+
+AMIDebugRxSDB : $(BUILD_DIR)\AMIDebugRx.mak
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\AMIDebugRx.mak all\
+ TYPE=SDB NAME=AMIDebugRx STRING_CONSUMERS=$(AMI_DebugRx_DIR)\AMIDebugRx.sd
+
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (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/AMIDebugRx.sd b/Core/EM/AMIDebugRx/AMIDebugRx.sd
new file mode 100644
index 0000000..75ff84a
--- /dev/null
+++ b/Core/EM/AMIDebugRx/AMIDebugRx.sd
@@ -0,0 +1,66 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/AMIDebugRx.sd 4 7/17/09 7:19p Madhans $
+//
+// $Revision: 4 $
+//
+// $Date: 7/17/09 7:19p $
+//**********************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/AMIDebugRx.sd $
+//
+// 4 7/17/09 7:19p Madhans
+// Fix the Header
+//
+//**********************************************************************
+//<AMI_FHDR_START>
+//
+// Name: USBRedirection.sd
+//
+// Description: This is the setup page which displays the message if AMI
+// Debug Rx is Enabled or not.
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+
+#ifdef ADVANCED_FORM_SET
+
+ #ifdef FORM_SET_ITEM
+
+ SUBTITLE(STRING_TOKEN(STR_AMI_DEBUG_RX_PRESENT))
+
+ SEPARATOR
+
+ #endif //ifdef FORM_SET_FORM
+
+#endif //ifdef ADVANCED_FORM_SET
+
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/AMIDebugRx.sdl b/Core/EM/AMIDebugRx/AMIDebugRx.sdl
new file mode 100644
index 0000000..c3ad8bb
--- /dev/null
+++ b/Core/EM/AMIDebugRx/AMIDebugRx.sdl
@@ -0,0 +1,34 @@
+TOKEN
+ Name = "AMIDEBUG_RX_SUPPORT"
+ Value = "1"
+ Help = "Main switch to enable Ami Debug Rx Module."
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ TargetH = Yes
+ Master = Yes
+End
+
+TOKEN
+ Name = "DEBUGGER_MAJOR_VERSION"
+ Value = "2"
+ TokenType = Integer
+ TargetEQU = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "DEBUGGER_MINOR_VERSION"
+ Value = "04"
+ TokenType = Integer
+ TargetEQU = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "DEBUGGER_BUILD"
+ Value = "0074"
+ TokenType = Integer
+ TargetEQU = Yes
+ TargetH = Yes
+End
diff --git a/Core/EM/AMIDebugRx/AMIDebugRx.uni b/Core/EM/AMIDebugRx/AMIDebugRx.uni
new file mode 100644
index 0000000..6d10b49
--- /dev/null
+++ b/Core/EM/AMIDebugRx/AMIDebugRx.uni
Binary files differ
diff --git a/Core/EM/AMIDebugRx/DebugRx.cif b/Core/EM/AMIDebugRx/DebugRx.cif
new file mode 100644
index 0000000..b5e7279
--- /dev/null
+++ b/Core/EM/AMIDebugRx/DebugRx.cif
@@ -0,0 +1,18 @@
+<component>
+ name = "DebugRx"
+ category = ModulePart
+ LocalRoot = "Core\EM\AMIDebugRx\"
+ RefName = "DebugRx"
+[files]
+"AMIDebugRx.chm"
+"AMIDebugRx.mak"
+"AMIDebugRx.sd"
+"AMIDebugRx.uni"
+"DebugRx.sdl"
+[parts]
+"PeiAMIDebugRx"
+"PeiDbgStatusCodeLibBin"
+"DbgrUsbCableSelectLib"
+"DbgrX64Lib"
+"DebuggerLib"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/DebugRx.sdl b/Core/EM/AMIDebugRx/DebugRx.sdl
new file mode 100644
index 0000000..7c96ea5
--- /dev/null
+++ b/Core/EM/AMIDebugRx/DebugRx.sdl
@@ -0,0 +1,121 @@
+TOKEN
+ Name = "SEND_CHECKPOINT_SUPPORT"
+ Value = "1"
+ Help = "Token to enable/disable Checkpoint sending support."
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SEND_DEBUG_MESSAGE_SUPPORT"
+ Value = "1"
+ Help = "Main switch to enable/disable Debug messages redirection"
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "REDIRECTION_ONLY_MODE"
+ Value = "1"
+ Help = "Internal Switch to control the Redirection only support withing the modules. Please don't change it."
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "PeiDebugger_SUPPORT"
+ Value = "1"
+ Help = "Can be changed only if debugger/USBRedirction module is present. Main switch to enable Pei Debugger support in Project."
+ TokenType = Boolean
+ TargetMAK = Yes
+End
+
+TOKEN
+ Name = "USB_DEBUG_TRANSPORT"
+ Value = "1"
+ Help = "Can be changed only if debugger/USBRedirction module is present. Main token switch to enable the USB Debug Port interface\installation into the project.\Disable this switch if Serial or Generic USB Cable interface is desired."
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "AMI_DEBUG_RX_IN_S3_SUPPORT"
+ Value = "0"
+ Help = "SDL token to have AMI Debug RX support in S3 Resume. "
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT"
+ Value = "0"
+ Help = "SDL token to have Debugger related ffs in FV_MAIN or FV_BB. "
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "S3_BASE_MEMORY_SIZE"
+ Value = "0x100000"
+ Help = "Number of bytes for S3 resume base memory."
+ TokenType = Integer
+ TargetH = Yes
+ Range = "0x40000 = 256K, increase/decrease it in units of 0x1000 = 4K"
+ Token = "AMI_DEBUG_RX_IN_S3_SUPPORT" "=" "1"
+End
+
+TOKEN
+ Name = "DBG_WRITE_IO_SUPPORT"
+ Value = "1"
+ Help = "Main token switch to enable Write IO support from Debugger User."
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+ Token = "REDIRECTION_ONLY_MODE" "!=" "1"
+End
+
+TOKEN
+ Name = "DBG_WRITE_IO_80_SUPPORT"
+ Value = "1"
+ Help = "Token switch to 1:Enable\0:Disable the port 80 checkpoints from AMIDebugRx\Debugger modules."
+ TokenType = Boolean
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+PATH
+ Name = "AMI_DebugRx_DIR"
+End
+
+MODULE
+ Help = "Includes AMIDebugRx.mak to Project"
+ File = "AMIDebugRx.mak"
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\AMIDebugRx.sdb"
+ Parent = "SETUP_SDBS"
+ Priority = 50
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(AMI_DebugRx_DIR)\AMIDebugRx.sd"
+ Parent = "SETUP_DEFINITIONS"
+ Priority = 50
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "/D AMI_DEBUGRx_SUPPORT"
+ Parent = "CFLAGS"
+ InvokeOrder = AfterParent
+End
+
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 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/DBGR/DbgrHdr.c b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/DBGR/DbgrHdr.c
new file mode 100644
index 0000000..d0b4a2e
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/DBGR/DbgrHdr.c
@@ -0,0 +1,357 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/DBGR/DbgrHdr.c 11 4/04/12 4:56p Sudhirv $
+//
+// $Revision: 11 $
+//
+// $Date: 4/04/12 4:56p $
+//*****************************************************************
+//*****************************************************************
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/DBGR/DbgrHdr.c $
+//
+// 11 4/04/12 4:56p Sudhirv
+// To Avoid Build errors in special cases.
+//
+// 10 4/03/12 4:43p Sudhirv
+// To avoid Build errors for redirection modes.
+//
+// 9 3/27/12 12:02p Sudhirv
+// [TAG] EIP80406
+// [Category] Improvement
+// [Description] Debugger support for Dynamic pci express base token
+//
+// 8 3/13/12 10:47a 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
+//
+// 7 8/19/11 8:28p Sudhirv
+// Fix To get PCIExBaseaddress correctly for ReadPCI.
+//
+// 6 7/22/11 12:19p Sudhirv
+// [TAG] Compilation Error
+// [Description] To avoid Compilation errors in some Projects.
+// [Files] DbgrHdr.c
+//
+// 5 7/12/11 5:23p Sudhirv
+// [TAG] SMM Info
+// [Category] New Feature
+// [Description] To support send SMM Info to host
+//
+// 4 3/17/11 7:57a Sudhirv
+// Support to Boot with S3 Resume in Core_4.6.5.0
+//
+// 3 3/09/11 8:21a 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:49p 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:52a Sudhirv
+// AMI Debug Rx module created
+//
+// 8 3/27/09 8:38a Sudhirv
+// Updated Coding Standards.
+//
+// 7 8/29/07 12:47p Madhans
+// Common code for 4.x and 3.x
+//
+// 6 6/13/07 3:16p Madhans
+// Copyright Year updated.
+//
+// 5 2/27/07 5:01p Madhans
+//
+//*****************************************************************
+
+//**********************************************************************
+//<AMI_FHDR_START>
+//
+// Name: DbgrHdr.c
+//
+// Description: File containing the globals for CAR base address & size.
+// Also the code which make use of this so that it can be
+// integrated as it is Debugger eModule of binary.
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+
+#include "pei.h"
+#include "misc.h"
+#include "AMIPeiDebug.h"
+//**********************************************************************
+#ifdef ALASKA_SUPPORT
+#define CAR_Start_Addr PEI_DEBUG_DATASECTION_BASEADDRESS // CAR Size = 8k
+#define CAR_End_Addr PEI_DEBUG_DATASECTION_BASEADDRESS + PEI_DEBUG_DATASECTION_SIZE
+#define Code_Start_Addr 0xffffffff - FLASH_SIZE
+#define Code_End_Addr 0xffffffff
+#else
+#define CAR_Start_Addr DATA_STACK_BASEADDRESS // CAR Size = 64k
+#define CAR_End_Addr (DATA_STACK_BASEADDRESS | 0x10000)
+#define Code_Start_Addr 0xffdfffff // Max BootBlock Size = 4Gig - 2MB
+#define Code_End_Addr 0xffffffff
+#endif
+
+#ifndef SW_SMI_IO_ADDRESS
+#define SW_SMI_IO_ADDRESS 0
+#endif
+#ifndef SMM_BASE_SAVE_STATE_OFFSET
+#define SMM_BASE_SAVE_STATE_OFFSET 0
+#endif
+#ifndef MAX_SMM_SAVE_STATE_SIZE
+#define MAX_SMM_SAVE_STATE_SIZE 0
+#endif
+#ifndef SMM_BSP_BASE
+#define SMM_BSP_BASE 0
+#endif
+#ifndef TSEG_SIZE
+#define TSEG_SIZE 0
+#endif
+#ifndef PCIEX_BASE_ADDRESS
+#define PCIEX_BASE_ADDRESS 0
+#endif
+#ifndef DYNAMIC_PCIEXBASE_SUPPORT
+#define DYNAMIC_PCIEXBASE_SUPPORT 0
+#endif
+#ifndef DBG_WRITE_IO_SUPPORT
+#define DBG_WRITE_IO_SUPPORT 0
+#endif
+#ifndef DBG_WRITE_IO_80_SUPPORT
+#define DBG_WRITE_IO_80_SUPPORT 0
+#endif
+
+//To support send SMM Info to host
+volatile UINT16 gSMIIOAddress = SW_SMI_IO_ADDRESS;
+volatile UINTN gSMMBaseSaveState = SMM_BASE_SAVE_STATE_OFFSET;
+volatile UINTN gSMMSaveStateSize = MAX_SMM_SAVE_STATE_SIZE;
+volatile UINTN gSMMBspBase = SMM_BSP_BASE;
+volatile UINTN gTsegSize = TSEG_SIZE;
+//**********************************************************************
+
+volatile UINTN gPCIEXBaseAddress = PCIEX_BASE_ADDRESS;
+
+//EIP 80406 - Debugger support for Dynamic pci express base token
+#ifdef DYNAMIC_PCIEXBASE_SUPPORT
+volatile UINTN gDynamicPCIExBase = DYNAMIC_PCIEXBASE_SUPPORT;
+#else
+volatile UINTN gDynamicPCIExBase = 0;
+#endif
+
+volatile UINTN gDbgWriteIOSupport = DBG_WRITE_IO_SUPPORT;
+volatile UINTN gDbgWriteIO80Support = DBG_WRITE_IO_80_SUPPORT;
+
+//**********************************************************************
+//<AMI_SHDR_START>
+//
+// Name: PeiDbgDataSection of type PEI_DBG_DATA_SECTION
+//
+// Description: The following global data structure is for relocation purpose
+// in order to support debugging after the debugger data section
+// is relocated. This second parameter of the data structure has
+// to be updated by the debugger service PEIM to point to relocated
+// data section into memory.The code section has this module
+// has to relocated before the update of second parameter.
+//
+//<AMI_SHDR_END>
+//**********************************************************************
+#if defined (PI_SPECIFICATION_VERSION) && (PI_SPECIFICATION_VERSION >= 0x00010000)
+PEI_DBG_DATA_SECTION PeiDbgDataSection = {
+ "DBGR",
+ 0 //This will be updated by debugger service PEIM
+}; //after the DBgr data section is relocated to memory from CAR
+#else
+PEI_DBG_DATA_SECTION PeiDbgDataSection = {
+ "DBGR",
+ PEI_DEBUG_DATASECTION_BASEADDRESS //This will be updated by debugger service PEIM
+}; //after the DBgr data section is relocated to memory from CAR
+
+#endif
+
+UINTN GetCARBaseAddress()
+{
+ EFI_PEI_SERVICES **PeiServices;
+ VOID *PeiDbgData;
+ EFI_GUID mPeiDbgBasePpiGuid = EFI_PEI_DBG_BASEADDRESS_PPI_GUID;
+ EFI_STATUS Status;
+
+ if((PeiDbgDataSection.DATABASEADDRESS)==NULL)
+ {
+ IDTBASE Idtr;
+ _asm{
+ sidt fword ptr Idtr
+ }
+ 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((UINTN)PeiDbgDataSection.DATABASEADDRESS);
+ }
+}
+
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: IsDbgrInCAR
+//
+// Description: Internal Helper function.
+//
+// Input: none
+//
+// Output: 1 - yes or 0 - no (UINT32)
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT32 IsDbgrInCAR()
+{
+#if defined (PI_SPECIFICATION_VERSION) && (PI_SPECIFICATION_VERSION >= 0x00010000)
+ if((PeiDbgDataSection.DATABASEADDRESS)==NULL)
+#else
+ if(PEI_DEBUG_DATA_BASEADDRESS == PEI_DEBUG_DATASECTION_BASEADDRESS)
+#endif
+ return 1; //yes
+ else
+ return 0; //no
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: IsAddrValidInCAR
+//
+// Description: Internal Helper function.
+//
+// Input: UINT64 Addr
+//
+// Output: 1 - TRUE OR 0 - FALSE (INTN)
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+INTN IsAddrValidInCAR (UINT64 Addr) {
+
+ if (Addr >= CAR_Start_Addr && Addr <= CAR_End_Addr)
+ return(1);
+ else
+ return(0);
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: IsAddrValidInCode
+//
+// Description: Internal Helper function.
+//
+// Input: UINT64 Addr
+//
+// Output: 1 OR 0 (INTN)
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+INTN IsAddrValidInCode (UINT64 Addr) {
+
+ if (Addr >= Code_Start_Addr && Addr <= Code_End_Addr)
+ return(1);
+ else
+ return(0);
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: Get_CAR_EndAddr
+//
+// Description: Internal Helper function.
+//
+// Input: none
+//
+// Output: CAR_End_Addr (UINTN)
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINTN Get_CAR_EndAddr()
+{
+ return (CAR_End_Addr);
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: Get_Code_EndAddr
+//
+// Description: Internal Helper function.
+//
+// Input: none
+//
+// Output: Code_End_Addr (UINTN)
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINTN Get_Code_EndAddr()
+{
+ return (Code_End_Addr);
+}
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/DBGR/mindbgr.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/DBGR/mindbgr.obj
new file mode 100644
index 0000000..6385bb0
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/DBGR/mindbgr.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/IDT/emptyidt.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/IDT/emptyidt.obj
new file mode 100644
index 0000000..f86c054
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/IDT/emptyidt.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/AMIpeidebug.h b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/AMIpeidebug.h
new file mode 100644
index 0000000..6bdb229
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/AMIpeidebug.h
@@ -0,0 +1,469 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/INC/AMIpeidebug.h 6 3/16/11 4:43p Sudhirv $
+//
+// $Revision: 6 $
+//
+// $Date: 3/16/11 4:43p $
+//*****************************************************************
+//*****************************************************************
+//
+// peidebug.h
+//
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/INC/AMIpeidebug.h $
+//
+// 6 3/16/11 4:43p Sudhirv
+// Changes to Support Older Cores before 4.6.5.0
+//
+// 5 3/09/11 8:22a Sudhirv
+// EIP 53658 - AMIDebugRx\Debugger support for PI 1.1
+//
+// 4 9/22/10 7:09p Sudhirv
+// 4.6.2_AMIDebugRx_2.01.0026_Beta Release
+//
+// 3 9/30/09 8:00p Madhans
+// Updated for 1.31. Refer release notes.
+//
+// 2 7/17/09 7:15p Madhans
+// DebugRx 1.30.0022
+//
+// 2 7/13/09 2:49p 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:52a Sudhirv
+// AMI Debug Rx module created
+//
+// 25 3/19/09 3:41p Sudhirv
+// Added After changes for Target Sending Exception Packets
+//
+// 23 1/30/09 12:32p Sudhirv
+// Added after Console Redirection Support
+//
+// 22 9/25/08 4:29p Sudhirv
+// Updated SMM Debugging and Read/Write Mem
+//
+// 21 7/29/08 1:09p Sudhirv
+// Changes made to support SMM debugging in savemem and loadmem
+// extension commands
+//
+// 20 6/26/08 3:30p Sudhirv
+// Uploaded after checking coding standards
+//
+// 19 6/11/08 2:24p Sudhirv
+// After Addibg GP Handling in MSR
+//
+// 18 6/11/08 5:46a Sudhirv
+// Uploaded for Release with Read/WriteMSR restriction, Readio/Writeio
+// restriction, Read/Write IndirectIO, ListModules and PciList
+//
+// 17 12/05/07 8:23a Sudhirv
+// Added to support and Restrict ReadMSR/WriteMSR commands
+//
+// 16 10/24/07 10:31a Madhans
+// Hatdriver Support.
+//
+// 15 8/29/07 3:49p Madhans
+// To resolve AMD Platfrom issues.
+//
+// 14 8/29/07 12:49p Madhans
+// Common code for 4.x and 3.x
+//
+// 13 6/13/07 3:16p Madhans
+// Copyright Year updated.
+//
+// 12 6/13/07 2:37p Madhans
+// To improve the performance in Load FV though Serial.
+//
+// 11 6/05/07 7:10p Natalyak
+// Load FV support
+//
+// 10 4/05/07 6:33p Madhans
+// CAR_BASE_ADJUST_OFFSET removed.
+//
+// 9 3/10/07 1:24p Madhans
+// CAR_BASE_ADJUST_OFFSET allows to have PEI_SERVICES address above IDT
+//
+// 8 2/23/07 5:36p Madhans
+// PeiDbgr_SendPeiLoadImage function added.
+//
+// 7 1/22/07 11:41a Madhans
+// Modification made for Binary Release 1.04.0003.
+//
+// 11 1/05/07 6:15p Madhan
+//
+// 10 1/05/07 1:05p Ashrafj
+// Latest version 1.04.0001 Beta
+// Known issues from previous 1.04.000 Beta release has been fixed.
+//
+// 9 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.
+//
+// 7 6/27/06 11:44a Ashrafj
+// New feature added:
+// To enable the PEI Debug support after system memory is installed, based
+// on build option provided through a new SDL token named
+// "PEI_DEBUG_SUPPORT_AFTER_MEMORY".
+//
+// 6 3/15/06 7:45p Ashrafj
+// Modfication done to provide the Binary integration for Aptio 4
+// projects.
+//
+// 5 12/22/05 12:42p Ashrafj
+// Changes done to support the complete Chipset template porting.
+//
+// To use this changes, make sure to have the latest Board components of
+// CPU, SB and SIO, which have the following ELINKS ported:
+// - SBPEIDBG_Initialize,
+// - CPUPEIDBG_Initialize,
+// - SIOPEIDBG_Initialize,
+// - SBPEIDBG_InitUsbEhci.
+//
+// 4 12/05/05 7:29p Ashrafj
+// Serial Port Debug Support added for PEI - DXE Debugger.
+//
+// Change in Serial Port Communication: Now the data transmission through
+// Serial Port is supported with the hardware Flow control feature of the
+// Serial Port controller.
+//
+// 3 11/29/05 6:07p Markw
+// Change USB interface function parameters.
+//
+// 2 10/25/05 11:38a Ashrafj
+// Minor fix - packed structure alignment and width size of global
+// variable.
+//
+// 1 10/19/05 10:54a Felixp
+//
+// 1 10/19/05 10:44a Felixp
+//
+//
+//
+//*****************************************************************
+
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: AMIPeiDebug.h
+//
+// Description: Contains 32 bit Pei Debugger prototypes
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+#ifndef _AMI_PEIDEBUG_H_
+#define _AMI_PEIDEBUG_H_
+
+#ifdef USB_DEBUGGER
+#include "EHCI.h"
+#endif
+
+#ifdef ALASKA_SUPPORT
+#include "token.h"
+#else
+#include "tokens.h"
+#endif
+
+#define EFI_PEI_DBG_BASEADDRESS_PPI_GUID \
+ { 0x9bf4e141, 0xa4ec, 0x4d72, {0xbc, 0xc4, 0x94, 0x2, 0x1d, 0x2b, 0x80, 0xbd }}
+
+#if defined (PI_SPECIFICATION_VERSION)
+#if PI_SPECIFICATION_VERSION>=0x00010000
+UINTN GetCARBaseAddress();
+#define PEI_DEBUG_DATASECTION_BASEADDRESS GetCARBaseAddress() //Starting address of PEI debugger data section
+#define PEI_DEBUG_DATASECTION_SIZE 0x2048
+
+#else //if PI_SPECIFICATION_VERSION >= 0x00010000
+#ifdef ALASKA_SUPPORT
+#define PEI_DEBUG_DATASECTION_BASEADDRESS CAR_BASE_ADDRESS //Starting address of PEI debugger data section
+#define PEI_DEBUG_DATASECTION_SIZE CAR_TOTAL_SIZE
+#else //ifdef ALASKA_SUPPORT
+#define PM_BASE_ADDRESS APLIB_PM_BASE_ADDRESS
+#define DATA_STACK_BASEADDRESS APLIB_CAR_BASEADDRESS
+#define PEI_DEBUG_DATASECTION_BASEADDRESS DATA_STACK_BASEADDRESS //Starting address of PEI debugger data section
+#define PEI_DEBUG_DATASECTION_SIZE 0x400
+#endif //ifdef ALASKA_SUPPORT
+
+#endif //if PI_SPECIFICATION_VERSION >= 0x00010000
+
+#else //if not defined (PI_SPECIFICATION_VERSION)
+#ifdef ALASKA_SUPPORT
+#define PEI_DEBUG_DATASECTION_BASEADDRESS CAR_BASE_ADDRESS //Starting address of PEI debugger data section
+#define PEI_DEBUG_DATASECTION_SIZE CAR_TOTAL_SIZE
+#else //ifdef ALASKA_SUPPORT
+#define PM_BASE_ADDRESS APLIB_PM_BASE_ADDRESS
+#define DATA_STACK_BASEADDRESS APLIB_CAR_BASEADDRESS
+#define PEI_DEBUG_DATASECTION_BASEADDRESS DATA_STACK_BASEADDRESS //Starting address of PEI debugger data section
+#define PEI_DEBUG_DATASECTION_SIZE 0x400
+#endif //ifdef ALASKA_SUPPORT
+
+#endif //if defined (PI_SPECIFICATION_VERSION)
+
+#define IRQ_VECTOR_BASE 0x8
+
+typedef struct {
+ UINT8 Signature[4];
+ UINT32 DATABASEADDRESS;
+}PEI_DBG_DATA_SECTION;
+
+#ifdef RELOCATE
+
+#if defined PI_SPECIFICATION_VERSION
+#if (PI_SPECIFICATION_VERSION >= 0x00010000)
+#define PEI_DEBUG_DATA_BASEADDRESS GetCARBaseAddress() //(PeiDbgDataSection.DATABASEADDRESS)
+#else
+extern PEI_DBG_DATA_SECTION PeiDbgDataSection;
+#define PEI_DEBUG_DATA_BASEADDRESS (PeiDbgDataSection.DATABASEADDRESS)
+#endif
+#else
+extern PEI_DBG_DATA_SECTION PeiDbgDataSection;
+#define PEI_DEBUG_DATA_BASEADDRESS (PeiDbgDataSection.DATABASEADDRESS)
+#endif
+
+#else
+#define PEI_DEBUG_DATA_BASEADDRESS PEI_DEBUG_DATASECTION_BASEADDRESS // Fixed Base Address
+#endif
+
+#define IDT_ENTRIES 0x14 // Number of Entries in IDT
+#define IDT_SIZE 0xa0 // Total Size = 160 Bytes
+#define CONTEXT_SIZE 0x74 // Total Size = 116 Bytes
+
+#define XPORTLOCALVAR_SIZE 0x48 // Total Size = 72 Bytes
+
+#define XPORTGLOBALVAR_SIZE 0x18 // Total Size = 24 Bytes
+//#define DBGRLOCALVAR_SIZE 0x2c // Total Size = 44 Bytes
+#define DBGRLOCALVAR_SIZE 0x36 // Total Size = 56 Bytes
+#define XPORTEXPTNBUF_SIZE 0x20 // Total Size = 32 Bytes
+
+//#define GLOBALBUF_SIZE 0x235 // Total Size = 565 Bytes
+#define GLOBALBUF_SIZE 0x210 // Total Size = 528 Bytes
+
+#define ACKBUF_SIZE 0x0a // Total Size = 10 Bytes
+
+
+
+#define PEI_DEBUG_IDTBASEADDR PEI_DEBUG_DATA_BASEADDRESS
+#define PEI_DEBUG_CONTEXTADDR PEI_DEBUG_DATA_BASEADDRESS + IDT_SIZE
+#define PEI_DEBUG_XPORTLOCALVARADDR PEI_DEBUG_CONTEXTADDR + CONTEXT_SIZE
+#define PEI_DEBUG_XPORTGLOBALVARADDR PEI_DEBUG_XPORTLOCALVARADDR + XPORTLOCALVAR_SIZE
+#define PEI_DEBUG_DBGRLOCALVARADDR PEI_DEBUG_XPORTGLOBALVARADDR + XPORTGLOBALVAR_SIZE
+#define PEI_DEBUG_XPORTEXPTNADDR PEI_DEBUG_DBGRLOCALVARADDR + DBGRLOCALVAR_SIZE
+#define PEI_DEBUG_BUFADDR PEI_DEBUG_XPORTEXPTNADDR + XPORTEXPTNBUF_SIZE
+#define PEI_DEBUG_ACKADDR PEI_DEBUG_BUFADDR + GLOBALBUF_SIZE
+
+#define IN_PEI_BEFORE_MEMORY 0
+#define IN_PEI_AFTER_MEMORY 01
+#define IN_DXE_WITH_PEI_DBGR 02
+#define IN_DXE_WITH_DXE_DBGR 03
+
+#pragma pack (push, pei_struct_data_pack, 1)
+
+typedef struct {
+ unsigned char IDTSet[IDT_SIZE];
+ unsigned char ContextReg[CONTEXT_SIZE];
+ unsigned char XportLocalVar[XPORTLOCALVAR_SIZE];
+ unsigned char XportGlobalVar[XPORTGLOBALVAR_SIZE];
+ unsigned char DbgrLocalVar[DBGRLOCALVAR_SIZE];
+ unsigned char XportExptn[XPORTEXPTNBUF_SIZE];
+ unsigned char GlobalBuf[GLOBALBUF_SIZE];
+ unsigned char AckBuf[ACKBUF_SIZE];
+} PEIDebugData_T;
+
+
+#pragma pack (pop, pei_struct_data_pack)
+
+
+typedef struct _AMI_PEI_TRANSPORT_PROTOCOL {
+ UINT8 Signature[4];
+ UINT16 (*Initialize)();
+ UINT16 (*Restore)();
+ UINT16 (*Send)();
+ UINT16 (*Receive)();
+ UINT16 (*SyncPacketNumber)();
+ UINT16 (*RegisterHandler)();
+ VOID (*Callback)();
+ UINT16 (*SendNoAck)();
+ EFI_STATUS (*ConsoleIn)();
+ VOID (*SendExptn)();
+} AMI_PEI_TRANSPORT_PROTOCOL;
+
+typedef struct{
+ UINT8 Signature[4];
+ VOID (*ExceptionCallback)();
+ VOID (*SendMessage)();
+ UINTN (*PeiDbgr_EnableDebugSupport)(UINTN BrkPtAddr);
+ UINTN (*PeiDbgr_SendPeiLoadImage)(UINTN FileHandle,UINTN ImageAddr,UINTN ImageSize,void * PDBFileName);
+ VOID (*DoSpecialBreakPoint)(UINT32 EaxValue,UINT32 EdxValue);
+}AMI_DEBUGGER_INTERFACE;
+
+#pragma pack(1)
+typedef struct {
+ UINT32 m_EIP;
+ UINT16 m_SendPktSize;
+ UINT8 m_CurSendPktNum;
+ UINT16 m_CurIxInRcvPkt;
+ UINT8 m_CurRcvPktNum;
+ UINT32 m_ExptnHndlr;
+ UINT8 m_IsSending;
+ UINT16 m_ExptnType;
+ UINT8 m_PrevByteEsc;
+ UINT8 m_RcvingPkt;
+ UINT8 m_RcvPktReady;
+ UINT16 m_RcvPktSize;
+ UINT8 m_IsPortInListenMode;
+ UINT8 m_IsHostConnected;
+ UINT8 m_IsPeiDbgIsS3;
+#ifndef USB_DEBUGGER
+ UINT16 m_BaseAddr;
+// UINT8 m_IsCOMPortInListenMode;
+// UINT32 m_ReadAttempts; //only for debugging purpose -remove later
+// UINT8 m_CacheRecvFIFO[24];
+// UINT8 m_CacheSize;
+// UINT8 m_CacheIndex;
+
+ //To obtain info from Porting template support, and use it to publish HOB
+ UINT8 m_SIO_LDN_UART; //Logical Device Number for COM port
+#else
+ UINT32 USBBASE;
+ UINT32 USB2_DEBUG_PORT_REGISTER_INTERFACE;
+ UINT8 gDebugUSBAddress;
+ UINT8 gDebugInEndpoint;
+ UINT8 gDebugOutEndpoint;
+ GET_DESCRIPTOR_DEBUG_PORT Descriptor;
+ UINT8 gUSBBulkTransferSetAddr;
+
+ UINT8 gIN_DATAPID;
+ UINT8 gOUT_DATAPID;
+
+ UINT8 gIN_DATABUFFER[8];
+ UINT8 gOUT_DATABUFFER[8];
+
+ UINT8 gCurrentINDataBufferLength;
+ UINT8 gCurrentINDataBufferIndex;
+ UINT8 gCurrentOUTDataBufferIndex;
+
+ UINT8 lastdata;
+
+ UINT8 gIsUsbDebugPortInUse;
+// UINT8 gIsUsbDebugPortInListenMode;
+
+ //To obtain info from Porting template support, and use it to publish HOB
+ UINT16 m_EHCI_MEMORY_SIZE;
+ UINT8 m_PCI_EHCI_BUS_NUMBER;
+ UINT8 m_PCI_EHCI_DEVICE_NUMBER;
+ UINT8 m_PCI_EHCI_FUNCTION_NUMBER;
+ UINT8 m_PCI_EHCI_BAR_OFFSET;
+#endif
+ UINT64 m_PeiDbgRxInitTimerVal;
+}SerXPortGblData_T;
+
+typedef struct {
+ AMI_PEI_TRANSPORT_PROTOCOL *gTransportProtocol;
+ UINT16 (*Handler)();
+
+ //Additional parameters added in order to support DXE phase callback of
+ //IRQ register handlers
+ UINTN InterruptType;
+ UINTN ContextData;
+ VOID (*IRQRegisterHandler)(UINTN,UINTN);
+
+#ifdef USB_DEBUGGER
+ //Additional interface for PeiDbgSIO module to reinit EHCI memory base
+// void (*PeiDbgSIO_Init_USB_EHCI)(UINTN PeiDbgData_BaseAddr,UINTN MMIO_BaseAddr);
+// void (*PeiDbgSIO_Init_USB_EHCI)(UINTN UsbBaseAddress, UINTN *Usb2DebugPortReg);
+ void (*PeiDbgSIO_Init_USB_EHCI)(VOID *);
+#endif
+}SerXPortGblVar_T;
+
+typedef struct {
+ UINT8 m_BrkPtType;
+ UINT16 m_CS;
+ UINT32 m_EIP;
+ UINT16 m_SS;
+ UINT32 m_ESP;
+ UINT32 m_DR2;
+ UINT32 m_DR7;
+ UINT8 m_TargetRunning;
+ UINT8 m_DbgrBusy;
+ UINT8 m_DR2Valid;
+
+ UINT8 m_GPOccrd;
+ UINT8 m_MSRState;
+
+ UINT8 m_NotifyAndBreak;
+
+ UINT16 m_DbgSendBufSize;
+ UINT16 m_DbgRcvBufSize;
+ VOID (*PeiDbgrReportStatusCode)();
+ UINT8 m_FlagToDebugAfterMemory;
+ UINTN (*PeiDbgr_EnableDebugSupport)(UINTN BrkPtAddr);
+ AMI_DEBUGGER_INTERFACE *pPeiDbgDbgrIfc;
+ UINT8 m_TargetState;
+ VOID* m_ppPeiSVC;
+ EFI_STATUS (*UpdateFVHob)();
+}DbgGblData_T;
+
+#pragma pack()
+
+#pragma pack(1)
+typedef struct {
+ UINT16 m_OffLow;
+ UINT16 m_SegSel;
+ UINT16 m_Reserved;
+ UINT16 m_OffHigh;
+}IDTEntry_T;
+
+typedef struct {
+ UINT16 IDTLength;
+ UINTN IDTBaseAddr; //should work for both 32 and 64 mode
+}IDTBASE;
+
+typedef UINT8 (DBG_IS_S3)(void);
+#pragma pack()
+
+void DriverSpecialBreakPoint(UINT32 EaxVal, UINT32 EdxVal);
+
+#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/PeiAMIDebugRx/INC/AMIpeidebugX64.h b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/AMIpeidebugX64.h
new file mode 100644
index 0000000..d3bc15f
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/AMIpeidebugX64.h
@@ -0,0 +1,509 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/INC/AMIpeidebugX64.h 5 3/09/11 8:22a Sudhirv $
+//
+// $Revision: 5 $
+//
+// $Date: 3/09/11 8:22a $
+//*****************************************************************
+//*****************************************************************
+//
+// peidebug.h
+//
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/INC/AMIpeidebugX64.h $
+//
+// 5 3/09/11 8:22a Sudhirv
+// EIP 53658 - AMIDebugRx\Debugger support for PI 1.1
+//
+// 4 9/22/10 7:09p Sudhirv
+// 4.6.2_AMIDebugRx_2.01.0026_Beta Release
+//
+// 3 9/30/09 8:00p Madhans
+// Updated for 1.31. Refer release notes.
+//
+// 2 7/17/09 7:15p Madhans
+// DebugRx 1.30.0022
+//
+// 2 7/13/09 2:49p 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:52a Sudhirv
+// AMI Debug Rx module created
+//
+// 19 3/19/09 3:41p Sudhirv
+// Added After changes for Target Sending Exception Packets
+//
+// 17 1/30/09 12:32p Sudhirv
+// Added after Console Redirection Support
+//
+// 16 6/26/08 3:30p Sudhirv
+// Uploaded after checking coding standards
+//
+// 15 6/11/08 2:24p Sudhirv
+// After Addibg GP Handling in MSR
+//
+// 14 6/11/08 5:46a Sudhirv
+// Uploaded for Release with Read/WriteMSR restriction, Readio/Writeio
+// restriction, Read/Write IndirectIO, ListModules and PciList
+//
+// 13 12/05/07 8:23a Sudhirv
+// Added to support and Restrict ReadMSR/WriteMSR commands
+//
+// 12 10/24/07 10:31a Madhans
+// Hatdriver Support.
+//
+// 11 8/29/07 3:49p Madhans
+// To resolve AMD Platfrom issues.
+//
+// 10 8/29/07 12:49p Madhans
+// Common code for 4.x and 3.x
+//
+// 9 6/13/07 3:16p Madhans
+// Copyright Year updated.
+//
+// 8 6/05/07 7:11p Natalyak
+// Load FV support
+//
+// 7 4/05/07 6:33p Madhans
+// CAR_BASE_ADJUST_OFFSET removed.
+//
+// 6 3/10/07 1:24p Madhans
+// CAR_BASE_ADJUST_OFFSET allows to have PEI_SERVICES address above IDT
+//
+// 5 2/23/07 5:37p Madhans
+// Changes made for LoadImag PPI/Protocol Notifications.
+//
+// 4 1/22/07 11:41a Madhans
+// Modification made for Binary Release 1.04.0003.
+//
+// 3 1/05/07 6:15p Madhan
+//
+// 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.
+//
+// 7 6/27/06 11:44a Ashrafj
+// New feature added:
+// To enable the PEI Debug support after system memory is installed, based
+// on build option provided through a new SDL token named
+// "PEI_DEBUG_SUPPORT_AFTER_MEMORY".
+//
+// 6 3/15/06 7:45p Ashrafj
+// Modfication done to provide the Binary integration for Aptio 4
+// projects.
+//
+// 5 12/22/05 12:42p Ashrafj
+// Changes done to support the complete Chipset template porting.
+//
+// To use this changes, make sure to have the latest Board components of
+// CPU, SB and SIO, which have the following ELINKS ported:
+// - SBPEIDBG_Initialize,
+// - CPUPEIDBG_Initialize,
+// - SIOPEIDBG_Initialize,
+// - SBPEIDBG_InitUsbEhci.
+//
+// 4 12/05/05 7:29p Ashrafj
+// Serial Port Debug Support added for PEI - DXE Debugger.
+//
+// Change in Serial Port Communication: Now the data transmission through
+// Serial Port is supported with the hardware Flow control feature of the
+// Serial Port controller.
+//
+// 3 11/29/05 6:07p Markw
+// Change USB interface function parameters.
+//
+// 2 10/25/05 11:38a Ashrafj
+// Minor fix - packed structure alignment and width size of global
+// variable.
+//
+// 1 10/19/05 10:54a Felixp
+//
+// 1 10/19/05 10:44a Felixp
+//
+//
+//
+//*****************************************************************
+
+//<AMI_FHDR_START>
+//----------------------------------------------------------------------------
+//
+// Name: AmiPeiDebugx64.C
+//
+// Description: Contains X64 Pei Debugger prototypes
+//
+//----------------------------------------------------------------------------
+//<AMI_FHDR_END>
+#ifndef _AMI_PEIDEBUGx64_H_
+#define _AMI_PEIDEBUGx64_H_
+
+#ifdef USB_DEBUGGER
+#include "EHCI.h"
+#endif
+
+#ifdef ALASKA_SUPPORT
+#include "token.h"
+#else
+#include "tokens.h"
+#endif
+
+#ifdef ALASKA_SUPPORT
+#if defined (PI_SPECIFICATION_VERSION) && (PI_SPECIFICATION_VERSION >= 0x00010000)
+//#define PEI_DEBUG_DATASECTION_BASEADDRESS CAR_BASE_ADDRESS //Starting address of PEI debugger data section
+#else
+#define PEI_DEBUG_DATASECTION_BASEADDRESS CAR_BASE_ADDRESS //Starting address of PEI debugger data section
+#endif
+#else
+
+#define PM_BASE_ADDRESS APLIB_PM_BASE_ADDRESS
+#define DATA_STACK_BASEADDRESS APLIB_CAR_BASEADDRESS
+
+#define PEI_DEBUG_DATASECTION_BASEADDRESS DATA_STACK_BASEADDRESS //Starting address of PEI debugger data section
+#endif
+
+
+#define PEI_DEBUG_DATASECTION_SIZEx64 \
+ (IDT_SIZEx64 + CONTEXT_SIZEx64 + XPORTLOCALVAR_SIZEx64 + XPORTGLOBALVAR_SIZEx64\
+ + DBGRLOCALVAR_SIZEx64 + XPORTEXPTNBUF_SIZEx64 + GLOBALBUF_SIZEx64 + ACKBUF_SIZEx64)
+
+#define IRQ_VECTOR_BASE 0x8
+
+typedef struct {
+ UINT8 Signature[4];
+ UINT32 DATABASEADDRESS;
+}PEI_DBG_DATA_SECTIONx64;
+
+#ifdef RELOCATE
+extern PEI_DBG_DATA_SECTIONx64 PeiDbgDataSection;
+#define PEI_DEBUG_DATA_BASEADDRESS (PeiDbgDataSection.DATABASEADDRESS)
+#else
+#define PEI_DEBUG_DATA_BASEADDRESS PEI_DEBUG_DATASECTION_BASEADDRESS // Fixed Base Address
+#endif
+
+#define IDT_ENTRIES 0x14 // Number of Entries in IDT
+#define IDT_SIZEx64 0x160 // Total Size = 352 Bytes
+#define CONTEXT_SIZEx64 0x140 // Total Size = 320 Bytes
+
+#define XPORTLOCALVAR_SIZEx64 0x50 // Total Size = 80 Bytes
+
+#define XPORTGLOBALVAR_SIZEx64 0x30 // Total Size = 48 Bytes
+//#define DBGRLOCALVAR_SIZEx64 0x50 // Total Size = 80 Bytes
+#define DBGRLOCALVAR_SIZEx64 0x62 // Total Size = 98 Bytes
+#define XPORTEXPTNBUF_SIZEx64 0x20 // Total Size = 32 Bytes
+
+#define GLOBALBUF_SIZEx64 0x235 // Total Size = 565 Bytes
+
+#define ACKBUF_SIZEx64 0x0a // Total Size = 10 Bytes
+
+
+
+#define PEI_DEBUG_IDTBASEADDRx64 PEI_DEBUG_DATA_BASEADDRESS
+#define PEI_DEBUG_CONTEXTADDRx64 PEI_DEBUG_DATA_BASEADDRESS + IDT_SIZEx64
+#define PEI_DEBUG_XPORTLOCALVARADDRx64 PEI_DEBUG_CONTEXTADDRx64 + CONTEXT_SIZEx64
+#define PEI_DEBUG_XPORTGLOBALVARADDRx64 PEI_DEBUG_XPORTLOCALVARADDRx64 + XPORTLOCALVAR_SIZEx64
+#define PEI_DEBUG_DBGRLOCALVARADDRx64 PEI_DEBUG_XPORTGLOBALVARADDRx64 + XPORTGLOBALVAR_SIZEx64
+#define PEI_DEBUG_XPORTEXPTNADDRx64 PEI_DEBUG_DBGRLOCALVARADDRx64 + DBGRLOCALVAR_SIZEx64
+#define PEI_DEBUG_BUFADDRx64 PEI_DEBUG_XPORTEXPTNADDRx64 + XPORTEXPTNBUF_SIZEx64
+#define PEI_DEBUG_ACKADDRx64 PEI_DEBUG_BUFADDRx64 + GLOBALBUF_SIZEx64
+
+
+#pragma pack (push, pei_struct_data_pack, 1)
+
+typedef struct {
+ unsigned char IDTSet[IDT_SIZEx64];
+ unsigned char ContextReg[CONTEXT_SIZEx64];
+ unsigned char XportLocalVar[XPORTLOCALVAR_SIZEx64];
+ unsigned char XportGlobalVar[XPORTGLOBALVAR_SIZEx64];
+ unsigned char DbgrLocalVar[DBGRLOCALVAR_SIZEx64];
+ unsigned char XportExptn[XPORTEXPTNBUF_SIZEx64];
+ unsigned char GlobalBuf[GLOBALBUF_SIZEx64];
+ unsigned char AckBuf[ACKBUF_SIZEx64];
+}PEIDebugData_Tx64;
+
+
+#pragma pack (pop, pei_struct_data_pack)
+
+
+#pragma pack(1)
+typedef struct {
+ UINT8 Signature[4];
+ UINT16 (*Initialize)();
+ UINT16 (*Restore)();
+ UINT16 (*Send)();
+ UINT16 (*Receive)();
+ UINT16 (*SyncPacketNumber)();
+ UINT16 (*RegisterHandler)();
+ VOID (*Callback)();
+ UINT16 (*SendNoAck)();
+ EFI_STATUS (*ConsoleIn)();
+ VOID (*SendExptn)();
+ VOID (*IrqHandler)(); //Not to be use as API by any other drivers
+} AMI_PEI_TRANSPORT_PROTOCOLx64;
+
+//typedef UINT32 GET_DESCRIPTOR_DEBUG_PORT;
+
+//#pragma pack(1)
+typedef struct {
+ UINT64 m_EIP;
+ UINT16 m_SendPktSize;
+ UINT8 m_CurSendPktNum;
+ UINT16 m_CurIxInRcvPkt;
+ UINT8 m_CurRcvPktNum;
+ UINT32 m_ExptnHndlr;
+ UINT8 m_IsSending;
+ UINT16 m_ExptnType;
+ UINT8 m_PrevByteEsc;
+ UINT8 m_RcvingPkt;
+ UINT8 m_RcvPktReady;
+ UINT16 m_RcvPktSize;
+ UINT8 m_IsPortInListenMode;
+ UINT8 m_IsHostConnected;
+ UINT8 m_IsPeiDbgIsS3;
+#ifndef USB_DEBUGGER
+ UINT16 m_BaseAddr;
+// UINT8 m_IsCOMPortInListenMode;
+// UINT32 m_ReadAttempts; //only for debugging purpose -remove later
+// UINT8 m_CacheRecvFIFO[24];
+// UINT8 m_CacheSize;
+// UINT8 m_CacheIndex;
+ //To obtain info from Porting template support, and use it to publish HOB
+ UINT8 m_SIO_LDN_UART; //Logical Device Number for COM port
+#else
+ UINT32 USBBASE;
+ UINT32 USB2_DEBUG_PORT_REGISTER_INTERFACE;
+ UINT8 gDebugUSBAddress;
+ UINT8 gDebugInEndpoint;
+ UINT8 gDebugOutEndpoint;
+ GET_DESCRIPTOR_DEBUG_PORT Descriptor;
+ UINT8 gUSBBulkTransferSetAddr;
+
+ UINT8 gIN_DATAPID;
+ UINT8 gOUT_DATAPID;
+
+ UINT8 gIN_DATABUFFER[8];
+ UINT8 gOUT_DATABUFFER[8];
+
+ UINT8 gCurrentINDataBufferLength;
+ UINT8 gCurrentINDataBufferIndex;
+ UINT8 gCurrentOUTDataBufferIndex;
+
+ UINT8 lastdata;
+
+ UINT8 gIsUsbDebugPortInUse;
+// UINT8 gIsUsbDebugPortInListenMode;
+
+ //To obtain info from Porting template support, and use it to publish HOB
+ UINT16 m_EHCI_MEMORY_SIZE;
+ UINT8 m_PCI_EHCI_BUS_NUMBER;
+ UINT8 m_PCI_EHCI_DEVICE_NUMBER;
+ UINT8 m_PCI_EHCI_FUNCTION_NUMBER;
+ UINT8 m_PCI_EHCI_BAR_OFFSET;
+#endif
+ UINT64 m_PeiDbgRxInitTimerVal;
+}SerXPortGblData_Tx64;
+
+typedef struct {
+ AMI_PEI_TRANSPORT_PROTOCOLx64 *gTransportProtocol;
+ UINT16 (*Handler)();
+
+ //Additional parameters added in order to support DXE phase callback of
+ //IRQ register handlers
+ UINTN InterruptType;
+ UINTN ContextData;
+ VOID (*IRQRegisterHandler)(UINTN,UINTN);
+
+#ifdef USB_DEBUGGER
+ //Additional interface for PeiDbgSIO module to reinit EHCI memory base
+// void (*PeiDbgSIO_Init_USB_EHCI)(UINTN PeiDbgData_BaseAddr,UINTN MMIO_BaseAddr);
+// void (*PeiDbgSIO_Init_USB_EHCI)(UINTN UsbBaseAddress, UINTN *Usb2DebugPortReg);
+ void (*PeiDbgSIO_Init_USB_EHCI)(VOID *);
+#endif
+}SerXPortGblVar_Tx64;
+
+typedef struct{
+ UINT8 Signature[4];
+ VOID (*ExceptionCallback)();
+ VOID (*SendMessage)();
+ UINTN (*PeiDbgr_EnableDebugSupport)(UINTN BrkPtAddr);
+ VOID (*INT1ExceptionHandler)(); //not to be use as API
+ VOID (*INT3ExceptionHandler)(); //not to be use as API
+ VOID (*INTnExceptionHandler)(); //not to be use as API
+ UINTN (*PeiDbgr_SendPeiLoadImage)(UINTN FileHandle,UINTN ImageAddr,UINTN ImageSize,void * PDBFileName);
+ VOID (*INTFExceptionHandler)(); //not to be use as API
+}AMI_DEBUGGER_INTERFACEx64;
+
+typedef struct {
+ UINT8 m_BrkPtType;
+ UINT16 m_CS;
+ UINT64 m_EIP;
+ UINT16 m_SS;
+ UINT64 m_ESP;
+ UINT64 m_DR2;
+ UINT64 m_DR7;
+ UINT8 m_TargetRunning;
+
+ UINT8 m_MSRState;
+ UINT8 m_GPOccrd;
+
+ UINT8 m_NotifyAndBreak;
+
+ UINT8 m_DbgrBusy;
+ UINT8 m_DR2Valid;
+ UINT16 m_DbgSendBufSize;
+ UINT16 m_DbgRcvBufSize;
+ UINT64 m_BackupDR7;
+ UINT8 m_PICMask;
+ union{
+ VOID (*PeiDbgrReportStatusCode)();
+ UINT64 res1;
+ };
+ UINT8 m_FlagToDebugAfterMemory;
+ union{
+ UINTN (*PeiDbgr_EnableDebugSupport)(UINTN BrkPtAddr);
+ UINT64 res2;
+ };
+ union{
+ AMI_DEBUGGER_INTERFACEx64 *pPeiDbgDbgrIfc;
+ UINT64 res3;
+ };
+ UINT8 m_TargetState;
+ VOID* m_ppPeiSVC;
+// VOID* m_pFVHob;
+ EFI_STATUS (*UpdateFVHob)();
+}DbgGblData_Tx64;
+//#pragma pack()
+
+//#pragma pack(1)
+typedef struct {
+ UINT16 m_OffLow;
+ UINT16 m_SegSel;
+ UINT16 m_Reserved;
+ UINT16 m_OffHigh;
+ UINT32 m_OffHighExt;
+ UINT32 m_Reserved2;
+}IDTEntry_Tx64;
+
+typedef struct {
+ UINT16 IDTLength;
+ UINT64 IDTBaseAddr; //should work for both 32 and 64 mode
+}IDTBASEx64;
+#pragma pack()
+
+//=========================================================================
+// Prototypes of structure definitions to be used handoff of 32 to 64 PEI
+// Debugger
+//=========================================================================
+#pragma pack(1)
+typedef struct {
+ UINT64 gTransportProtocol; //AMI_PEI_TRANSPORT_PROTOCOL *gTransportProtocol;
+ UINT64 Handler; //UINT16 (*Handler)();
+
+ //Additional parameters added in order to support DXE phase callback of
+ //IRQ register handlers
+ UINTN InterruptType;
+ UINTN ContextData;
+ UINT64 IRQRegisterHandler; //VOID (*IRQRegisterHandler)(UINTN,UINTN);
+
+#ifdef USB_DEBUGGER
+ UINT64 PeiDbgSIO_Init_USB_EHCI; //void (*PeiDbgSIO_Init_USB_EHCI)(VOID *);
+#endif
+}SerXPortGblVar_Tx64_Proto;
+
+typedef struct{
+ UINT8 Signature[4];
+ UINT64 pExceptionCallback; //VOID (*ExceptionCallback)();
+ UINT64 pSendMessage; //VOID (*SendMessage)();
+ UINT64 pPeiDbgr_EnableDebugSupport; //UINTN (*PeiDbgr_EnableDebugSupport)(UINTN BrkPtAddr);
+ UINT64 pINT1ExceptionHandler; //VOID (*INT1ExceptionHandler)();
+ UINT64 pINT3ExceptionHandler; //VOID (*INT3ExceptionHandler)();
+ UINT64 pINTnExceptionHandler; //VOID (*INTnExceptionHandler)();
+ UINT64 pPeiDbgr_SendPeiLoadImage; //UINTN (*PeiDbgr_SendPeiLoadImage)(UINTN FileHandle,UINTN ImageAddr,UINTN ImageSize,void * PDBFileName);
+ UINT64 pINTFExceptionHandler; //VOID (*INTFExceptionHandler)();
+}AMI_DEBUGGER_INTERFACEx64_Proto;
+
+typedef struct {
+ UINT8 Signature[4];
+ UINT64 pInitialize; //UINT16 (*Initialize)();
+ UINT64 pRestore; //UINT16 (*Restore)();
+ UINT64 pSend; //UINT16 (*Send)();
+ UINT64 pReceive; //UINT16 (*Receive)();
+ UINT64 pSyncPacketNumber; //UINT16 (*SyncPacketNumber)();
+ UINT64 pRegisterHandler; //UINT16 (*RegisterHandler)();
+ UINT64 pCallback; //VOID (*Callback)();
+ UINT64 pSendNoAck; //UINT16 (*SendNoAck)();
+ UINT64 pConsoleIn; // EFI_STATUS (*ConsoleIn)();
+ UINT64 pSendExptn; // VOID (*SendExptn)();
+ UINT64 pIrqHandler; //VOID (*IrqHandler)();
+} AMI_PEI_TRANSPORT_PROTOCOLx64__Proto;
+#pragma pack()
+
+#ifdef EFIx64
+typedef PEI_DBG_DATA_SECTIONx64 PEI_DBG_DATA_SECTION;
+typedef DbgGblData_Tx64 DbgGblData_T;
+typedef SerXPortGblData_Tx64 SerXPortGblData_T;
+typedef PEIDebugData_Tx64 PEIDebugData_T;
+typedef AMI_PEI_TRANSPORT_PROTOCOLx64 AMI_PEI_TRANSPORT_PROTOCOL;
+typedef SerXPortGblVar_Tx64 SerXPortGblVar_T;
+typedef AMI_DEBUGGER_INTERFACEx64 AMI_DEBUGGER_INTERFACE;
+typedef IDTEntry_Tx64 IDTEntry_T;
+typedef IDTBASEx64 IDTBASE;
+
+#define PEI_DEBUG_IDTBASEADDR PEI_DEBUG_IDTBASEADDRx64
+#define PEI_DEBUG_CONTEXTADDR PEI_DEBUG_CONTEXTADDRx64
+#define PEI_DEBUG_XPORTLOCALVARADDR PEI_DEBUG_XPORTLOCALVARADDRx64
+#define PEI_DEBUG_XPORTGLOBALVARADDR PEI_DEBUG_XPORTGLOBALVARADDRx64
+#define PEI_DEBUG_DBGRLOCALVARADDR PEI_DEBUG_DBGRLOCALVARADDRx64
+#define PEI_DEBUG_XPORTEXPTNADDR PEI_DEBUG_XPORTEXPTNADDRx64
+#define PEI_DEBUG_BUFADDR PEI_DEBUG_BUFADDRx64
+#define PEI_DEBUG_ACKADDR PEI_DEBUG_ACKADDRx64
+#endif
+
+//=========================================================================
+//#define SET_SWBRKPT _SetBrkPt:0xcc;
+#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/PeiAMIDebugRx/INC/EHCI.h b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/EHCI.h
new file mode 100644
index 0000000..65659fb
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/EHCI.h
@@ -0,0 +1,244 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/INC/EHCI.h 2 7/17/09 7:15p Madhans $
+//
+// $Revision: 2 $
+//
+// $Date: 7/17/09 7:15p $
+//*****************************************************************
+//*****************************************************************
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/INC/EHCI.h $
+//
+// 2 7/17/09 7:15p Madhans
+// DebugRx 1.30.0022
+//
+// 2 7/13/09 2:49p 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:52a Sudhirv
+// AMI Debug Rx module created
+//
+// 5 6/13/07 3:16p Madhans
+// Copyright Year updated.
+//
+// 4 3/13/07 4:08p Ashrafj
+// !!!Coding standard!!!
+//
+// 3 1/22/07 11:41a Madhans
+// Modification made for Binary Release 1.04.0003.
+//
+// 3 1/05/07 6:15p Madhan
+//
+// 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: ehci.h
+//
+// Description: EHCI controller related declarations and #defines.
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+
+/*
+ USB Debug port resides in EHCI
+ Following is specific to chipset (ICH4,ICH5)
+*/
+#ifndef __EHCI_H__
+#define __EHCI_H__
+
+#define EHCI_BUS_NUMBER 0
+#define EHCI_DEVICE_NUMBER 29
+#define EHCI_FUNCTION_NUMBER 7
+
+#define EHCI_CAPABILITY_REG 0x34
+
+#define EHCI_POWERMGMT_CAP_REG 0x50 //ICH4 & ICH5(i875 MB)
+#define EHCI_DEBUGPORT_CAP_REG 0x58 //ICH4 & ICH5(i875 MB)
+
+#define ICH5_EHCI_BASE_ADDRESS_REGISTER 0x10
+
+#define MEMORYMAP_BASE_ADDR 0xEFFFFFFF //4GB - 256MB
+#define MEMORYMAP_WINDOW_SIZE 0x3FF //1 KB relocateble mem space (ICH4/5)
+
+//
+// Turn off the PWE assertion and put the device into D0 State
+//
+#define ICH5_PMCSR 0x8000
+////////////////////////////////////////////////
+
+#define ICH5_PCI_CAPABILITY_ID_PMI 0x01
+#define ICH5_EHCI_COMMAND_REGISTER 0x04
+
+#define DEBUG_PORT 0x0A
+#define PORTSC_CURRENT_CONNECT_STATUS 1
+#define PORTSC_CONNECT_STATUS_CHANGE 2
+#define PORTSC_PORT_ENABLE 4
+#define PORTSC_PORT_DISABLE 0xFFFFFFFB
+#define PORTSC_PORT_RESET 0x100
+#define PORTSC_PORT_NOT_RESET 0xFFFFFEFF
+
+#define IN_PID 0x69
+#define OUT_PID 0xE1
+#define SETUP_PID 0x2D
+#define DATA0 0xC3
+#define DATA1 0x4B
+
+#define ACK 0xD2
+#define NAK 0x5A
+#define STALL 0x1E
+#define NYET 0x96
+
+#define DEBUG_PORT_DESCRIPTOR_TYPE 0x0A
+
+#define MAX_USBDEBUGPORT_DATASIZE 8
+
+#pragma pack(1)
+typedef struct _CAP_REG_LIST{
+ UINT8 CapID;
+ UINT8 Nxt_Ptr;
+ UINT16 Offset :13;
+ UINT16 BAR :3;
+}CAP_REG_LIST;
+
+typedef struct _DEBUG_PORT_CONTROL_REGISTER{
+ UINT32 DataLength : 4;
+ UINT32 WriteRead : 1;
+ UINT32 Go : 1;
+ UINT32 ErrorGood : 1;
+ UINT32 Exception : 3;
+ UINT32 InUse : 1;
+ UINT32 Reserved1 : 5;
+ UINT32 Done : 1;
+ UINT32 Reserved2 : 11;
+ UINT32 Enabled : 1;
+ UINT32 Reserved3 : 1;
+ UINT32 Owner : 1;
+ UINT32 Reserved4 : 1;
+}DEBUG_PORT_CONTROL_REGISTER;
+
+typedef struct _USB_PID{
+ UINT32 TokenPID : 8;
+ UINT32 SendPID : 8;
+ UINT32 RecievedPID : 8;
+ UINT32 Reserved : 8;
+}USB_PID;
+
+typedef struct _DATA_BUFFER{
+ UINT32 LowDword;
+ UINT32 HighDword;
+}DATA_BUFFER;
+
+typedef struct _DEVICE_ADDR_REGISTER{
+ UINT32 USBEndPoint : 4;
+ UINT32 Reserved1 : 4;
+ UINT32 USBAddress : 7;
+ UINT32 Reserved2 : 17;
+}DEVICE_ADDR_REGISTER;
+
+typedef struct _HCSPARAMS{
+ UINT32 N_PORTS : 4;
+ UINT32 PPC : 1;
+ UINT32 Resrvd : 2;
+ UINT32 PRR : 1;
+ UINT32 N_PCC : 4;
+ UINT32 N_CC : 4;
+ UINT32 P_INDICATOR : 1;
+ UINT32 Resrvd2 : 3;
+ UINT32 DebugPortNum : 4;
+ UINT32 Resrvd3 : 8;
+}HCSPARAMS;
+
+typedef struct _GET_DESCRIPTOR_DEBUG_PORT{
+ UINT8 bLength;
+ UINT8 bDescriptorType;
+ UINT8 bDebugInEndpoint;
+ UINT8 bDebugOutEndpoint;
+}GET_DESCRIPTOR_DEBUG_PORT;
+
+
+typedef struct _USB_CMD{
+ UINT32 RunStop : 1;
+ UINT32 HCRESET : 1;
+ UINT32 FLS : 2;
+ UINT32 PSE : 1;
+ UINT32 ASE : 1;
+ UINT32 IAAD : 1;
+ UINT32 LHCR : 1;
+ UINT32 ASPMC : 3;
+ UINT32 ASPME : 1;
+ UINT32 Resvd1 : 4;
+ UINT32 ITC : 8;
+ UINT32 Resvd2 : 8;
+}USBCMD;
+
+typedef struct _USB_STS{
+ UINT32 USBINTR : 1;
+ UINT32 USBERRINT : 1;
+ UINT32 PCD : 1;
+ UINT32 FLR : 1;
+ UINT32 HSE : 1;
+ UINT32 INTASYNC : 1;
+ UINT32 Resvd1 : 6;
+ UINT32 HCHalted : 1;
+ UINT32 Reclamation : 1;
+ UINT32 PSS : 1;
+ UINT32 ASS : 1;
+ UINT32 Resvd2 : 16;
+}USBSTS;
+
+typedef struct _CONFIG_FLAG{
+ UINT32 CF : 1;
+ UINT32 Reserved : 31;
+}CONFIGFLAG, *PCONFIGFLAG;
+
+typedef struct _OPERATIONAL_REGISTER{
+ USBCMD USBCommandReg;
+ USBSTS USBStatusReg;
+}OPERATIONAL_REGISTER, *POPERATIONAL_REGISTER;
+
+#pragma pack()
+
+#endif // __EHCI_H__
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/INC/INC.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/INC.cif
new file mode 100644
index 0000000..520a96b
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/INC.cif
@@ -0,0 +1,11 @@
+<component>
+ name = "INC"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\PeiAMIDebugRx\INC\"
+ RefName = "INC"
+[files]
+"AMIpeidebug.h"
+"EHCI.h"
+"misc.h"
+"AMIpeidebugX64.h"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/misc.h b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/misc.h
new file mode 100644
index 0000000..b486fd9
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/INC/misc.h
@@ -0,0 +1,178 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/INC/misc.h 2 7/17/09 7:15p Madhans $
+//
+// $Revision: 2 $
+//
+// $Date: 7/17/09 7:15p $
+//*****************************************************************
+//*****************************************************************
+//
+// misc.h
+//
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/INC/misc.h $
+//
+// 2 7/17/09 7:15p Madhans
+// DebugRx 1.30.0022
+//
+// 2 7/13/09 2:49p 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:52a Sudhirv
+// AMI Debug Rx module created
+//
+// 6 8/29/07 12:49p Madhans
+// Common code for 4.x and 3.x
+//
+// 5 6/13/07 3:17p Madhans
+// Copyright Year updated.
+//
+// 4 3/13/07 4:08p Ashrafj
+// !!!Coding standard!!!
+//
+// 3 1/22/07 11:41a Madhans
+// Modification made for Binary Release 1.04.0003.
+//
+// 5 1/05/07 6:15p Madhan
+//
+// 4 1/05/07 1:05p Ashrafj
+// Latest version 1.04.0001 Beta
+// Known issues from previous 1.04.000 Beta release has been fixed.
+//
+// 3 12/05/05 7:29p Ashrafj
+// Serial Port Debug Support added for PEI - DXE Debugger.
+//
+// Change in Serial Port Communication: Now the data transmission through
+// Serial Port is supported with the hardware Flow control feature of the
+// Serial Port controller.
+//
+// 2 11/29/05 6:08p Markw
+// For Alaska, include efi.h instead of defining new typecasts.
+//
+// 1 10/19/05 10:54a Felixp
+//
+// 1 10/19/05 10:44a Felixp
+//
+//
+//
+//*****************************************************************
+//**********************************************************************
+//<AMI_FHDR_START>
+//
+// Name: misc.h
+//
+// Description: Generic Misc header file.
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+
+#ifdef ALASKA_SUPPORT
+
+#include <efi.h>
+
+#else /* Support for APTIO projects */
+
+#define UINT64 unsigned __int64
+#define UINT32 unsigned long
+#define UINT16 unsigned short
+#define UINT8 unsigned char
+
+#define INT32 signed long
+#define INT8 signed char
+#define INT16 signed short
+
+#define CHAR8 char
+#define CHAR16 unsigned short
+#define BOOLEAN unsigned char
+
+#define UINTN UINT32
+#define INTN INT32
+
+#define VOID void
+
+#ifndef _EFI_TYPES_H_
+
+#define TRUE 1
+
+#define FALSE 0
+
+#define NULL 0
+
+#define IN
+#define OUT
+
+//EFI error types
+
+//typedef UINTN EFI_STATUS;
+#define EFI_STATUS UINTN
+
+#define EFI_ERROR(a) (((INTN) a) < 0)
+
+#define EFIERR(a) (0x80000000 | a)
+
+#define EFI_SUCCESS 0
+#define EFI_LOAD_ERROR EFIERR(1)
+#define EFI_INVALID_PARAMETER EFIERR(2)
+#define EFI_UNSUPPORTED EFIERR(3)
+#define EFI_BAD_BUFFER_SIZE EFIERR(4)
+#define EFI_BUFFER_TOO_SMALL EFIERR(5)
+#define EFI_NOT_READY EFIERR(6)
+#define EFI_DEVICE_ERROR EFIERR(7)
+#define EFI_WRITE_PROTECTED EFIERR(8)
+#define EFI_OUT_OF_RESOURCES EFIERR(9)
+#define EFI_VOLUME_CORRUPTED EFIERR(10)
+#define EFI_VOLUME_FULL EFIERR(11)
+#define EFI_NO_MEDIA EFIERR(12)
+#define EFI_MEDIA_CHANGED EFIERR(13)
+#define EFI_NOT_FOUND EFIERR(14)
+#define EFI_ACCESS_DENIED EFIERR(15)
+#define EFI_NO_RESPONSE EFIERR(16)
+#define EFI_NO_MAPPING EFIERR(17)
+#define EFI_TIMEOUT EFIERR(18)
+#define EFI_NOT_STARTED EFIERR(19)
+#define EFI_ALREADY_STARTED EFIERR(20)
+#define EFI_ABORTED EFIERR(21)
+#define EFI_ICMP_ERROR EFIERR(22)
+#define EFI_TFTP_ERROR EFIERR(23)
+#define EFI_PROTOCOL_ERROR EFIERR(24)
+
+#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/PeiAMIDebugRx/MAIN/PeiDbgMain.ffs b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/MAIN/PeiDbgMain.ffs
new file mode 100644
index 0000000..b5a9058
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/MAIN/PeiDbgMain.ffs
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/MAIN/PeiDbgMain_PI_1_1.ffs b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/MAIN/PeiDbgMain_PI_1_1.ffs
new file mode 100644
index 0000000..772afb1
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/MAIN/PeiDbgMain_PI_1_1.ffs
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiAMIDebugRx.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiAMIDebugRx.cif
new file mode 100644
index 0000000..80875d3
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiAMIDebugRx.cif
@@ -0,0 +1,18 @@
+<component>
+ name = "Pei AMI Debug Rx"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\PeiAMIDebugRx\"
+ RefName = "PeiAMIDebugRx"
+[files]
+"PeiAMIDebugRx.sdl"
+[parts]
+"PeiDbgMain"
+"PeiDbgIDT"
+"PeiDbgPort"
+"PeiDbgDbgr"
+"PeiDbgXport"
+"PeiDebugSupport"
+"INC"
+"PeiDbgDbgrx64"
+"PeiDbgXportx64"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiAMIDebugRx.sdl b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiAMIDebugRx.sdl
new file mode 100644
index 0000000..a9cf21b
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiAMIDebugRx.sdl
@@ -0,0 +1,44 @@
+TOKEN
+ Name = "PeiDebugModule_SUPPORT"
+ Value = "1"
+ Help = "Master SDL token of the Module depends on PeiDebugger_SUPPORT SDL token"
+ TokenType = Boolean
+ TargetMAK = Yes
+ Master = Yes
+ Lock = Yes
+ Token = "PeiDebugger_SUPPORT" "=" "1"
+End
+
+TOKEN
+ Name = "DBG_PI_INT_SUPPORT"
+ Value = "0"
+ TokenType = Integer
+End
+
+TOKEN
+ Name = "DBG_PI_INT_SUPPORT"
+ Value = "1"
+ Token = "PI_SPECIFICATION_VERSION" ">=" "0x5B"
+ TokenType = Integer
+End
+
+TOKEN
+ Name = "PEI_DBG_CFLAGS"
+ Value = "/nologo /c /O1 /W3 /WX /DALASKA_SUPPORT"
+ Token = "DBG_PI_INT_SUPPORT" "=" "0"
+ TokenType = Expression
+ TargetMAK = Yes
+End
+
+TOKEN
+ Name = "PEI_DBG_CFLAGS"
+ Value = "/nologo /c /O1 /W3 /WX /DALASKA_SUPPORT /D EFI_SPECIFICATION_VERSION=$(EFI_SPECIFICATION_VERSION) /D PI_SPECIFICATION_VERSION=$(PI_SPECIFICATION_VERSION)"
+ Token = "DBG_PI_INT_SUPPORT" "=" "1"
+ TokenType = Expression
+ TargetMAK = Yes
+End
+
+PATH
+ Name = "PeiAMIDebugRx_DIR"
+End
+
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.cif
new file mode 100644
index 0000000..75c0d11
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.cif
@@ -0,0 +1,12 @@
+<component>
+ name = "PeiDbgDbgr"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\PeiAMIDebugRx\"
+ RefName = "PeiDbgDbgr"
+[files]
+"PeiDbgDbgr.sdl"
+"PeiDbgDbgr.mak"
+"PeiDbgDbgr.dxs"
+"DBGR\mindbgr.obj"
+"DBGR\DbgrHdr.c"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.dxs b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.dxs
new file mode 100644
index 0000000..d537ae1
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.dxs
@@ -0,0 +1,57 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDbgDbgr.dxs 3 2/22/10 4:17p Madhans $
+//
+// $Revision: 3 $
+//
+// $Date: 2/22/10 4:17p $
+//*****************************************************************
+//*****************************************************************
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.dxs $
+//
+// 3 2/22/10 4:17p Madhans
+// 1.32
+//
+// 1 5/01/09 7:48p Madhans
+// AMIDebug Rx Module. Intial Checkin.
+//
+// 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.
+//
+//
+//*****************************************************************
+DEPENDENCY_START
+ FALSE
+DEPENDENCY_END
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDbgDbgr.mak b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.mak
new file mode 100644
index 0000000..1440d92
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.mak
@@ -0,0 +1,136 @@
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (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/PeiAMIDebugRx/PeiDbgDbgr.mak 2 7/17/09 7:15p Madhans $
+#
+# $Revision: 2 $
+#
+# $Date: 7/17/09 7:15p $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.mak $
+#
+# 2 7/17/09 7:15p Madhans
+# DebugRx 1.30.0022
+#
+# 4 7/15/09 5:56p Madhans
+# X64 Support and clean up.
+#
+# 3 7/13/09 2:48p Sudhirv
+# Updated with Coding Standards
+#
+# 2 7/08/09 9:34a Sudhirv
+#
+# 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:52a Sudhirv
+# AMI Debug Rx module created
+#
+# 6 12/12/08 5:42p Madhans
+# USB Redirection Module
+#
+# 4 6/13/07 3:38p Madhans
+# Copyright Year updated.
+#
+# 3 6/06/07 12:30p Madhans
+# Debugger 1.06
+#
+# 2 3/12/07 6:19p Madhans
+# !!!coding standards!!!!
+#
+# 1 1/22/07 4:12p Madhans
+# 1.04.0002 Binary Version.
+#
+# 2 10/20/05 10:06a Felixp
+# missing dependencies added
+#
+# 1 10/19/05 10:54a Felixp
+#
+# 1 10/19/05 10:44a Felixp
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: PeiDbgDbgr.mak
+#
+# Description: Make file pei debugger
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+all : PeiDbgDbgr
+
+PEIDBGDBGR_BUILD_DIR=$(PeiDbgDbgr_DIR)\DBGR
+
+PEIDBGDBGR_OBJECTS = \
+$(BUILD_DIR)\$(PeiDbgDbgr_DIR)\DBGR\dbgrhdr.obj
+
+PEIDBGMIN_OBJECTS = \
+$(PEIDBGDBGR_BUILD_DIR)\mindbgr.obj
+
+PEIDBGDBGRLIB = $(BUILD_DIR)\PeiDbgDbgr.lib
+
+PeiDbgDbgr : $(BUILD_DIR)\PeiDbgDbgr.mak $(PEIDBGDBGRLIB) PeiDbgDbgrBin
+
+$(BUILD_DIR)\PeiDbgDbgr.mak : $(PeiDbgDbgr_DIR)\$(@B).cif $(PeiDbgDbgr_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(PeiDbgDbgr_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+$(PEIDBGDBGRLIB) :
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\PeiDbgDbgr.mak all\
+ TYPE=PEI_LIBRARY\
+ LIBRARY_NAME=$(PEIDBGDBGRLIB)\
+ "CFLAGS=$(PEI_DBG_CFLAGS) /DRELOCATE /I$(PeiAMIDebugRx_DIR)\INC /I$(Foundation_DIR)"\
+ "EXT_HEADERS=$(BUILD_DIR)\Token.mak"
+
+PeiDbgDbgrBin :
+ @set INCLUDE=%%INCLUDE%%
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\PeiDbgDbgr.mak all\
+ GUID=4AAAAE15-5AEB-4c11-B91D-A3966AC04847\
+ ENTRY_POINT=InitDbgLayer\
+ TYPE=PEIM \
+ PE_IMAGE_FORMAT=1\
+ COMPRESS=0\
+ "OBJECTS="\
+ PRECOMPILED_OBJS=\
+ "EXT_HEADERS=$(BUILD_DIR)\Token.mak" \
+ "CFLAGS=$(PEI_DBG_CFLAGS) /DRELOCATE /I$(PeiDbgDbgr_DIR)\INC"
+
+PeiDbgDbgrBin : $(PEIDBGDBGR_OBJECTS)
+
+!IF "$(REDIRECTION_ONLY_MODE)" == "1"
+PeiDbgDbgrBin : $(PEIDBGMIN_OBJECTS)
+!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/PeiAMIDebugRx/PeiDbgDbgr.sdl b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.sdl
new file mode 100644
index 0000000..3870fd2
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgDbgr.sdl
@@ -0,0 +1,22 @@
+PATH
+ Name = "PeiDbgDbgr_DIR"
+End
+
+MODULE
+ Help = "Includes PeiDbgDbgr.mak to Project"
+ File = "PeiDbgDbgr.mak"
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\PeiDbgDbgr.ffs"
+ Parent = "FV_MAIN"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\PeiDbgDbgr.ffs"
+ Parent = "FV_BB"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "0"
+ InvokeOrder = AfterParent
+End
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.cif
new file mode 100644
index 0000000..29573db
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.cif
@@ -0,0 +1,11 @@
+<component>
+ name = "PeiDbgIDT"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\PeiAMIDebugRx\"
+ RefName = "PeiDbgIDT"
+[files]
+"PeiDbgIDT.sdl"
+"PeiDbgIDT.mak"
+"PeiDbgIDT.dxs"
+"IDT\emptyidt.obj"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.dxs b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.dxs
new file mode 100644
index 0000000..6f2decf
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.dxs
@@ -0,0 +1,59 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDbgIDT.dxs 3 2/22/10 4:17p Madhans $
+//
+// $Revision: 3 $
+//
+// $Date: 2/22/10 4:17p $
+//*****************************************************************
+//*****************************************************************
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.dxs $
+//
+// 3 2/22/10 4:17p Madhans
+// 1.32
+//
+// 1 5/01/09 7:48p Madhans
+// AMIDebug Rx Module. Intial Checkin.
+//
+// 3 1/05/07 6:15p Madhan
+//
+// 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.
+//
+//
+//*****************************************************************
+DEPENDENCY_START
+ FALSE
+DEPENDENCY_END
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDbgIDT.mak b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.mak
new file mode 100644
index 0000000..a4158d7
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.mak
@@ -0,0 +1,112 @@
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (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/PeiAMIDebugRx/PeiDbgIDT.mak 2 7/17/09 7:15p Madhans $
+#
+# $Revision: 2 $
+#
+# $Date: 7/17/09 7:15p $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.mak $
+#
+# 2 7/17/09 7:15p Madhans
+# DebugRx 1.30.0022
+#
+# 2 7/13/09 2:48p 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:52a Sudhirv
+# AMI Debug Rx module created
+#
+# 5 12/12/08 5:42p Madhans
+# USB Redirection Module
+#
+# 3 6/13/07 3:38p Madhans
+# Copyright Year updated.
+#
+# 2 3/12/07 6:19p Madhans
+# !!!coding standards!!!!
+#
+# 1 1/22/07 4:12p Madhans
+# 1.04.0002 Binary Version.
+#
+# 2 10/20/05 10:05a Felixp
+# missing dependencies added
+#
+# 1 10/19/05 10:54a Felixp
+#
+# 1 10/19/05 10:44a Felixp
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: PeiDbgIDT.mak
+#
+# Description: Makefile of pei idt module
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+all : PeiDbgIDT
+
+PEI_DBGIDT_BUILD_DIR=$(PeiDbgIDT_DIR)\IDT
+
+PEIDBGIDT_OBJECTS = \
+$(PeiDbgIDT_DIR)\IDT\emptyidt.obj
+
+PeiDbgIDT : $(BUILD_DIR)\PeiDbgIDT.mak PeiDbgIDTBin
+
+$(BUILD_DIR)\PeiDbgIDT.mak : $(PeiDbgIDT_DIR)\$(@B).cif $(PeiDbgIDT_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(PeiDbgIDT_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+PeiDbgIDTBin :
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\PeiDbgIDT.mak all\
+ GUID=811B4F4D-FB0B-4008-A42B-E551FD4A0F28\
+ ENTRY_POINT=SetUpIDT\
+ TYPE=PEIM \
+ COMPRESS=0\
+ "OBJECTS="\
+ PRECOMPILED_OBJS=\
+ "EXT_HEADERS=$(BUILD_DIR)\Token.mak" \
+ "CFLAGS=$(PEI_DBG_CFLAGS) /I$(PeiAMIDebugRx_DIR)\INC"
+
+
+!IF "$(REDIRECTION_ONLY_MODE)" == "1"
+PeiDbgIDTBin : $(PEIDBGIDT_OBJECTS)
+!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/PeiAMIDebugRx/PeiDbgIDT.sdl b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.sdl
new file mode 100644
index 0000000..610d3e9
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgIDT.sdl
@@ -0,0 +1,22 @@
+PATH
+ Name = "PeiDbgIDT_DIR"
+End
+
+MODULE
+ Help = "Includes PeiDbgIDT.mak to Project"
+ File = "PeiDbgIDT.mak"
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\PeiDbgIDT.ffs"
+ Parent = "FV_MAIN"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\PeiDbgIDT.ffs"
+ Parent = "FV_BB"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "0"
+ InvokeOrder = AfterParent
+End
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgMain.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgMain.cif
new file mode 100644
index 0000000..1b548e5
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgMain.cif
@@ -0,0 +1,10 @@
+<component>
+ name = "PeiDbgMain"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\PeiAMIDebugRx\"
+ RefName = "PeiDbgMain"
+[files]
+"\PeiDbgMain.sdl"
+"\MAIN\PeiDbgMain.ffs"
+"\MAIN\PeiDbgMain_PI_1_1.ffs"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgMain.sdl b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgMain.sdl
new file mode 100644
index 0000000..88d4276
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgMain.sdl
@@ -0,0 +1,55 @@
+PATH
+ Name = "PeiDbgMain_DIR"
+End
+
+ELINK
+ Name = "$(PeiDbgMain_DIR)\MAIN\PeiDbgMain.ffs"
+ Parent = "FV_MAIN"
+ Token = "DBG_PI_INT_SUPPORT" "=" "1"
+ Token = "PI_SPECIFICATION_VERSION" "<" "0x10000"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(PeiDbgMain_DIR)\MAIN\PeiDbgMain.ffs"
+ Parent = "FV_BB"
+ Token = "DBG_PI_INT_SUPPORT" "=" "1"
+ Token = "PI_SPECIFICATION_VERSION" "<" "0x10000"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "0"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(PeiDbgMain_DIR)\MAIN\PeiDbgMain_PI_1_1.ffs"
+ Parent = "FV_MAIN"
+ Token = "DBG_PI_INT_SUPPORT" "=" "1"
+ Token = "PI_SPECIFICATION_VERSION" ">=" "0x10000"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(PeiDbgMain_DIR)\MAIN\PeiDbgMain_PI_1_1.ffs"
+ Parent = "FV_BB"
+ Token = "DBG_PI_INT_SUPPORT" "=" "1"
+ Token = "PI_SPECIFICATION_VERSION" ">=" "0x10000"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "0"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(PeiDbgMain_DIR)\MAIN\PeiDbgMain.ffs"
+ Parent = "FV_BB"
+ Token = "DBG_PI_INT_SUPPORT" "=" "0"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "0"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(PeiDbgMain_DIR)\MAIN\PeiDbgMain.ffs"
+ Parent = "FV_MAIN"
+ Token = "DBG_PI_INT_SUPPORT" "=" "0"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "1"
+ InvokeOrder = AfterParent
+End
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.c b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.c
new file mode 100644
index 0000000..b816222
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.c
@@ -0,0 +1,390 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDbgPort.c 10 4/04/12 4:55p Sudhirv $
+//
+// $Revision: 10 $
+//
+// $Date: 4/04/12 4:55p $
+//*****************************************************************
+//*****************************************************************
+//
+// PeiSer.c
+//
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.c $
+//
+// 10 4/04/12 4:55p Sudhirv
+// To Avoid Build errors in special cases.
+//
+// 9 3/13/12 10:47a 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
+//
+// 8 4/01/11 2:46p Sudhirv
+// [TAG] EIP56888
+// [Category] Bug Fix
+// [Severity] Minor
+// [Symptom] DEBURX S3 resume hang 0x05 problem on Sabine platform
+// [Solution] Fixed the Initialization of the Debug Port to not differ
+// with Normal boot or S3 Resume.
+// [Files] PeiDbgPort.c
+//
+// 7 3/16/11 4:43p Sudhirv
+// Changes to Support Older Core before 4.6.5.0
+//
+// 6 3/09/11 8:20a Sudhirv
+// EIP 53658 - AMIDebugRx\Debugger support for PI 1.1
+//
+// 5 9/22/10 7:09p Sudhirv
+// 4.6.2_AMIDebugRx_2.01.0026_Beta Release
+//
+// 4 2/22/10 4:17p Madhans
+// 1.32
+//
+// 4 10/19/09 7:25a Sudhirv
+// Updated to Reduce S3 Resume wake time and fix SIO Issue
+//
+// 3 9/30/09 3:05p Sudhirv
+// For Debugger 1.31.0023_PreAlpha
+//
+// 2 7/13/09 2:48p 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:52a Sudhirv
+// AMI Debug Rx module created
+//
+// 11 3/27/09 8:45a Sudhirv
+// Updated Coding Standards.
+//
+// 10 8/29/07 1:00p Madhans
+// Common code for 4.x and 3.x
+//
+// 9 6/13/07 3:16p Madhans
+// Copyright Year updated.
+//
+// 8 3/13/07 4:00p Ashrafj
+// Update for Coding standard
+//
+// 7 3/06/07 7:51p Ashrafj
+// Checkpoint error code added for improper chipset init porting support
+// form the Aptio Core.
+//
+// 6 1/22/07 11:41a Madhans
+// Modification made for Binary Release 1.04.0003.
+//
+// 10 1/05/07 6:15p Madhan
+//
+// 9 1/05/07 1:05p Ashrafj
+// Latest version 1.04.0001 Beta
+// Known issues from previous 1.04.000 Beta release has been fixed.
+//
+// 8 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.
+//
+// 7 12/15/06 4:51p Ashrafj
+// Updated the Debugger eModule sources to support the CAR base address
+// define in the APtio 4.5 project SDL token itself.
+// Move the PEI Debugger modules (except PeiDebugSupport) from FV_BB to
+// FV_MAIN to avoid insufficient space problem in PEI. Note that for this
+// changes the Aptio 4.5 project should have the new version 0.4
+// PEIDEBUGFIXUP utility build tool with CORE.MAK modified (Refer Santa
+// Rosa project).
+//
+// 6 6/27/06 11:44a Ashrafj
+// New feature added:
+// To enable the PEI Debug support after system memory is installed, based
+// on build option provided through a new SDL token named
+// "PEI_DEBUG_SUPPORT_AFTER_MEMORY".
+//
+// 5 4/21/06 12:38p Ashrafj
+// Code cleanup.
+//
+// 4 3/15/06 7:41p Ashrafj
+// Modfication done to provide the Binary integration for Aptio 4
+// projects.
+//
+// 3 12/22/05 12:42p Ashrafj
+// Changes done to support the complete Chipset template porting.
+//
+// To use this changes, make sure to have the latest Board components of
+// CPU, SB and SIO, which have the following ELINKS ported:
+// - SBPEIDBG_Initialize,
+// - CPUPEIDBG_Initialize,
+// - SIOPEIDBG_Initialize,
+// - SBPEIDBG_InitUsbEhci.
+//
+// 2 12/15/05 12:13p Ashrafj
+// Minor reorganisation of Chipset porting method.
+//
+// 1 11/29/05 6:04p Markw
+//
+// 1 10/19/05 10:54a Felixp
+//
+//
+//*****************************************************************
+//**********************************************************************
+//<AMI_FHDR_START>
+//
+// Name: peidbgport.c
+//
+// Description: Calls the chipset elink and calls the initializartion
+// routines of debug port.
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+
+#ifndef ALASKA_SUPPORT
+#include "Efi.h"
+#include "SimpleCpuIoLib.h"
+#else
+#include <Efi.h>
+#endif
+#include "AmiDebugPort.h"
+#include "AMIPeiDebug.h"
+
+/////////////////////////////Porting definitions////////////////
+#ifdef ALASKA_SUPPORT
+#include "token.h"
+#else
+#include "tokens.h"
+#endif
+
+#ifdef ALASKA_SUPPORT
+#ifdef PEI_DBG_INIT_LIST
+extern PEI_INIT_FUNCTION PEI_DBG_INIT_LIST EndOfInitList;
+PEI_INIT_FUNCTION* PeiDebuggerInitList [] = {PEI_DBG_INIT_LIST NULL};
+#endif
+#endif
+
+#ifdef ALASKA_SUPPORT
+#ifdef PEI_DBG_S3_INIT_LIST
+extern PEI_INIT_FUNCTION PEI_DBG_S3_INIT_LIST EndOfInitS3List;
+PEI_INIT_FUNCTION* PeiDebuggerS3InitList [] = {PEI_DBG_S3_INIT_LIST NULL};
+#endif
+#endif
+
+#ifdef ALASKA_SUPPORT
+#ifdef IS_S3
+extern DBG_IS_S3 IS_S3 EndOfS3InitList;
+DBG_IS_S3 * IsDbgInS3[] = {IS_S3 NULL};
+#endif
+#endif
+
+#if defined PI_SPECIFICATION_VERSION
+#if PI_SPECIFICATION_VERSION >= 0x00010000
+const UINTN AMI_PEIDEBUGGER_DS_BASEADDRESS = 0;
+#else
+const UINTN AMI_PEIDEBUGGER_DS_BASEADDRESS = PEI_DEBUG_DATASECTION_BASEADDRESS;
+#endif
+#else
+const UINTN AMI_PEIDEBUGGER_DS_BASEADDRESS = PEI_DEBUG_DATASECTION_BASEADDRESS;
+#endif
+
+#ifndef ALASKA_SUPPORT
+extern EFI_STATUS SBPEIDBG_Initialize(PEI_DBG_PORT_INFO *DebugPort);
+extern EFI_STATUS CPUPEIDBG_Initialize(PEI_DBG_PORT_INFO *DebugPort);
+extern EFI_STATUS SIOPEIDBG_Initialize(PEI_DBG_PORT_INFO *DebugPort);
+#ifdef USB_DEBUGGER
+extern EFI_STATUS SBPEIDBG_InitUsbEhci(PEI_DBG_PORT_INFO *DebugPort);
+#endif
+#endif;
+
+#ifndef DBG_WRITE_IO_80_SUPPORT
+DBG_WRITE_IO_80_SUPPORT 0
+#endif
+//---->EIP 38453
+volatile UINT16 gS3ResumeSupport = AMI_DEBUG_RX_IN_S3_SUPPORT;
+volatile UINTN gDbgWriteIO80Support = DBG_WRITE_IO_80_SUPPORT;
+
+//---->EIP 38453
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: ExecutePeiDebuggerInitList()
+//
+// Description: Internal Helper function to invoke ELINKS.
+//
+// Input: PEI_DBG_PORT_INFO *DebugPort
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID
+ExecutePeiDebuggerInitList(
+ IN OUT PEI_DBG_PORT_INFO *DebugPort
+)
+{
+#ifdef ALASKA_SUPPORT
+ UINTN i;
+
+ if(!PeiDebuggerInitList){
+ if(gDbgWriteIO80Support)
+ IoWrite8(0x80,0xD0); //err code for No elinks found
+ while(1);
+ }
+ for(i=0; PeiDebuggerInitList[i]; i++) PeiDebuggerInitList[i](DebugPort);
+#else
+ SBPEIDBG_Initialize(DebugPort);
+ CPUPEIDBG_Initialize(DebugPort);
+ SIOPEIDBG_Initialize(DebugPort);
+#ifdef USB_DEBUGGER
+ SBPEIDBG_InitUsbEhci(DebugPort);
+#endif
+#endif
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: ExecutePeiDebuggerS3InitList()
+//
+// Description: Internal Helper function to invoke ELINKS.
+//
+// Input: PEI_DBG_PORT_INFO *DebugPort
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID
+ExecutePeiDebuggerS3InitList(
+ IN OUT PEI_DBG_PORT_INFO *DebugPort
+)
+{
+#ifdef ALASKA_SUPPORT
+ UINTN i;
+ for(i=0; PeiDebuggerS3InitList[i]; i++) PeiDebuggerS3InitList[i](DebugPort);
+#else
+ SIOPEIDBG_Initialize(DebugPort);
+#endif
+}
+////////////Routine part of Chipset Porting template/////////////////////
+
+void Initialise(PEI_DBG_PORT_INFO *DebugPort);
+void InitPeiDebugPortInterface(PEI_DBG_PORT_INFO *DebugPort, UINTN SetupFlag, UINTN IDTBaseAddress);
+/////////////////////////////////////////////////////////////////////////
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: InitMain
+//
+// Description: entrypoint for the PeiDbgPort, the module init the specific
+// chipset.
+//
+// Input: void
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+void InitMain(UINTN IDTBASEADDR)
+{
+ PEI_DBG_PORT_INFO DebugPort;
+ UINTN PeiDbgSetupFlag;
+ UINT8 Val;
+
+ PEIDebugData_T *pData = (PEIDebugData_T *)IDTBASEADDR;
+ SerXPortGblData_T *SerData = (SerXPortGblData_T *)pData->XportLocalVar;
+
+#if PEI_DEBUG_SUPPORT_AFTER_MEMORY
+ PeiDbgSetupFlag = 1;
+#else
+ PeiDbgSetupFlag = 0;
+#endif
+ SerData->m_IsHostConnected = 0;
+
+//---->EIP 38453
+ // If AMI_DEBUG_RX_IN_S3_SUPPORT is ON AmidebugRx should initialize for both S3 and normal boot
+ if(gS3ResumeSupport)
+ {
+ // EIP 56888 - DEBURX S3 resume hang 0x05 problem on Sabine platform
+ // If SDL Token is ON then there must be no difference for normal boot or S3 Resume
+ SerData->m_IsPeiDbgIsS3 = 1;
+ Initialise(&DebugPort);
+
+ ExecutePeiDebuggerInitList(&DebugPort);
+
+ InitPeiDebugPortInterface(&DebugPort,PeiDbgSetupFlag,IDTBASEADDR);
+ }
+ else // else SDL token is OFF AMIDebugRx should be init only if normal boot.
+ {
+ //To find if PeiDbgPort is happening for normal boot or for S3 while resume
+ Val = IsDbgInS3[0](); //Hook will return 1 if SBPeiDbg_Initialize is there else 0
+ if(!Val)
+ { // 0 returned - Normal Boot
+ SerData->m_IsPeiDbgIsS3 = 1;
+ Initialise(&DebugPort);
+
+ ExecutePeiDebuggerInitList(&DebugPort);
+
+ InitPeiDebugPortInterface(&DebugPort,PeiDbgSetupFlag,IDTBASEADDR);
+ }
+ else
+ { //1 returned - Returning from S3
+ ExecutePeiDebuggerS3InitList(&DebugPort);
+ SerData->m_IsPeiDbgIsS3 = 0;
+ }
+//---->EIP 38453
+ }
+}
+
+
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDbgPort.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.cif
new file mode 100644
index 0000000..1b8c397
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.cif
@@ -0,0 +1,12 @@
+<component>
+ name = "PeiDbgPort"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\PeiAMIDebugRx\"
+ RefName = "PeiDbgPort"
+[files]
+"PeiDbgPort.sdl"
+"PeiDbgPort.mak"
+"PeiDbgPort.dxs"
+"PeiDbgPortUSB.obj"
+"PeiDbgPort.c"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.dxs b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.dxs
new file mode 100644
index 0000000..80fdc9c
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.dxs
@@ -0,0 +1,60 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDbgPort.dxs 3 2/22/10 4:17p Madhans $
+//
+// $Revision: 3 $
+//
+// $Date: 2/22/10 4:17p $
+//*****************************************************************
+//*****************************************************************
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.dxs $
+//
+// 3 2/22/10 4:17p Madhans
+// 1.32
+//
+// 1 5/01/09 7:48p Madhans
+// AMIDebug Rx Module. Intial Checkin.
+//
+// 3 1/05/07 6:15p Madhan
+//
+// 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.
+//
+//
+//*****************************************************************
+DEPENDENCY_START
+ FALSE
+DEPENDENCY_END
+
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDbgPort.mak b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.mak
new file mode 100644
index 0000000..448998c
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.mak
@@ -0,0 +1,176 @@
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (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/PeiAMIDebugRx/PeiDbgPort.mak 6 6/28/11 7:53a Sudhirv $
+#
+# $Revision: 6 $
+#
+# $Date: 6/28/11 7:53a $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.mak $
+#
+# 6 6/28/11 7:53a Sudhirv
+# [TAG] EIP63446
+# [Category] Defect.
+# [Description] To avoid build errors with Core 4.6.5.1_2 and
+# AMIDebugRx Bin
+# [Files] PEIDbgPort.mak
+#
+# 5 3/24/11 7:00p Madhans
+# To remove /Fc from the CFLAGS
+#
+# 4 2/22/10 4:17p Madhans
+# 1.32
+#
+# 5 2/20/10 11:44a Madhans
+# if PeiDebuggerS3Initialize is found then use that in S3 case.
+# If not found try to use defaultSioinit function(SIOPEIDBG_Initialize)
+# if it found in PeiDebuggerInitialize
+#
+# 4 10/19/09 7:25a Sudhirv
+# Updated to Reduce S3 Resume wake time and fix SIO Issue
+#
+# 3 9/30/09 3:05p Sudhirv
+# For Debugger 1.31.0023_PreAlpha
+#
+# 2 7/13/09 2:48p 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:45p Madhans
+#
+# 1 4/29/09 7:52a Sudhirv
+# AMI Debug Rx module created
+#
+# 5 12/12/08 5:42p Madhans
+# USB Redirection Module
+#
+# 3 6/13/07 3:38p Madhans
+# Copyright Year updated.
+#
+# 2 3/12/07 6:19p Madhans
+# !!!coding standards!!!!
+#
+# 1 1/22/07 4:12p Madhans
+# 1.04.0002 Binary Version.
+#
+# 5 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.
+#
+# 4 4/21/06 12:38p Ashrafj
+# Code cleanup.
+#
+# 3 3/15/06 7:41p Ashrafj
+# Modfication done to provide the Binary integration for Aptio 4
+# projects.
+#
+# 2 12/22/05 12:42p Ashrafj
+# Changes done to support the complete Chipset template porting.
+#
+# To use this changes, make sure to have the latest Board components of
+# CPU, SB and SIO, which have the following ELINKS ported:
+# - SBPEIDBG_Initialize,
+# - CPUPEIDBG_Initialize,
+# - SIOPEIDBG_Initialize,
+# - SBPEIDBG_InitUsbEhci.
+#
+# 1 11/29/05 6:04p Markw
+#
+# 2 10/20/05 10:05a Felixp
+# missing dependencies added
+#
+# 1 10/19/05 10:54a Felixp
+#
+# 1 10/19/05 10:44a Felixp
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: PeiDbgPort.mak
+#
+# Description: Makefile of Pei debugPort module
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+all : PeiDbgPort
+
+PEIDBGPORT_OBJECTS = \
+$(BUILD_DIR)\$(PEI_DBG_PORT_DIR)\PeiDbgPort.obj \
+
+PEIDBGPORTUSB_OBJECTS = \
+$(PEI_DBG_PORT_DIR)\PeiDbgPortUSB.obj
+
+#if PeiDebuggerS3Initialize is found then use that in S3 case.
+#If not found try to use defaultSioinit function(SIOPEIDBG_Initialize) if it found in PeiDebuggerInitialize
+!IF "$(PeiDebuggerS3Initialize)" == ""
+!IF "$(PeiDebuggerInitialize:SIOPEIDBG_Initialize,=)" != "$(PeiDebuggerInitialize)"
+DbgRxSioS3Initialize = SIOPEIDBG_Initialize,
+!ENDIF
+!ELSE
+DbgRxSioS3Initialize = $(PeiDebuggerS3Initialize)
+!ENDIF
+
+PeiDbgPort : $(BUILD_DIR)\PeiDbgPort.mak PeiDbgPortBin
+
+$(BUILD_DIR)\PeiDbgPort.mak : $(PEI_DBG_PORT_DIR)\$(@B).cif $(PEI_DBG_PORT_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(PEI_DBG_PORT_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+PeiDbgPortBin : $(AMICSPLib) $(AMIPEILIB)
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\PeiDbgPort.mak all\
+ GUID=EB7D9740-DB60-45c2-A7A0-C2714EF4EB56\
+ ENTRY_POINT=InitMain\
+ TYPE=PEIM \
+ COMPRESS=0\
+ "EXT_HEADERS=$(BUILD_DIR)\Token.mak" \
+ EXT_HEADERS=$(BUILD_DIR)\token.h\
+ "OBJECTS=$(PEIDBGPORT_OBJECTS)"\
+ "INIT_LIST=$(IsDbgS3)"\
+ PRECOMPILED_OBJS=\
+ "CFLAGS= $(GLOBAL_DEFINES) $(PEI_DBG_CFLAGS) /I$(PEI_DBG_PORT_DIR)\INC /D\"PEI_DBG_INIT_LIST=$(PeiDebuggerInitialize)\" /D\"PEI_DBG_S3_INIT_LIST=$(DbgRxSioS3Initialize)\" /DUSB_DEBUGGER /D\"IS_S3=$(IsDbgS3)\" "
+
+!IF "$(USB_DEBUG_TRANSPORT)" == "1"
+PeiDbgPortBin : $(PEIDBGPORTUSB_OBJECTS)
+!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/PeiAMIDebugRx/PeiDbgPort.sdl b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.sdl
new file mode 100644
index 0000000..b0b1f55
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPort.sdl
@@ -0,0 +1,51 @@
+PATH
+ Name = "PEI_DBG_PORT_DIR"
+End
+
+MODULE
+ Help = "Includes PeiDbgPort.mak to Project"
+ File = "PeiDbgPort.mak"
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\PeiDbgPort.ffs"
+ Parent = "FV_MAIN"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\PeiDbgPort.ffs"
+ Parent = "FV_BB"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "0"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "PeiDebuggerInitialize"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = " "
+ Parent = "PeiSioInit,"
+ Token = "PeiDebugger_SUPPORT" "=" "1"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "IsDbgS3"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "PeiDbgIsS3Hook,"
+ Parent = "IsDbgS3"
+ InvokeOrder = ReplaceParent
+End
+
+ELINK
+ Name = "PeiDebuggerS3Initialize"
+ InvokeOrder = ReplaceParent
+End
+
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPortUSB.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPortUSB.obj
new file mode 100644
index 0000000..a374375
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgPortUSB.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.cif
new file mode 100644
index 0000000..f648655
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.cif
@@ -0,0 +1,14 @@
+<component>
+ name = "PeiDbgXport"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\PeiAMIDebugRx\"
+ RefName = "PeiDbgXport"
+[files]
+"PeiDbgXport.sdl"
+"PeiDbgXport.mak"
+"PeiDbgXport.dxs"
+"XPORT\XportHdr.c"
+[parts]
+"PeiXportDbgr"
+"PeiXportRedir"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.dxs b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.dxs
new file mode 100644
index 0000000..18deabe
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.dxs
@@ -0,0 +1,59 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDbgXport.dxs 3 2/22/10 4:17p Madhans $
+//
+// $Revision: 3 $
+//
+// $Date: 2/22/10 4:17p $
+//*****************************************************************
+//*****************************************************************
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.dxs $
+//
+// 3 2/22/10 4:17p Madhans
+// 1.32
+//
+// 1 5/01/09 7:48p Madhans
+// AMIDebug Rx Module. Intial Checkin.
+//
+// 3 1/05/07 6:15p Madhan
+//
+// 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.
+//
+//
+//*****************************************************************
+DEPENDENCY_START
+ FALSE
+DEPENDENCY_END
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDbgXport.mak b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.mak
new file mode 100644
index 0000000..e6af02d
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.mak
@@ -0,0 +1,160 @@
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (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/PeiAMIDebugRx/PeiDbgXport.mak 3 7/17/09 7:15p Madhans $
+#
+# $Revision: 3 $
+#
+# $Date: 7/17/09 7:15p $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.mak $
+#
+# 3 7/17/09 7:15p Madhans
+# DebugRx 1.30.0022
+#
+# 3 7/13/09 2:48p Sudhirv
+# Updated with Coding Standards
+#
+# 2 7/10/09 11:44a Sudhirv
+# Updated
+#
+# 1 7/07/09 4:46p Sudhirv
+# Restructure Binaries Created
+#
+# 2 5/05/09 8:05p Madhans
+# Use the timestamp.h instead of timstamp.mak to avoid the octal issues.
+#
+# 1 5/01/09 7:48p Madhans
+# AMIDebug Rx Module. Intial Checkin.
+#
+# 2 5/01/09 7:45p Madhans
+#
+# 1 4/29/09 7:52a Sudhirv
+# AMI Debug Rx module created
+#
+# 7 12/12/08 5:42p Madhans
+# USB Redirection Module
+#
+# 5 6/13/07 3:38p Madhans
+# Copyright Year updated.
+#
+# 4 6/06/07 12:30p Madhans
+# Debugger 1.06
+#
+# 3 3/12/07 6:19p Madhans
+# !!!coding standards!!!!
+#
+# 2 1/25/07 3:07p Madhans
+# xporthdr.c added as source
+#
+# 1 1/22/07 4:12p Madhans
+# 1.04.0002 Binary Version.
+#
+# 6 12/15/06 4:51p Ashrafj
+# Updated the Debugger eModule sources to support the CAR base address
+# define in the APtio 4.5 project SDL token itself.
+# Move the PEI Debugger modules (except PeiDebugSupport) from FV_BB to
+# FV_MAIN to avoid insufficient space problem in PEI. Note that for this
+# changes the Aptio 4.5 project should have the new version 0.4
+# PEIDEBUGFIXUP utility build tool with CORE.MAK modified (Refer Santa
+# Rosa project).
+#
+# 5 3/15/06 7:43p Ashrafj
+# Modfication done to provide the Binary integration for Aptio 4
+# projects.
+#
+# 4 12/12/05 3:22p Ashrafj
+# Compiler optimization disable for Serial Port PEI Debug Transport.
+#
+# 3 10/20/05 10:51a Ashrafj
+# Compiler flags reset to original.
+#
+# 2 10/20/05 10:06a Felixp
+# missing dependencies added
+#
+# 1 10/19/05 10:54a Felixp
+#
+# 1 10/19/05 10:44a Felixp
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: PeiDbgXport.mak
+#
+# Description: Makefile of Pei debugger Xport module
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+all : PeiDbgXport
+
+!IF "$(REDIRECTION_ONLY_MODE)" == "1"
+PEIDBGXPORT_BUILD_DIR=$(PeiDbgXport_DIR)\XPORT\REDIR\
+!ELSE
+PEIDBGXPORT_BUILD_DIR=$(PeiDbgXport_DIR)\XPORT\DBGR\
+!ENDIF
+
+PEIDBGXPORT_OBJECTS = \
+$(BUILD_DIR)\$(PeiDbgXport_DIR)\XPORT\XportHdr.obj\
+$(PEIDBGXPORT_BUILD_DIR)\xp_layer.obj\
+$(PEIDBGXPORT_BUILD_DIR)\transport.obj\
+
+!IF "$(USB_DEBUG_TRANSPORT)" == "1"
+PEIDBGXPORT_USB_OBJECTS = \
+$(PEIDBGXPORT_BUILD_DIR)\UsbDebugPort.obj\
+$(PEIDBGXPORT_BUILD_DIR)\usb_acc.obj\
+$(PEIDBGXPORT_BUILD_DIR)\usb_xp.obj
+!ENDIF
+
+PeiDbgXport : $(BUILD_DIR)\PeiDbgXport.mak PeiDbgXportBin
+
+$(BUILD_DIR)\PeiDbgXport.mak : $(PeiDbgXport_DIR)\$(@B).cif $(PeiDbgXport_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(PeiDbgXport_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+PeiDbgXportBin :
+ @set INCLUDE=%%INCLUDE%%
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\PeiDbgXport.mak all\
+ GUID=C7E8BB67-1C3F-41ba-820F-3D0E9C365042\
+ ENTRY_POINT=InitXLayer\
+ TYPE=PEIM \
+ PE_IMAGE_FORMAT=1\
+ COMPRESS=0\
+ "EXT_HEADERS=$(PeiDbgXport_DIR)\PeiDbgXport.mak $(BUILD_DIR)\Token.mak" \
+ "OBJECTS=$(PEIDBGXPORT_OBJECTS)"\
+ PRECOMPILED_OBJS=\
+ "CFLAGS=$(PEI_DBG_CFLAGS) /DRELOCATE /I$(PeiAMIDebugRx_DIR)\INC"
+
+
+!IF "$(USB_DEBUG_TRANSPORT)" == "1"
+PeiDbgXportBin : $(PEIDBGXPORT_USB_OBJECTS)
+!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/PeiAMIDebugRx/PeiDbgXport.sdl b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.sdl
new file mode 100644
index 0000000..42a90ba
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDbgXport.sdl
@@ -0,0 +1,32 @@
+PATH
+ Name = "PeiDbgXport_DIR"
+End
+
+MODULE
+ Help = "Includes PeiDbgXport.mak to Project"
+ File = "PeiDbgXport.mak"
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\PeiDbgXport.ffs"
+ Parent = "FV_MAIN"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\PeiDbgXport.ffs"
+ Parent = "FV_BB"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "0"
+ InvokeOrder = AfterParent
+End
+
+TOKEN
+ Name = "TARGET_PROJECT_TAG"
+ Value = "$(PROJECT_TAG)$(PROJECT_MAJOR_VERSION)$(PROJECT_MINOR_VERSION).rom"
+ Help = "File name of the BIOS rom image"
+ TokenType = Expression
+ TargetMAK = Yes
+ TargetH = Yes
+ Range = "valid file name"
+End
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/AmiDebugPort.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/AmiDebugPort.obj
new file mode 100644
index 0000000..7d83a0b
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/AmiDebugPort.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/CopyDbgXPortUsb.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/CopyDbgXPortUsb.obj
new file mode 100644
index 0000000..4caa1bd
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/CopyDbgXPortUsb.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/DbgrHelp.c b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/DbgrHelp.c
new file mode 100644
index 0000000..fda0704
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/DbgrHelp.c
@@ -0,0 +1,168 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDebugSupport/DbgrHelp.c 6 4/04/12 4:57p Sudhirv $
+//
+// $Revision: 6 $
+//
+// $Date: 4/04/12 4:57p $
+//*****************************************************************
+//*****************************************************************
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/DbgrHelp.c $
+//
+// 6 4/04/12 4:57p Sudhirv
+// To Avoid Build errors in special cases.
+//
+// 5 3/13/12 10:47a 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
+//
+// 4 5/13/11 4:13p Madhans
+// [TAG] EIP60365
+// [Category] Bug Fix
+// [Severity] Important
+// [Symptom] LoadFV not working for PI 1.1 BIOS
+// [RootCause] The SDK Token values need to come from the building
+// project. But it was included with Binary so change SDL value cause the
+// feature to break
+// [Solution] SDL token values are will used be source.
+// [Files] relocdbg.obj
+// relocdbg_PI_1_1.obj
+// dbghelp.c
+//
+// 3 3/09/11 8:23a 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:50p 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:52a Sudhirv
+// AMI Debug Rx module created
+//
+// 6 3/27/09 8:41a Sudhirv
+// Updated Coding Standards.
+//
+// 5 6/13/07 3:17p Madhans
+// Copyright Year updated.
+//
+// 4 1/22/07 11:42a Madhans
+// Modification made for Binary Release 1.04.0003.
+//
+// 4 1/05/07 6:15p Madhan
+//
+// 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: DbgHelp.c
+//
+// Description: File containing the globals for CAR base address & size.
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+#include "misc.h"
+#include "AMIPeiDebug.h"
+
+#if defined (PI_SPECIFICATION_VERSION) && (PI_SPECIFICATION_VERSION >= 0x00010000)
+const UINTN AMI_PEIDEBUGGER_DS_BASEADDRESS = 0;
+const 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
+
+#ifndef ALASKA_SUPPORT
+
+#define FV_MAIN_BLOCKS FLASH_REGION_FVMAIN_SIZE_IN_BLOCKS
+#define FV_BB_BLOCKS FLASH_REGION_FV_RECOVERY_SIZE_IN_BLOCKS
+#define FV_MAIN_BASE FLASH_REGION_FVMAIN_BASE
+
+#endif
+
+#ifndef FV_MAIN_BASE
+#define FV_MAIN_BASE 0
+#endif
+#ifndef FV_MAIN_BLOCKS
+#define FV_MAIN_BLOCKS 0
+#endif
+#ifndef FV_BB_BLOCKS
+#define FV_BB_BLOCKS 0
+#endif
+#ifndef FLASH_BLOCK_SIZE
+#define FLASH_BLOCK_SIZE 0
+#endif
+#ifndef DBG_WRITE_IO_80_SUPPORT
+#define DBG_WRITE_IO_80_SUPPORT 0
+#endif
+
+UINTN gFvMainBase = FV_MAIN_BASE;
+UINTN gFvMainBlocks = FV_MAIN_BLOCKS;
+UINTN gFvBBBlocks = FV_BB_BLOCKS;
+UINTN gBlockSize = FLASH_BLOCK_SIZE;
+
+volatile UINTN gDbgWriteIO80Support = DBG_WRITE_IO_80_SUPPORT;
+
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDebugSupport/DebugPortUsb.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/DebugPortUsb.obj
new file mode 100644
index 0000000..1f99233
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/DebugPortUsb.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/EmptyNotify.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/EmptyNotify.obj
new file mode 100644
index 0000000..c195566
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/EmptyNotify.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/Emptyrelocdbgidt.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/Emptyrelocdbgidt.obj
new file mode 100644
index 0000000..cdea427
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/Emptyrelocdbgidt.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDbgSupportX64.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDbgSupportX64.obj
new file mode 100644
index 0000000..4434d4a
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDbgSupportX64.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDbgSupportX64_PI_1_1.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDbgSupportX64_PI_1_1.obj
new file mode 100644
index 0000000..fc4e630
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDbgSupportX64_PI_1_1.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.cif
new file mode 100644
index 0000000..4fffdab
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.cif
@@ -0,0 +1,23 @@
+<component>
+ name = "PeiDebugSupport"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\PeiAMIDebugRx\PeiDebugSupport\"
+ RefName = "PeiDebugSupport"
+[files]
+"PeiDebugSupport.sdl"
+"PeiDebugSupport.mak"
+"PeiDebugSupport.dxs"
+"PeiDebugSupport.obj"
+"PeiDebugSupport_PI_1_1.obj"
+"relocdbg.obj"
+"relocdbg_PI_1_1.obj"
+"Emptyrelocdbgidt.obj"
+"AmiDebugPort.obj"
+"DebugPortUsb.obj"
+"CopyDbgXPortUsb.obj"
+"EmptyNotify.obj"
+"PeiDbgSupportX64.obj"
+"PeiDbgSupportX64_PI_1_1.obj"
+"emptyX64idt.obj"
+"DbgrHelp.c"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.dxs b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.dxs
new file mode 100644
index 0000000..8d1f5bc
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.dxs
@@ -0,0 +1,54 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.dxs 3 2/22/10 4:18p Madhans $
+//
+// $Revision: 3 $
+//
+// $Date: 2/22/10 4:18p $
+//*****************************************************************
+//*****************************************************************
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.dxs $
+//
+// 3 2/22/10 4:18p Madhans
+// 1.32
+//
+// 1 5/01/09 7:48p Madhans
+// AMIDebug Rx Module. Intial Checkin.
+//
+//
+//
+//*****************************************************************
+DEPENDENCY_START
+ FALSE
+DEPENDENCY_END
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.mak b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.mak
new file mode 100644
index 0000000..216ca79
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.mak
@@ -0,0 +1,191 @@
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (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/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.mak 4 3/16/11 4:44p Sudhirv $
+#
+# $Revision: 4 $
+#
+# $Date: 3/16/11 4:44p $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.mak $
+#
+# 4 3/16/11 4:44p Sudhirv
+# Changes to Support Older Cores before 4.6.5.0
+#
+# 3 3/09/11 8:23a 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:50p 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:47p Madhans
+#
+# 1 4/29/09 7:52a Sudhirv
+# AMI Debug Rx module created
+#
+# 7 12/12/08 5:42p Madhans
+# USB Redirection Module
+#
+# 5 6/13/07 3:38p Madhans
+# Copyright Year updated.
+#
+# 4 6/06/07 6:13p Madhans
+# Leave the Peidbgsupport in PE format
+#
+# 3 3/12/07 6:20p Madhans
+# !!!coding standards!!!!
+#
+# 2 3/10/07 2:40p Madhans
+# For 1.05.binary Release.
+#
+# 1 1/22/07 4:12p Madhans
+# 1.04.0002 Binary Version.
+#
+# 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 12/15/06 4:51p Ashrafj
+# Updated the Debugger eModule sources to support the CAR base address
+# define in the APtio 4.5 project SDL token itself.
+# Move the PEI Debugger modules (except PeiDebugSupport) from FV_BB to
+# FV_MAIN to avoid insufficient space problem in PEI. Note that for this
+# changes the Aptio 4.5 project should have the new version 0.4
+# PEIDEBUGFIXUP utility build tool with CORE.MAK modified (Refer Santa
+# Rosa project).
+#
+# 4 7/05/06 1:39p Ashrafj
+# Include path updated
+#
+# 3 3/15/06 7:48p Ashrafj
+# Modfication done to provide the Binary integration for Aptio 4
+# projects.
+#
+# 2 10/20/05 10:06a Felixp
+# missing dependencies added
+#
+# 1 10/19/05 10:54a Felixp
+#
+# 1 10/19/05 10:44a Felixp
+#
+#**********************************************************************
+#<AMI_FHDR_START>
+#
+# Name: PeiDebugSupport.mak
+#
+# Description: Makefile of Pei DebugSupport PEI Module
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+
+PEI_DBGSUPPORT_CFLAGS = $(PEI_DBG_CFLAGS) /I$(PeiAMIDebugRx_DIR)\INC
+
+PEI_DBGSUPPORT_BUILD_DIR=$(PeiDebugSupport_DIR)
+
+PEI_DBGSUPPORT_OBJECTS =\
+!IFDEF PI_SPECIFICATION_VERSION
+!IF $(PI_SPECIFICATION_VERSION)>=0x00010000
+$(PEI_DBGSUPPORT_BUILD_DIR)\peidebugsupport_PI_1_1.obj \
+$(PEI_DBGSUPPORT_BUILD_DIR)\relocdbg_PI_1_1.obj \
+!ELSE
+$(PEI_DBGSUPPORT_BUILD_DIR)\peidebugsupport.obj \
+$(PEI_DBGSUPPORT_BUILD_DIR)\relocdbg.obj \
+!ENDIF
+!ELSE
+$(PEI_DBGSUPPORT_BUILD_DIR)\peidebugsupport.obj \
+$(PEI_DBGSUPPORT_BUILD_DIR)\relocdbg.obj \
+!ENDIF
+$(PEI_DBGSUPPORT_BUILD_DIR)\AmiDebugPort.obj \
+$(BUILD_DIR)\$(PeiDebugSupport_DIR)\DbgrHelp.obj \
+!IF "$(USB_DEBUG_TRANSPORT)" == "1"
+$(PEI_DBGSUPPORT_BUILD_DIR)\DebugPortUsb.obj \
+!ENDIF
+!IF "$(REDIRECTION_ONLY_MODE)" == "1"
+$(PEI_DBGSUPPORT_BUILD_DIR)\Emptyrelocdbgidt.obj \
+!ENDIF
+!IF "$(x64_BUILD)"=="1"
+!IFDEF PI_SPECIFICATION_VERSION
+!IF $(PI_SPECIFICATION_VERSION)>=0x00010000
+$(PEI_DBGSUPPORT_BUILD_DIR)\PeiDbgSupportX64_PI_1_1.obj \
+!ELSE
+$(PEI_DBGSUPPORT_BUILD_DIR)\PeiDbgSupportX64.obj \
+!ENDIF
+!ELSE
+$(PEI_DBGSUPPORT_BUILD_DIR)\PeiDbgSupportX64.obj \
+!ENDIF
+!IF "$(USB_DEBUG_TRANSPORT)" == "1"
+$(PEI_DBGSUPPORT_BUILD_DIR)\CopyDbgXPortUsb.obj \
+!ENDIF
+!IF "$(REDIRECTION_ONLY_MODE)" == "1"
+$(PEI_DBGSUPPORT_BUILD_DIR)\emptyX64idt.obj \
+!ENDIF
+!ELSE
+$(PEI_DBGSUPPORT_BUILD_DIR)\EmptyNotify.obj \
+!ENDIF
+
+
+all : PeiDebugSupport
+
+PeiDebugSupport : $(BUILD_DIR)\PeiDebugSupport.mak PeiDebugSupportBin
+
+$(BUILD_DIR)\PeiDebugSupport.mak : $(PeiDebugSupport_DIR)\$(@B).cif $(PeiDebugSupport_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(PeiDebugSupport_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+PeiDebugSupportBin : $(AMIPEILIB)
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\PeiDebugSupport.mak all\
+ GUID=A47438D5-94E9-49b3-BC31-7E6BC9363814\
+ ENTRY_POINT=PeiDebugSupportEntry \
+ TYPE=PEIM \
+ PE_IMAGE_FORMAT=1\
+ "EXT_HEADERS=$(BUILD_DIR)\Token.mak" \
+ "EXT_HEADERS=$(BUILD_DIR)\token.h"\
+ COMPRESS=0\
+ PRECOMPILED_OBJS=\
+ "OBJECTS=$(PEI_DBGSUPPORT_OBJECTS)"\
+ "CFLAGS = $(PEI_DBGSUPPORT_CFLAGS)"
+
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (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/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.obj
new file mode 100644
index 0000000..ab08637
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.sdl b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.sdl
new file mode 100644
index 0000000..b6ad7a5
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport.sdl
@@ -0,0 +1,24 @@
+PATH
+ Name = "PeiDebugSupport_DIR"
+End
+
+MODULE
+ Help = "Includes PeiDebugSupport.mak to Project"
+ File = "PeiDebugSupport.mak"
+End
+
+
+# To move PeiDebugSupport.ffs to FV_MAIN refer the Release notes
+#ELINK
+# Name = "$(BUILD_DIR)\PeiDebugSupport.ffs"
+# Parent = "FV_MAIN"
+# Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "1"
+# InvokeOrder = AfterParent
+#End
+
+ELINK
+ Name = "$(BUILD_DIR)\PeiDebugSupport.ffs"
+ Parent = "FV_BB"
+# Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "!=" "1"
+ InvokeOrder = AfterParent
+End
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport_PI_1_1.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport_PI_1_1.obj
new file mode 100644
index 0000000..c57e301
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/PeiDebugSupport_PI_1_1.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/emptyX64idt.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/emptyX64idt.obj
new file mode 100644
index 0000000..48e0fa3
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/emptyX64idt.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/relocdbg.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/relocdbg.obj
new file mode 100644
index 0000000..2883933
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/relocdbg.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/relocdbg_PI_1_1.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/relocdbg_PI_1_1.obj
new file mode 100644
index 0000000..df1707d
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/PeiDebugSupport/relocdbg_PI_1_1.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/UsbDebugPort.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/UsbDebugPort.obj
new file mode 100644
index 0000000..291e959
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/UsbDebugPort.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/transport.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/transport.obj
new file mode 100644
index 0000000..966529a
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/transport.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/usb_acc.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/usb_acc.obj
new file mode 100644
index 0000000..2be39d9
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/usb_acc.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/usb_xp.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/usb_xp.obj
new file mode 100644
index 0000000..6f39d73
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/usb_xp.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/xp_layer.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/xp_layer.obj
new file mode 100644
index 0000000..2a532d9
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/DBGR/xp_layer.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/PeiXportDbgr.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/PeiXportDbgr.cif
new file mode 100644
index 0000000..1ec1cf0
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/PeiXportDbgr.cif
@@ -0,0 +1,12 @@
+<component>
+ name = "PeiXportDbgr"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\PeiAMIDebugRx\XPORT"
+ RefName = "PeiXportDbgr"
+[files]
+"DBGR\xp_layer.obj"
+"DBGR\transport.obj"
+"DBGR\usb_acc.obj"
+"DBGR\usb_xp.obj"
+"DBGR\UsbDebugPort.obj"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/PeiXportRedir.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/PeiXportRedir.cif
new file mode 100644
index 0000000..0d80331
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/PeiXportRedir.cif
@@ -0,0 +1,12 @@
+<component>
+ name = "PeiXportRedir"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\PeiAMIDebugRx\XPORT"
+ RefName = "PeiXportRedir"
+[files]
+"REDIR\xp_layer.obj"
+"REDIR\transport.obj"
+"REDIR\usb_acc.obj"
+"REDIR\usb_xp.obj"
+"REDIR\UsbDebugPort.obj"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/UsbDebugPort.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/UsbDebugPort.obj
new file mode 100644
index 0000000..6600831
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/UsbDebugPort.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/transport.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/transport.obj
new file mode 100644
index 0000000..95a8db8
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/transport.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/usb_acc.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/usb_acc.obj
new file mode 100644
index 0000000..989438e
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/usb_acc.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/usb_xp.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/usb_xp.obj
new file mode 100644
index 0000000..bfb1726
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/usb_xp.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/xp_layer.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/xp_layer.obj
new file mode 100644
index 0000000..2552aed
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/REDIR/xp_layer.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/XportHdr.c b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/XportHdr.c
new file mode 100644
index 0000000..56c2ad7
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/XportHdr.c
@@ -0,0 +1,454 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/XPORT/XportHdr.c 9 4/04/12 4:57p Sudhirv $
+//
+// $Revision: 9 $
+//
+// $Date: 4/04/12 4:57p $
+//*****************************************************************
+//*****************************************************************
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/XPORT/XportHdr.c $
+//
+// 9 4/04/12 4:57p Sudhirv
+// To Avoid Build errors in special cases.
+//
+// 8 3/13/12 10:47a 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
+//
+// 7 7/12/11 5:27p Sudhirv
+// [TAG] EIP62342
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] Target Crashes when Debugger enabled and AMIDebugRx is in
+// Checkpoint mode
+// [RootCause] Debugger is Enabled and AMIDebugRx device is connected in
+// checkpoint mode. Target MAchine is unaware of the type of host
+// connected in DXE phase.
+// [Solution] Support to not crash when Debugger enabled and Rx switch
+// in Checkpoint Mode.
+//
+// 6 3/17/11 8:09a Sudhirv
+// Support to Boot with S3 Resume in Core_4.6.5.0
+//
+// 5 3/09/11 8:27a Sudhirv
+// EIP 53658 - AMIDebugRx\Debugger support for PI 1.1
+//
+// 4 2/15/10 8:05a Mallikarjunanv
+// Updated after fix for EIP 35101 - Binary Debug Rx module doesn't report
+// BIOS TAG correctly.
+//
+// 3 9/30/09 3:03p Sudhirv
+// For Debugger 1.31.0023_PreAlpha
+//
+// 2 7/13/09 2:53p Sudhirv
+// Updated with Coding Standards
+//
+// 1 7/07/09 4:47p Sudhirv
+// Restructure Binaries Created
+//
+// 2 5/05/09 8:05p Madhans
+// Use the timestamp.h instead of timstamp.mak to avoid the octal issues.
+//
+// 1 5/01/09 7:48p Madhans
+// AMIDebug Rx Module. Intial Checkin.
+//
+// 1 4/29/09 7:52a Sudhirv
+// AMI Debug Rx module created
+//
+// 8 3/27/09 8:43a Sudhirv
+// Updated Coding Standards.
+//
+// 7 8/29/07 12:59p Madhans
+// Common code for 4.x and 3.x
+//
+// 6 6/13/07 3:17p Madhans
+// Copyright Year updated.
+//
+// 5 3/12/07 6:19p Madhans
+// !!!coding standards!!!!
+//
+// 4 1/22/07 11:43a Madhans
+// Modification made for Binary Release 1.04.0003.
+//
+// 4 1/05/07 6:15p Madhan
+//
+// 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: XportHdr.c
+//
+// Description: File containing the globals for CAR base address & size.
+// Also the code which make use of this so that it can be
+// integrated as it is Debugger eModule of binary.
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+#include "efi.h"
+#include "Pei.h"
+
+#include "misc.h"
+#ifndef EFIx64
+#include "AMIPeiDebug.h"
+#else
+#include "AMIPeiDebugX64.h"
+#include "AsmDbgrx64Libs.h"
+#endif
+#include "timestamp.h"
+
+#define CONVERT_TO_STRING(a) #a
+#define STR(a) CONVERT_TO_STRING(a)
+#ifndef DBG_WRITE_IO_80_SUPPORT
+#define DBG_WRITE_IO_80_SUPPORT 0
+#endif
+
+const char *sTargetProjectTag= STR(TARGET_PROJECT_TAG);
+
+//EIP 62342 - Support to not crash when Debugger enabled and Rx switch in Checkpoint Mode.
+UINTN gAMIDebuggerEnabled = REDIRECTION_ONLY_MODE;
+
+volatile UINTN gDbgWriteIO80Support = DBG_WRITE_IO_80_SUPPORT;
+
+typedef struct {
+ UINT16 Year;
+ UINT8 Month;
+ UINT8 Day;
+ UINT8 Hour;
+ UINT8 Minute;
+ UINT8 Second;
+} DateTime_T;
+
+VOID AddExtDelay();
+
+//**********************************************************************
+//<AMI_SHDR_START>
+//
+// Name: PeiDbgDataSection of type PEI_DBG_DATA_SECTION
+//
+// Description: The following global data structure is for relocation purpose
+// in order to support debugging after the debugger data section
+// is relocated. This second parameter of the data structure has
+// to be updated by the debugger service PEIM to point to relocated
+// data section into memory.The code section has this module
+// has to relocated before the update of second parameter.
+//
+//<AMI_SHDR_END>
+//**********************************************************************
+
+#if defined (PI_SPECIFICATION_VERSION) && (PI_SPECIFICATION_VERSION >= 0x00010000)
+PEI_DBG_DATA_SECTION PeiDbgDataSection = {
+ "XPRT",
+ NULL
+};
+#else
+PEI_DBG_DATA_SECTION PeiDbgDataSection = {
+ "XPRT",
+ PEI_DEBUG_DATASECTION_BASEADDRESS
+};
+
+#endif
+
+UINTN GetCARBaseAddress()
+{
+ EFI_PEI_SERVICES **PeiServices;
+ VOID *PeiDbgData;
+ EFI_GUID mPeiDbgBasePpiGuid = EFI_PEI_DBG_BASEADDRESS_PPI_GUID;
+ EFI_STATUS Status;
+
+ if((PeiDbgDataSection.DATABASEADDRESS)==NULL)
+ {
+ IDTBASE Idtr;
+#ifndef EFIx64
+ _asm{
+ sidt fword ptr Idtr
+ }
+#else
+ GetIdtr(&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((UINTN)PeiDbgDataSection.DATABASEADDRESS);
+ }
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: IsDbgrInCAR
+//
+// Description: Internal Helper function.
+//
+// Input: none
+//
+// Output: 1 for yes & 0 for no (UINT32)
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT32 IsDbgrInCAR()
+{
+#if defined (PI_SPECIFICATION_VERSION) && (PI_SPECIFICATION_VERSION >= 0x00010000)
+ if((PeiDbgDataSection.DATABASEADDRESS)==NULL)
+#else
+ if(PEI_DEBUG_DATA_BASEADDRESS == PEI_DEBUG_DATASECTION_BASEADDRESS)
+#endif
+ return 1; //yes
+ else
+ return 0; //no
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: IoRead32
+//
+// Description: Internal Helper function. Reads 32-bit value from IO port
+//
+// Input: UINT16 Port
+//
+// Output: UINT32 - port data
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT32 IoRead32(UINT16 Port)
+{
+#ifdef EFIx64
+ return IoReadDword(Port);
+#else
+ _asm {
+ mov dx, Port
+ in eax, dx
+ }
+#endif
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: Stall
+//
+// Description: Internal Helper function.
+//
+// Input: UINTN Usec (microseconds)
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID Stall (UINTN Usec)
+{
+ UINTN Counter = (Usec * 7)/2; // 3.58 count per microsec
+ UINTN i;
+ UINT32 Data32;
+ UINT32 PrevData;
+
+ PrevData = IoRead32(PM_BASE_ADDRESS + 8);
+ for (i=0; i < Counter; ) {
+ Data32 = IoRead32(PM_BASE_ADDRESS + 8);
+ if (Data32 < PrevData) { // Reset if there is a overlap
+ PrevData=Data32;
+ continue;
+ }
+ i += (Data32 - PrevData);
+ PrevData=Data32; // FIX need to find out the real diff betweek different count.
+ }
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: AddDelay
+//
+// Description: Internal Helper function.
+//
+// Input: is currently designed to provide either software delay
+// or through ACPI timer who has fixed frequency.
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+void AddDelay()
+{
+ Stall(10*1000); //for 10 milliseconds
+ return;
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: AddUsbDelay
+//
+// Description: Internal Helper function.
+//
+// Input: is currently designed to provide either software delay
+// or through ACPI timer who has fixed frequency.
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+void AddUsbDelay()
+{
+ Stall(2*1000); //for 2 milliseconds
+ return;
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: AddSpecialDelay()
+//
+// Description: Internal Helper function.
+//
+// Input: void
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+void AddSpecialDelay()
+{
+#if !PEI_CACHE_ENABLED
+ if(IsDbgrInCAR())
+ AddExtDelay();
+ else{
+ UINTN CriticalDelay = 60;
+ while(CriticalDelay--)
+ AddExtDelay();
+ }
+#else
+ UINTN CriticalDelay = 60;
+
+CriticalDelay = 1; // TESTING...
+ while(CriticalDelay--)
+ AddExtDelay();
+#endif
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: AddExtDelay()
+//
+// Description: Internal Helper function.
+//
+// Input: void
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+void AddExtDelay()
+{
+// UINT8 i = 35; //providing 250 ms delay
+ UINT8 i = 25;
+ i =1; // TESTING...
+ while(i--)
+ AddDelay();
+ return;
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: GetBuildTime()
+//
+// Description: Sends the Build Time Details
+//
+// Input: void*
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+#define Str2No(A) (A - '0')
+
+#define TwoDigitStr2BCD(String) (Str2No(String[0])*0x10+Str2No(String[1]))
+
+VOID GetBuildTime(void *Buffer)
+{
+ UINT8 *strYear = FOUR_DIGIT_YEAR;
+ UINT8 *strMonth = TWO_DIGIT_MONTH;
+ UINT8 *strDay = TWO_DIGIT_DAY;
+ UINT8 *strHour = TWO_DIGIT_HOUR;
+ UINT8 *strMin = TWO_DIGIT_MINUTE;
+ UINT8 *strSec = TWO_DIGIT_SECOND;
+
+
+ ((DateTime_T*)Buffer)->Year=(Str2No(strYear[0])*0x1000+Str2No(strYear[1])*0x100+Str2No(strYear[2])*0x10+Str2No(strYear[3]));
+ ((DateTime_T*)Buffer)->Month=TwoDigitStr2BCD(strMonth);
+ ((DateTime_T*)Buffer)->Day=TwoDigitStr2BCD(strDay);
+ ((DateTime_T*)Buffer)->Hour=TwoDigitStr2BCD(strHour);
+ ((DateTime_T*)Buffer)->Minute=TwoDigitStr2BCD(strMin);
+ ((DateTime_T*)Buffer)->Second=TwoDigitStr2BCD(strSec);
+ return;
+}
+
+
+//#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/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.cif
new file mode 100644
index 0000000..8b8b525
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.cif
@@ -0,0 +1,11 @@
+<component>
+ name = "PeiDbgDbgrx64"
+ category = ModulePart
+ LocalRoot = "Core\EM\AMIDebugRx\binaries\PeiAMIDebugRx\x64\DBGR\"
+ RefName = "PeiDbgDbgrx64"
+[files]
+"PeiDbgDbgrx64.sdl"
+"PeiDbgDbgrx64.mak"
+"mindbgr.obj"
+"PeiDbgDbgrx64.dxs"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.dxs b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.dxs
new file mode 100644
index 0000000..178dd50
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.dxs
@@ -0,0 +1,60 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.dxs 3 2/22/10 4:18p Madhans $
+//
+// $Revision: 3 $
+//
+// $Date: 2/22/10 4:18p $
+//*****************************************************************
+//*****************************************************************
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.dxs $
+//
+// 3 2/22/10 4:18p Madhans
+// 1.32
+//
+// 1 5/01/09 7:48p Madhans
+// AMIDebug Rx Module. Intial Checkin.
+//
+// 3 1/05/07 6:15p Madhan
+//
+// 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.
+//
+//
+//*****************************************************************
+
+DEPENDENCY_START
+ FALSE
+DEPENDENCY_END
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.mak b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.mak
new file mode 100644
index 0000000..98670fe
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.mak
@@ -0,0 +1,125 @@
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (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/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.mak 2 7/17/09 7:15p Madhans $
+#
+# $Revision: 2 $
+#
+# $Date: 7/17/09 7:15p $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.mak $
+#
+# 2 7/17/09 7:15p Madhans
+# DebugRx 1.30.0022
+#
+# 3 7/15/09 5:56p Madhans
+# X64 Support and clean up.
+#
+# 2 7/13/09 2:51p 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:52a Sudhirv
+# AMI Debug Rx module created
+#
+# 5 12/12/08 5:42p Madhans
+# USB Redirection Module
+#
+# 3 6/13/07 3:38p Madhans
+# Copyright Year updated.
+#
+# 2 3/12/07 6:20p Madhans
+# !!!coding standards!!!!
+#
+# 1 1/22/07 4:12p Madhans
+# 1.04.0002 Binary Version.
+#
+# 1 12/26/06 7:17p 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.
+#
+# 1 12/26/06 7:10p 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: PeiDbgDbgrx64.mak
+#
+# Description: Makefile of Debugger x64 Module that is loaded by Peidebugsupport
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+all : PeiDbgDbgrx64
+
+PeiDbgDbgrx64 : $(BUILD_DIR)\PeiDbgDbgrx64.mak PeiDbgDbgrx64Bin
+
+$(BUILD_DIR)\PeiDbgDbgrx64.mak : $(PeiDbgDbgrx64_DIR)\$(@B).cif $(PeiDbgDbgrx64_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(PeiDbgDbgrx64_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+PEIDBGDBGR_OBJS = \
+$(PeiDbgDbgrx64_DIR)\mindbgr.obj
+
+
+PeiDbgDbgrx64Bin :
+ @set INCLUDE=%%INCLUDE%%
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\PeiDbgDbgrx64.mak all\
+ GUID=C253ED0A-C48B-4ee3-A65E-75F61F3AD251\
+ ENTRY_POINT=InitDbgLayer\
+ TYPE=BS_DRIVER \
+ PRECOMPILED_OBJS=\
+ COMPRESS=1\
+ "OBJECTS="\
+
+!IF "$(REDIRECTION_ONLY_MODE)" == "1"
+PeiDbgDbgrx64Bin : $(PEIDBGDBGR_OBJS)
+!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/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.sdl b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.sdl
new file mode 100644
index 0000000..f466826
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/PeiDbgDbgrx64.sdl
@@ -0,0 +1,35 @@
+TOKEN
+ Name = "PeiDbgDbgrx64_SUPPORT"
+ Value = "1"
+ Help = "Main switch to enable PeiDbgDbgrx64 support in Project"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ Master = Yes
+ Lock = Yes
+ Token = "x64_BUILD" "=" "1"
+End
+
+PATH
+ Name = "PeiDbgDbgrx64_DIR"
+End
+
+MODULE
+ Help = "Includes PeiDbgDbgrx64.mak to Project"
+ File = "PeiDbgDbgrx64.mak"
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\PeiDbgDbgrx64.ffs"
+ Parent = "FV_MAIN"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\PeiDbgDbgrx64.ffs"
+ Parent = "FV_BB"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "0"
+ InvokeOrder = AfterParent
+End
+
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/mindbgr.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/mindbgr.obj
new file mode 100644
index 0000000..8092523
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/DBGR/mindbgr.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/UsbDebugPort.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/UsbDebugPort.obj
new file mode 100644
index 0000000..6ad950d
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/UsbDebugPort.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/transport.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/transport.obj
new file mode 100644
index 0000000..d30f432
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/transport.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/usb_acc.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/usb_acc.obj
new file mode 100644
index 0000000..a041426
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/usb_acc.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/usb_xp.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/usb_xp.obj
new file mode 100644
index 0000000..9b2b225
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/usb_xp.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/xp_layer.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/xp_layer.obj
new file mode 100644
index 0000000..bb7e135
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/DBGR/xp_layer.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.cif
new file mode 100644
index 0000000..ba1e486
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.cif
@@ -0,0 +1,14 @@
+<component>
+ name = "PeiDbgXportx64"
+ category = ModulePart
+ LocalRoot = "Core\EM\AMIDebugRx\binaries\PeiAMIDebugRx\x64\XPORT\"
+ RefName = "PeiDbgXportx64"
+[files]
+"PeiDbgXportx64.sdl"
+"PeiDbgXportx64.mak"
+"PeiDbgXportx64.dxs"
+"XportHdr.c"
+[parts]
+"PeiXportx64Redir"
+"PeiXportx64Dbgr"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.dxs b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.dxs
new file mode 100644
index 0000000..5c9dcc4
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.dxs
@@ -0,0 +1,59 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.dxs 3 2/22/10 4:18p Madhans $
+//
+// $Revision: 3 $
+//
+// $Date: 2/22/10 4:18p $
+//*****************************************************************
+//*****************************************************************
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.dxs $
+//
+// 3 2/22/10 4:18p Madhans
+// 1.32
+//
+// 1 5/01/09 7:48p Madhans
+// AMIDebug Rx Module. Intial Checkin.
+//
+// 3 1/05/07 6:15p Madhan
+//
+// 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.
+//
+//
+//*****************************************************************
+DEPENDENCY_START
+ FALSE
+DEPENDENCY_END
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.mak b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.mak
new file mode 100644
index 0000000..6955680
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.mak
@@ -0,0 +1,139 @@
+#//*****************************************************************//
+#//*****************************************************************//
+#//*****************************************************************//
+#//** **//
+#//** (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/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.mak 3 7/17/09 7:15p Madhans $
+#
+# $Revision: 3 $
+#
+# $Date: 7/17/09 7:15p $
+#**********************************************************************
+# Revision History
+# ----------------
+# $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.mak $
+#
+# 3 7/17/09 7:15p Madhans
+# DebugRx 1.30.0022
+#
+# 3 7/15/09 5:56p Madhans
+# X64 Support and clean up.
+#
+# 2 7/13/09 2:52p Sudhirv
+# Updated with Coding Standards
+#
+# 1 7/07/09 4:47p Sudhirv
+# Restructure Binaries Created
+#
+# 2 5/04/09 11:35a Madhans
+#
+# 1 5/01/09 7:48p Madhans
+# AMIDebug Rx Module. Intial Checkin.
+#
+# 2 5/01/09 7:47p Madhans
+#
+# 1 4/29/09 7:52a Sudhirv
+# AMI Debug Rx module created
+#
+# 4 6/13/07 3:17p Madhans
+# Copyright Year updated.
+#
+# 3 1/22/07 11:43a Madhans
+# Modification made for Binary Release 1.04.0003.
+#
+# 1 12/26/06 7:17p 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.
+#
+# 1 12/26/06 7:10p 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: PeiDbgXportx64.mak
+#
+# Description: Makefile of Xport64 module
+#
+#<AMI_FHDR_END>
+#**********************************************************************
+
+
+!IF "$(REDIRECTION_ONLY_MODE)" == "1"
+PEIDBGXPORTx64_BUILD_DIR=$(PeiDbgXportx64_DIR)\REDIR
+!ELSE
+PEIDBGXPORTx64_BUILD_DIR=$(PeiDbgXportx64_DIR)\DBGR
+!ENDIF
+
+PEIDBGXPORTX64_OBJS=\
+$(PEIDBGXPORTx64_BUILD_DIR)\transport.obj\
+$(PEIDBGXPORTx64_BUILD_DIR)\xp_layer.obj\
+$(BUILD_DIR)\$(PeiDbgXportx64_DIR)\XportHdr.obj\
+
+PEIDBGXPORTx64_USB_OBJECTS =\
+$(PEIDBGXPORTx64_BUILD_DIR)\usb_acc.obj\
+$(PEIDBGXPORTx64_BUILD_DIR)\usb_xp.obj\
+$(PEIDBGXPORTx64_BUILD_DIR)\UsbDebugPort.obj
+
+!INCLUDE $(BUILD_DIR)\TimeStamp.mak
+
+all : PeiDbgXportx64
+
+PeiDbgXportx64 : $(BUILD_DIR)\PeiDbgXportx64.mak PeiDbgXportx64Bin
+
+$(BUILD_DIR)\PeiDbgXportx64.mak : $(PeiDbgXportx64_DIR)\$(@B).cif $(PeiDbgXportx64_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(PeiDbgXportx64_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+PeiDbgXportx64Bin :
+ @set INCLUDE=%%INCLUDE%%
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\PeiDbgXportx64.mak all\
+ GUID=511D0266-F2E0-4df8-AE3A-FDB98523BFB9\
+ ENTRY_POINT=InitXLayer\
+ TYPE=BS_DRIVER \
+ COMPRESS=1\
+ "OBJECTS=$(PEIDBGXPORTX64_OBJS)"\
+ "CFLAGS=$(PEI_DBG_CFLAGS) /DRELOCATE /I$(PeiDbgDbgr_DIR)\INC /I$(DbgrX64_DIR) "
+
+!IF "$(USB_DEBUG_TRANSPORT)" == "1"
+PeiDbgXportx64Bin : $(PEIDBGXPORTx64_USB_OBJECTS)
+!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/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.sdl b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.sdl
new file mode 100644
index 0000000..380f960
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiDbgXportx64.sdl
@@ -0,0 +1,34 @@
+TOKEN
+ Name = "PeiDbgXportx64_SUPPORT"
+ Value = "1"
+ Help = "Main switch to enable PeiDbgXportx64 support in Project"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ Master = Yes
+ Lock = Yes
+ Token = "x64_BUILD" "=" "1"
+End
+
+PATH
+ Name = "PeiDbgXportx64_DIR"
+End
+
+MODULE
+ Help = "Includes PeiDbgXportx64.mak to Project"
+ File = "PeiDbgXportx64.mak"
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\PeiDbgXportx64.ffs"
+ Parent = "FV_MAIN"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "1"
+ InvokeOrder = AfterParent
+End
+
+ELINK
+ Name = "$(BUILD_DIR)\PeiDbgXportx64.ffs"
+ Parent = "FV_BB"
+ Token = "DEBUG_RX_FFS_IN_FVMAIN_SUPPORT" "=" "0"
+ InvokeOrder = AfterParent
+End
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiXportDbgrx64.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiXportDbgrx64.cif
new file mode 100644
index 0000000..5bbd63f
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiXportDbgrx64.cif
@@ -0,0 +1,12 @@
+<component>
+ name = "PeiXportx64Dbgr"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\PeiAMIDebugRx\x64\XPORT"
+ RefName = "PeiXportx64Dbgr"
+[files]
+"DBGR\xp_layer.obj"
+"DBGR\transport.obj"
+"DBGR\usb_acc.obj"
+"DBGR\usb_xp.obj"
+"DBGR\UsbDebugPort.obj"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiXportx64Redir.cif b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiXportx64Redir.cif
new file mode 100644
index 0000000..806c72b
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/PeiXportx64Redir.cif
@@ -0,0 +1,12 @@
+<component>
+ name = "PeiXportx64Redir"
+ category = ModulePart
+ LocalRoot = "Core\em\AMIDebugRx\binaries\PeiAMIDebugRx\x64\XPORT"
+ RefName = "PeiXportx64Redir"
+[files]
+"REDIR\xp_layer.obj"
+"REDIR\transport.obj"
+"REDIR\usb_acc.obj"
+"REDIR\usb_xp.obj"
+"REDIR\UsbDebugPort.obj"
+<endComponent>
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/UsbDebugPort.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/UsbDebugPort.obj
new file mode 100644
index 0000000..df06970
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/UsbDebugPort.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/transport.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/transport.obj
new file mode 100644
index 0000000..0890fb7
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/transport.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/usb_acc.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/usb_acc.obj
new file mode 100644
index 0000000..2057d96
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/usb_acc.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/usb_xp.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/usb_xp.obj
new file mode 100644
index 0000000..a749ebf
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/usb_xp.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/xp_layer.obj b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/xp_layer.obj
new file mode 100644
index 0000000..833dab5
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/REDIR/xp_layer.obj
Binary files differ
diff --git a/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/XportHdr.c b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/XportHdr.c
new file mode 100644
index 0000000..3cc95b8
--- /dev/null
+++ b/Core/EM/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/XportHdr.c
@@ -0,0 +1,445 @@
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (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/PeiAMIDebugRx/x64/XPORT/XportHdr.c 9 4/04/12 4:58p Sudhirv $
+//
+// $Revision: 9 $
+//
+// $Date: 4/04/12 4:58p $
+//*****************************************************************
+//*****************************************************************
+//
+// Revision History
+// ----------------
+// $Log: /Alaska/BIN/Modules/AMIDebugRx/binaries/PeiAMIDebugRx/x64/XPORT/XportHdr.c $
+//
+// 9 4/04/12 4:58p Sudhirv
+// To Avoid Build errors in special cases.
+//
+// 8 3/13/12 10:47a 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
+//
+// 7 7/12/11 5:54p Sudhirv
+// [TAG] EIP62342
+// [Category] Bug Fix
+// [Severity] Normal
+// [Symptom] Target Crashes when Debugger enabled and AMIDebugRx is in
+// Checkpoint mode
+// [RootCause] Debugger is Enabled and AMIDebugRx device is connected in
+// checkpoint mode. Target MAchine is unaware of the type of host
+// connected in DXE phase.
+// [Solution] Support to not crash when Debugger enabled and Rx switch
+// in Checkpoint Mode.
+//
+// 6 3/09/11 8:25a Sudhirv
+// EIP 53658 - AMIDebugRx\Debugger support for PI 1.1
+//
+// 5 2/15/10 8:05a Mallikarjunanv
+// Updated after fix for EIP 35101 - Binary Debug Rx module doesn't report
+// BIOS TAG correctly.
+//
+// 3 9/30/09 3:03p Sudhirv
+// For Debugger 1.31.0023_PreAlpha
+//
+// 2 7/13/09 2:52p Sudhirv
+// Updated with Coding Standards
+//
+// 1 7/07/09 4:47p Sudhirv
+// Restructure Binaries Created
+//
+// 2 5/04/09 11:35a Madhans
+//
+// 1 5/01/09 7:48p Madhans
+// AMIDebug Rx Module. Intial Checkin.
+//
+// 1 4/29/09 7:52a Sudhirv
+// AMI Debug Rx module created
+//
+// 8 3/27/09 8:43a Sudhirv
+// Updated Coding Standards.
+//
+// 7 8/29/07 12:59p Madhans
+// Common code for 4.x and 3.x
+//
+// 6 6/13/07 3:17p Madhans
+// Copyright Year updated.
+//
+// 5 3/12/07 6:19p Madhans
+// !!!coding standards!!!!
+//
+// 4 1/22/07 11:43a Madhans
+// Modification made for Binary Release 1.04.0003.
+//
+// 4 1/05/07 6:15p Madhan
+//
+// 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: XportHdr.c
+//
+// Description: File containing the globals for CAR base address & size.
+// Also the code which make use of this so that it can be
+// integrated as it is Debugger eModule of binary.
+//
+//<AMI_FHDR_END>
+//**********************************************************************
+#include "efi.h"
+#include "Pei.h"
+
+#include "misc.h"
+#ifndef EFIx64
+#include "AMIPeiDebug.h"
+#else
+#include "AMIPeiDebugX64.h"
+#include "AsmDbgrx64Libs.h"
+#endif
+#include "timestamp.h"
+
+#define CONVERT_TO_STRING(a) #a
+#define STR(a) CONVERT_TO_STRING(a)
+#ifndef DBG_WRITE_IO_80_SUPPORT
+#define DBG_WRITE_IO_80_SUPPORT 0
+#endif
+const char *sTargetProjectTag= STR(TARGET_PROJECT_TAG);
+
+//EIP 62342 - Support to not crash when Debugger enabled and Rx switch in Checkpoint Mode.
+UINTN gAMIDebuggerEnabled = REDIRECTION_ONLY_MODE;
+
+volatile UINTN gDbgWriteIO80Support = DBG_WRITE_IO_80_SUPPORT;
+
+typedef struct {
+ UINT16 Year;
+ UINT8 Month;
+ UINT8 Day;
+ UINT8 Hour;
+ UINT8 Minute;
+ UINT8 Second;
+} DateTime_T;
+
+VOID AddExtDelay();
+
+//**********************************************************************
+//<AMI_SHDR_START>
+//
+// Name: PeiDbgDataSection of type PEI_DBG_DATA_SECTION
+//
+// Description: The following global data structure is for relocation purpose
+// in order to support debugging after the debugger data section
+// is relocated. This second parameter of the data structure has
+// to be updated by the debugger service PEIM to point to relocated
+// data section into memory.The code section has this module
+// has to relocated before the update of second parameter.
+//
+//<AMI_SHDR_END>
+//**********************************************************************
+
+#if defined (PI_SPECIFICATION_VERSION) && (PI_SPECIFICATION_VERSION >= 0x00010000)
+PEI_DBG_DATA_SECTION PeiDbgDataSection = {
+ "XPRT",
+ NULL
+};
+#else
+PEI_DBG_DATA_SECTION PeiDbgDataSection = {
+ "XPRT",
+ PEI_DEBUG_DATASECTION_BASEADDRESS
+};
+
+#endif
+
+#ifndef EFIx64
+UINTN GetCARBaseAddress()
+{
+ EFI_PEI_SERVICES **PeiServices;
+ VOID *PeiDbgData;
+ EFI_GUID mPeiDbgBasePpiGuid = EFI_PEI_DBG_BASEADDRESS_PPI_GUID;
+ EFI_STATUS Status;
+
+ if((PeiDbgDataSection.DATABASEADDRESS)==NULL)
+ {
+ IDTBASE Idtr;
+ _asm{
+ sidt fword ptr Idtr
+ }
+ 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((UINTN)PeiDbgDataSection.DATABASEADDRESS);
+ }
+}
+#endif
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: IsDbgrInCAR
+//
+// Description: Internal Helper function.
+//
+// Input: none
+//
+// Output: 1 for yes & 0 for no (UINT32)
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT32 IsDbgrInCAR()
+{
+#if defined (PI_SPECIFICATION_VERSION) && (PI_SPECIFICATION_VERSION >= 0x00010000)
+ if((PeiDbgDataSection.DATABASEADDRESS)==NULL)
+#else
+ if(PEI_DEBUG_DATA_BASEADDRESS == PEI_DEBUG_DATASECTION_BASEADDRESS)
+#endif
+ return 1; //yes
+ else
+ return 0; //no
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: IoRead32
+//
+// Description: Internal Helper function. Reads 32-bit value from IO port
+//
+// Input: UINT16 Port
+//
+// Output: UINT32 - port data
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+UINT32 IoRead32(UINT16 Port)
+{
+#ifdef EFIx64
+ return IoReadDword(Port);
+#else
+ _asm {
+ mov dx, Port
+ in eax, dx
+ }
+#endif
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: Stall
+//
+// Description: Internal Helper function.
+//
+// Input: UINTN Usec (microseconds)
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+VOID Stall (UINTN Usec)
+{
+ UINTN Counter = (Usec * 7)/2; // 3.58 count per microsec
+ UINTN i;
+ UINT32 Data32;
+ UINT32 PrevData;
+
+ PrevData = IoRead32(PM_BASE_ADDRESS + 8);
+ for (i=0; i < Counter; ) {
+ Data32 = IoRead32(PM_BASE_ADDRESS + 8);
+ if (Data32 < PrevData) { // Reset if there is a overlap
+ PrevData=Data32;
+ continue;
+ }
+ i += (Data32 - PrevData);
+ PrevData=Data32; // FIX need to find out the real diff betweek different count.
+ }
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: AddDelay
+//
+// Description: Internal Helper function.
+//
+// Input: is currently designed to provide either software delay
+// or through ACPI timer who has fixed frequency.
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+void AddDelay()
+{
+ Stall(10*1000); //for 10 milliseconds
+ return;
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: AddUsbDelay
+//
+// Description: Internal Helper function.
+//
+// Input: is currently designed to provide either software delay
+// or through ACPI timer who has fixed frequency.
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+void AddUsbDelay()
+{
+ Stall(2*1000); //for 2 milliseconds
+ return;
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: AddSpecialDelay()
+//
+// Description: Internal Helper function.
+//
+// Input: void
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+void AddSpecialDelay()
+{
+#if !PEI_CACHE_ENABLED
+ if(IsDbgrInCAR())
+ AddExtDelay();
+ else{
+ UINTN CriticalDelay = 60;
+ while(CriticalDelay--)
+ AddExtDelay();
+ }
+#else
+ UINTN CriticalDelay = 60;
+
+CriticalDelay = 1; // TESTING...
+ while(CriticalDelay--)
+ AddExtDelay();
+#endif
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: AddExtDelay()
+//
+// Description: Internal Helper function.
+//
+// Input: void
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+void AddExtDelay()
+{
+// UINT8 i = 35; //providing 250 ms delay
+ UINT8 i = 25;
+ i =1; // TESTING...
+ while(i--)
+ AddDelay();
+ return;
+}
+
+//<AMI_PHDR_START>
+//--------------------------------------------------------------------
+// Procedure: GetBuildTime()
+//
+// Description: Sends the Build Time Details
+//
+// Input: void*
+//
+// Output: void
+//
+//--------------------------------------------------------------------
+//<AMI_PHDR_END>
+
+#define Str2No(A) (A - '0')
+
+#define TwoDigitStr2BCD(String) (Str2No(String[0])*0x10+Str2No(String[1]))
+
+VOID GetBuildTime(void *Buffer)
+{
+ UINT8 *strYear = FOUR_DIGIT_YEAR;
+ UINT8 *strMonth = TWO_DIGIT_MONTH;
+ UINT8 *strDay = TWO_DIGIT_DAY;
+ UINT8 *strHour = TWO_DIGIT_HOUR;
+ UINT8 *strMin = TWO_DIGIT_MINUTE;
+ UINT8 *strSec = TWO_DIGIT_SECOND;
+
+
+ ((DateTime_T*)Buffer)->Year=(Str2No(strYear[0])*0x1000+Str2No(strYear[1])*0x100+Str2No(strYear[2])*0x10+Str2No(strYear[3]));
+ ((DateTime_T*)Buffer)->Month=TwoDigitStr2BCD(strMonth);
+ ((DateTime_T*)Buffer)->Day=TwoDigitStr2BCD(strDay);
+ ((DateTime_T*)Buffer)->Hour=TwoDigitStr2BCD(strHour);
+ ((DateTime_T*)Buffer)->Minute=TwoDigitStr2BCD(strMin);
+ ((DateTime_T*)Buffer)->Second=TwoDigitStr2BCD(strSec);
+ return;
+}
+
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//
+//** **//
+//** (C)Copyright 2009, American Megatrends, Inc. **//
+//** **//
+//** All Rights Reserved. **//
+//** **//
+//** 5555 Oakbrook Pkwy, Building 200,Norcross, Georgia 30093 **//
+//** **//
+//** Phone (770)-246-8600 **//
+//** **//
+//*****************************************************************//
+//*****************************************************************//
+//*****************************************************************//