summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Board/EM/AAEONSecurity/AAEONSecurity.c45
-rw-r--r--Board/EM/AAEONSecurity/AAEONSecurity.cif12
-rw-r--r--Board/EM/AAEONSecurity/AAEONSecurity.dxs7
-rw-r--r--Board/EM/AAEONSecurity/AAEONSecurity.mak15
-rw-r--r--Board/EM/AAEONSecurity/AAEONSecurity.sdl52
-rw-r--r--Board/EM/AAEONSecurity/History.txt20
-rw-r--r--SharkBayDT.veb1
7 files changed, 152 insertions, 0 deletions
diff --git a/Board/EM/AAEONSecurity/AAEONSecurity.c b/Board/EM/AAEONSecurity/AAEONSecurity.c
new file mode 100644
index 0000000..3946c4b
--- /dev/null
+++ b/Board/EM/AAEONSecurity/AAEONSecurity.c
@@ -0,0 +1,45 @@
+#include <EFI.h>
+#include <Token.h>
+#include <AmiDxeLib.h>
+#include <Protocol\LegacyRegion.h>
+
+//----------------------------------------------------------------------------
+// Description: InstallSecurityString
+//----------------------------------------------------------------------------
+EFI_STATUS InstallSecurityString()
+{
+ EFI_GUID gEfiLegacyRegionProtocol = EFI_LEGACY_REGION_PROTOCOL_GUID;
+ EFI_LEGACY_REGION_PROTOCOL *LegacyRegionProtocol;
+ UINTN NumberOfHandles;
+ EFI_HANDLE *HandleBuffer;
+ EFI_STATUS Status;
+
+ CHAR8 SIGNATURE_STR1[] = {0x22, 0x34, 0x03, 0x98, "AAEON Technology Inc."};
+ CHAR8 SIGNATURE_STR2[] = CONVERT_TO_STRING(SIGNATURE_MODEL_TAG);
+
+ //F0000-F1000 unlock
+ Status = pBS->LocateHandleBuffer ( ByProtocol, &gEfiLegacyRegionProtocol, NULL, &NumberOfHandles, &HandleBuffer );
+ Status = pBS->HandleProtocol ( HandleBuffer[0], &gEfiLegacyRegionProtocol, &LegacyRegionProtocol);
+ pBS->FreePool(HandleBuffer);
+ Status = LegacyRegionProtocol->UnLock(LegacyRegionProtocol, 0xF0000, 0x10000, NULL);
+
+// pBS->CopyMem((VOID*)(SIGNATURE_ADDRESS1), SIGNATURE_STR1, sizeof (SIGNATURE_STR1) );
+ pBS->CopyMem((VOID*)(SIGNATURE_ADDRESS2), SIGNATURE_STR2, sizeof (SIGNATURE_STR2) );
+
+ Status = LegacyRegionProtocol->Lock(LegacyRegionProtocol, 0xF0000, 0x10000, NULL);
+
+ return Status;
+}
+
+//----------------------------------------------------------------------------
+// Description: AAEONSecurityEntryPoint
+//----------------------------------------------------------------------------
+EFI_STATUS AAEONSecurityEntryPoint(
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+)
+{
+ InitAmiLib(ImageHandle, SystemTable);
+
+ return InstallSecurityString();
+}
diff --git a/Board/EM/AAEONSecurity/AAEONSecurity.cif b/Board/EM/AAEONSecurity/AAEONSecurity.cif
new file mode 100644
index 0000000..36f74cd
--- /dev/null
+++ b/Board/EM/AAEONSecurity/AAEONSecurity.cif
@@ -0,0 +1,12 @@
+<component>
+ name = "AAEON Security"
+ category = eModule
+ LocalRoot = "Board\EM\AAEONSecurity\"
+ RefName = "AAEONSecurity"
+[files]
+"AAEONSecurity.sdl"
+"AAEONSecurity.mak"
+"AAEONSecurity.c"
+"AAEONSecurity.dxs"
+"History.txt"
+<endComponent>
diff --git a/Board/EM/AAEONSecurity/AAEONSecurity.dxs b/Board/EM/AAEONSecurity/AAEONSecurity.dxs
new file mode 100644
index 0000000..b8cfc2c
--- /dev/null
+++ b/Board/EM/AAEONSecurity/AAEONSecurity.dxs
@@ -0,0 +1,7 @@
+#include <Protocol\LegacyBios.h>
+#include <Protocol\LegacyRegion.h>
+
+DEPENDENCY_START
+ EFI_LEGACY_REGION_PROTOCOL_GUID AND
+ EFI_LEGACY_BIOS_PROTOCOL_GUID
+DEPENDENCY_END
diff --git a/Board/EM/AAEONSecurity/AAEONSecurity.mak b/Board/EM/AAEONSecurity/AAEONSecurity.mak
new file mode 100644
index 0000000..0bfa20d
--- /dev/null
+++ b/Board/EM/AAEONSecurity/AAEONSecurity.mak
@@ -0,0 +1,15 @@
+all : AAEONSecurity
+
+AAEONSecurity : $(BUILD_DIR)\AAEONSecurity.mak AAEONSecurityBin
+
+$(BUILD_DIR)\AAEONSecurity.mak : $(AAEON_SECURITY_DIR)\$(@B).cif $(AAEON_SECURITY_DIR)\$(@B).mak $(BUILD_RULES)
+ $(CIF2MAK) $(AAEON_SECURITY_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS)
+
+AAEONSecurityBin : $(AMIDXELIB)
+ $(MAKE) /$(MAKEFLAGS) $(BUILD_DEFAULTS)\
+ /f $(BUILD_DIR)\AAEONSecurity.mak all\
+ Name=AAEONSecurity \
+ GUID=bedf0344-f4b9-4071-914d-e3ef72727547\
+ ENTRY_POINT=AAEONSecurityEntryPoint\
+ TYPE=BS_DRIVER \
+ COMPRESS=1
diff --git a/Board/EM/AAEONSecurity/AAEONSecurity.sdl b/Board/EM/AAEONSecurity/AAEONSecurity.sdl
new file mode 100644
index 0000000..bf52f4c
--- /dev/null
+++ b/Board/EM/AAEONSecurity/AAEONSecurity.sdl
@@ -0,0 +1,52 @@
+TOKEN
+ Name = "AAEON_SECURITY_SUPPORT"
+ Value = "1"
+ TokenType = Boolean
+ TargetEQU = Yes
+ TargetMAK = Yes
+ TargetH = Yes
+ Master = Yes
+ Help = "Main switch to enable AAEON SECURITY support in Project"
+End
+
+PATH
+ Name = "AAEON_SECURITY_DIR"
+End
+
+MODULE
+ Help = "Includes AAEONSecurity.mak to Project"
+ File = "AAEONSecurity.mak"
+End
+
+
+ELINK
+ Name = "$(BUILD_DIR)\AAEONSecurity.ffs"
+ Parent = "FV_MAIN"
+ InvokeOrder = AfterParent
+End
+
+TOKEN
+ Name = "SIGNATURE_ADDRESS1"
+ Value = "0xFE83C"
+ TokenType = Integer
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SIGNATURE_ADDRESS2"
+ Value = "0xFF5F5"
+ TokenType = Integer
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+TOKEN
+ Name = "SIGNATURE_MODEL_TAG"
+ Value = "'$$IEI-SA93$$'"
+ TokenType = Expression
+ TargetMAK = Yes
+ TargetH = Yes
+End
+
+
diff --git a/Board/EM/AAEONSecurity/History.txt b/Board/EM/AAEONSecurity/History.txt
new file mode 100644
index 0000000..ac3a0a3
--- /dev/null
+++ b/Board/EM/AAEONSecurity/History.txt
@@ -0,0 +1,20 @@
+---------------------------------------------------------------------------
+ AAEON Security Module for AMI Aptio
+---------------------------------------------------------------------------
+
+---------------------------------------------------------------------------
+ Porting Notice
+---------------------------------------------------------------------------
+1. It's SIGNATURE_MODEL_TAG for you project setting.
+
+2. Default F0000 memory location setting.
+ SIGNATURE_ADDRESS1 = "0xFE83C"
+ SIGNATURE_ADDRESS2 = "0xFE8F0"
+
+---------------------------------------------------------------------------
+Revision: 0.1
+Date: 2012/12/13
+Author: Irwin
+---------------------------------------------------------------------------
+Decription:
+ 1. Init this module.
diff --git a/SharkBayDT.veb b/SharkBayDT.veb
index 992b215..f5f718c 100644
--- a/SharkBayDT.veb
+++ b/SharkBayDT.veb
@@ -806,3 +806,4 @@
"IntelHaswell_MOD.cif"= Private
"TCG2_MOD.cif"= Private
"Chipset_MOD.cif"= Private
+"Board\EM\AAEONSecurity\AAEONSecurity.cif" \ No newline at end of file