## @file\r
# Provides driver and definitions to build fsp.\r
#\r
-# Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.<BR>\r
# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
##\r
PLATFORM_VERSION = 0.1\r
DSC_SPECIFICATION = 0x00010005\r
OUTPUT_DIRECTORY = Build/IntelFsp2Pkg\r
- SUPPORTED_ARCHITECTURES = IA32\r
+ SUPPORTED_ARCHITECTURES = IA32|X64\r
BUILD_TARGETS = DEBUG|RELEASE|NOOPT\r
SKUID_IDENTIFIER = DEFAULT\r
\r
## @file\r
# NULL instance of Platform Sec Lib.\r
#\r
-# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.<BR>\r
#\r
# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
#\r
# The following information is for reference only and not required by the build tools.\r
#\r
-# VALID_ARCHITECTURES = IA32\r
+# VALID_ARCHITECTURES = IA32 X64\r
#\r
\r
################################################################################\r
Ia32/Flat32.nasm\r
Ia32/SecCarInit.nasm\r
\r
+[Sources.X64]\r
+ X64/Long64.nasm\r
+ X64/SecCarInit.nasm\r
+\r
################################################################################\r
#\r
# Package Dependency Section - list of Package files that are required for\r
--- /dev/null
+;; @file\r
+; This is the code that performs early platform initialization.\r
+; It consumes the reset vector, configures the stack.\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
+extern ASM_PFX(TempRamInitApi)\r
+\r
+SECTION .text\r
+\r
+%macro RET_RSI 0\r
+\r
+ movd rsi, mm7 ; restore RSI from MM7\r
+ jmp rsi\r
+\r
+%endmacro\r
+\r
+;\r
+; Perform early platform initialization\r
+;\r
+global ASM_PFX(SecPlatformInit)\r
+ASM_PFX(SecPlatformInit):\r
+\r
+ RET_RSI\r
+\r
--- /dev/null
+;; @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