]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/X64/SecCarInit.nasm
IntelFsp2Pkg: SecFspSecPlatformLibNull support for X64
[mirror_edk2.git] / IntelFsp2Pkg / Library / SecFspSecPlatformLibNull / X64 / SecCarInit.nasm
diff --git a/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/X64/SecCarInit.nasm b/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/X64/SecCarInit.nasm
new file mode 100644 (file)
index 0000000..e64c77e
--- /dev/null
@@ -0,0 +1,40 @@
+;; @file\r
+;  SEC CAR function\r
+;\r
+; Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>\r
+; SPDX-License-Identifier: BSD-2-Clause-Patent\r
+;;\r
+\r
+;\r
+; Define assembler characteristics\r
+;\r
+\r
+%macro RET_RSI 0\r
+\r
+  movd    rsi, mm7                      ; move ReturnAddress from MM7 to RSI\r
+  jmp     rsi\r
+\r
+%endmacro\r
+\r
+SECTION .text\r
+\r
+;-----------------------------------------------------------------------------\r
+;\r
+;  Section:     SecCarInit\r
+;\r
+;  Description: This function initializes the Cache for Data, Stack, and Code\r
+;\r
+;-----------------------------------------------------------------------------\r
+global ASM_PFX(SecCarInit)\r
+ASM_PFX(SecCarInit):\r
+\r
+  ;\r
+  ; Set up CAR\r
+  ;\r
+\r
+  xor    rax, rax\r
+\r
+SecCarInitExit:\r
+\r
+  RET_RSI\r
+\r