]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/Library/BaseCpuLib: Enable VS2017/ARM64 builds
authorPete Batard <pete@akeo.ie>
Wed, 28 Mar 2018 15:55:21 +0000 (23:55 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 17 Apr 2018 06:54:35 +0000 (14:54 +0800)
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.asm [new file with mode: 0644]
MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.asm [new file with mode: 0644]
MdePkg/Library/BaseCpuLib/BaseCpuLib.inf

diff --git a/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.asm b/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.asm
new file mode 100644 (file)
index 0000000..aee9049
--- /dev/null
@@ -0,0 +1,39 @@
+;------------------------------------------------------------------------------\r
+;\r
+; CpuFlushTlb() for ARM\r
+;\r
+; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+; Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
+; This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php.\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+  EXPORT CpuFlushTlb\r
+  AREA BaseCpuLib_LowLevel, CODE, READONLY\r
+\r
+;/**\r
+;  Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.\r
+;\r
+;  Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.\r
+;\r
+;**/\r
+;VOID\r
+;EFIAPI\r
+;CpuFlushTlb (\r
+;  VOID\r
+;  );\r
+;\r
+CpuFlushTlb\r
+  tlbi  vmalle1                 // Invalidate Inst TLB and Data TLB\r
+  dsb   sy\r
+  isb\r
+  ret\r
+\r
+  END\r
diff --git a/MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.asm b/MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.asm
new file mode 100644 (file)
index 0000000..7481c22
--- /dev/null
@@ -0,0 +1,40 @@
+;------------------------------------------------------------------------------\r
+;\r
+; CpuSleep() for AArch64\r
+;\r
+; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+; Portions copyright (c) 2011 - 2013, ARM LTD. All rights reserved.<BR>\r
+; This program and the accompanying materials\r
+; are licensed and made available under the terms and conditions of the BSD License\r
+; which accompanies this distribution.  The full text of the license may be found at\r
+; http://opensource.org/licenses/bsd-license.php.\r
+;\r
+; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;\r
+;------------------------------------------------------------------------------\r
+\r
+  EXPORT CpuSleep\r
+  AREA BaseCpuLib_LowLevel, CODE, READONLY\r
+\r
+;/**\r
+;  Places the CPU in a sleep state until an interrupt is received.\r
+;\r
+;  Places the CPU in a sleep state until an interrupt is received. If interrupts\r
+;  are disabled prior to calling this function, then the CPU will be placed in a\r
+;  sleep state indefinitely.\r
+;\r
+;**/\r
+;VOID\r
+;EFIAPI\r
+;CpuSleep (\r
+;  VOID\r
+;  );\r
+;\r
+\r
+CpuSleep\r
+  wfi\r
+  ret\r
+\r
+  END\r
index 996446ec1a386ec4dcc97f91c009618defa3f483..dad08dfe7f54663b8c860ee2a4d2e2cfb093feec 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  Instance of CPU Library for various architecture.\r
 #\r
-#  CPU Library implemented using ASM functions for IA-32 and X64,\r
+#  CPU Library implemented using ASM functions for IA32, X64, ARM, AARCH64,\r
 #  PAL CALLs for IPF, and empty functions for EBC.\r
 #\r
 #  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
   Arm/CpuSleep.S      | GCC  \r
 \r
 [Sources.AARCH64]\r
-  AArch64/CpuFlushTlb.S | GCC\r
-  AArch64/CpuSleep.S    | GCC\r
+  AArch64/CpuFlushTlb.S   | GCC\r
+  AArch64/CpuSleep.S      | GCC\r
+  AArch64/CpuFlushTlb.asm | MSFT\r
+  AArch64/CpuSleep.asm    | MSFT\r
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r