\r
ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf\r
CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf\r
+ ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf\r
ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf\r
DmaLib|ArmPkg/Library/ArmDmaLib/ArmDmaLib.inf\r
\r
ArmPkg/Drivers/PL390Gic/PL390GicSecLib.inf\r
ArmPkg/Drivers/TimerDxe/TimerDxe.inf\r
\r
+ ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf\r
+ ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.inf\r
+\r
ArmPkg/Filesystem/SemihostFs/SemihostFs.inf\r
\r
ArmPkg/Application/LinuxLoader/LinuxAtagLoader.inf\r
--- /dev/null
+/** @file\r
+*\r
+* Copyright (c) 2012, ARM Limited. All rights reserved.\r
+*\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
+#ifndef __ARM_SMC_LIB__\r
+#define __ARM_SMC_LIB__\r
+\r
+VOID\r
+ArmCallSmc (\r
+ IN OUT UINTN *Rx\r
+ );\r
+\r
+VOID\r
+ArmCallSmcArg1 (\r
+ IN OUT UINTN *Rx,\r
+ IN OUT UINTN *Arg1\r
+ );\r
+\r
+VOID\r
+ArmCallSmcArg2 (\r
+ IN OUT UINTN *Rx,\r
+ IN OUT UINTN *Arg1,\r
+ IN OUT UINTN *Arg2\r
+ );\r
+\r
+VOID\r
+ArmCallSmcArg3 (\r
+ IN OUT UINTN *Rx,\r
+ IN OUT UINTN *Arg1,\r
+ IN OUT UINTN *Arg2,\r
+ IN OUT UINTN *Arg3\r
+ );\r
+\r
+#endif\r
--- /dev/null
+//\r
+// Copyright (c) 2012, ARM Limited. All rights reserved.\r
+//\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
+.text\r
+.align 3\r
+.arch_extension sec\r
+\r
+GCC_ASM_EXPORT(ArmCallSmc)\r
+GCC_ASM_EXPORT(ArmCallSmcArg1)\r
+GCC_ASM_EXPORT(ArmCallSmcArg2)\r
+GCC_ASM_EXPORT(ArmCallSmcArg3)\r
+\r
+ASM_PFX(ArmCallSmc):\r
+ push {r1}\r
+ mov r1, r0\r
+ ldr r0,[r1]\r
+ smc #0\r
+ str r0,[r1]\r
+ pop {r1}\r
+ bx lr\r
+\r
+ASM_PFX(ArmCallSmcArg1):\r
+ push {r2-r3}\r
+ mov r2, r0\r
+ mov r3, r1\r
+ ldr r0,[r2]\r
+ ldr r1,[r3]\r
+ smc #0\r
+ str r0,[r2]\r
+ str r1,[r3]\r
+ pop {r2-r3}\r
+ bx lr\r
+\r
+ASM_PFX(ArmCallSmcArg2):\r
+ push {r3-r5}\r
+ mov r3, r0\r
+ mov r4, r1\r
+ mov r5, r2\r
+ ldr r0,[r3]\r
+ ldr r1,[r4]\r
+ ldr r2,[r5]\r
+ smc #0\r
+ str r0,[r3]\r
+ str r1,[r4]\r
+ str r2,[r5]\r
+ pop {r3-r5}\r
+ bx lr\r
+\r
+ASM_PFX(ArmCallSmcArg3):\r
+ push {r4-r7}\r
+ mov r4, r0\r
+ mov r5, r1\r
+ mov r6, r2\r
+ mov r7, r3\r
+ ldr r0,[r4]\r
+ ldr r1,[r5]\r
+ ldr r2,[r6]\r
+ ldr r3,[r7]\r
+ smc #0\r
+ str r0,[r4]\r
+ str r1,[r5]\r
+ str r2,[r6]\r
+ str r3,[r7]\r
+ pop {r4-r7}\r
+ bx lr\r
--- /dev/null
+//\r
+// Copyright (c) 2012, ARM Limited. All rights reserved.\r
+//\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 ArmCallSmc\r
+ EXPORT ArmCallSmcArg1\r
+ EXPORT ArmCallSmcArg2\r
+ EXPORT ArmCallSmcArg3\r
+\r
+ AREA ArmSmc, CODE, READONLY\r
+\r
+ArmCallSmc\r
+ push {r1}\r
+ mov r1, r0\r
+ ldr r0,[r1]\r
+ smc #0\r
+ str r0,[r1]\r
+ pop {r1}\r
+ bx lr\r
+\r
+ArmCallSmcArg1\r
+ push {r2-r3}\r
+ mov r2, r0\r
+ mov r3, r1\r
+ ldr r0,[r2]\r
+ ldr r1,[r3]\r
+ smc #0\r
+ str r0,[r2]\r
+ str r1,[r3]\r
+ pop {r2-r3}\r
+ bx lr\r
+\r
+ArmCallSmcArg2\r
+ push {r3-r5}\r
+ mov r3, r0\r
+ mov r4, r1\r
+ mov r5, r2\r
+ ldr r0,[r3]\r
+ ldr r1,[r4]\r
+ ldr r2,[r5]\r
+ smc #0\r
+ str r0,[r3]\r
+ str r1,[r4]\r
+ str r2,[r5]\r
+ pop {r3-r5}\r
+ bx lr\r
+\r
+ArmCallSmcArg3\r
+ push {r4-r7}\r
+ mov r4, r0\r
+ mov r5, r1\r
+ mov r6, r2\r
+ mov r7, r3\r
+ ldr r0,[r4]\r
+ ldr r1,[r5]\r
+ ldr r2,[r6]\r
+ ldr r3,[r7]\r
+ smc #0\r
+ str r0,[r4]\r
+ str r1,[r5]\r
+ str r2,[r6]\r
+ str r3,[r7]\r
+ pop {r4-r7}\r
+ bx lr\r
+\r
+ END\r
--- /dev/null
+#/** @file\r
+# \r
+# Copyright (c) 2012-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
+[Defines]\r
+ INF_VERSION = 0x00010005\r
+ BASE_NAME = ArmSmcLib\r
+ FILE_GUID = eb3f17d5-a3cc-4eac-8912-84162d0f79da \r
+ MODULE_TYPE = BASE\r
+ VERSION_STRING = 1.0\r
+ LIBRARY_CLASS = ArmSmcLib\r
+ \r
+[Sources.ARM]\r
+ Arm/ArmSmc.asm | RVCT\r
+ Arm/ArmSmc.S | GCC\r
+\r
+[Packages]\r
+ MdePkg/MdePkg.dec\r
+ ArmPkg/ArmPkg.dec\r
--- /dev/null
+//\r
+// Copyright (c) 2012-2013, ARM Limited. All rights reserved.\r
+//\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
+.text\r
+.align 3\r
+\r
+GCC_ASM_EXPORT(ArmCallSmc)\r
+GCC_ASM_EXPORT(ArmCallSmcArg1)\r
+GCC_ASM_EXPORT(ArmCallSmcArg2)\r
+GCC_ASM_EXPORT(ArmCallSmcArg3)\r
+\r
+ASM_PFX(ArmCallSmc):\r
+ bx lr\r
+\r
+// Arg1 in R1\r
+ASM_PFX(ArmCallSmcArg1):\r
+ bx lr\r
+\r
+ASM_PFX(ArmCallSmcArg2):\r
+ bx lr\r
+\r
+ASM_PFX(ArmCallSmcArg3):\r
+ bx lr\r
--- /dev/null
+//\r
+// Copyright (c) 2012-2013, ARM Limited. All rights reserved.\r
+//\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 ArmCallSmc\r
+ EXPORT ArmCallSmcArg1\r
+ EXPORT ArmCallSmcArg2\r
+ EXPORT ArmCallSmcArg3\r
+\r
+ AREA ArmSmc, CODE, READONLY\r
+\r
+ArmCallSmc\r
+ bx lr\r
+\r
+// Arg1 in R1\r
+ArmCallSmcArg1\r
+ bx lr\r
+\r
+ArmCallSmcArg2\r
+ bx lr\r
+\r
+ArmCallSmcArg3\r
+ bx lr\r
+\r
+ END\r
--- /dev/null
+#/** @file\r
+# \r
+# ArmSmcLib when no SMC support is desired (might be the case for CPU without the\r
+# Trustzone support / ARM Security Extension)\r
+#\r
+# Copyright (c) 2012-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
+[Defines]\r
+ INF_VERSION = 0x00010005\r
+ BASE_NAME = ArmSmcLibNull\r
+ FILE_GUID = 140e8004-16e1-4de1-a352-c6ef51110ecf\r
+ MODULE_TYPE = BASE\r
+ VERSION_STRING = 1.0\r
+ LIBRARY_CLASS = ArmSmcLib\r
+ \r
+[Sources.ARM]\r
+ Arm/ArmSmcNull.asm | RVCT\r
+ Arm/ArmSmcNull.S | GCC\r
+\r
+[Packages]\r
+ MdePkg/MdePkg.dec\r
+ ArmPkg/ArmPkg.dec\r
ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf\r
DmaLib|ArmPkg/Library/ArmDmaLib/ArmDmaLib.inf\r
ArmGicLib|ArmPkg/Drivers/PL390Gic/PL390GicLib.inf\r
+ ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf\r
\r
# RealView Emulation Board Specific Libraries\r
EfiResetSystemLib|ArmPlatformPkg/ArmRealViewEbPkg/Library/ResetSystemLib/ResetSystemLib.inf\r
LcdPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpressLib.inf\r
\r
TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf \r
- ArmSmcLib|ArmPlatformPkg/Library/ArmSmcLib/ArmSmcLib.inf\r
+ ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf\r
\r
[BuildOptions]\r
!ifdef $(ARM_BIGLITTLE_TC2)\r
DmaLib|ArmPkg/Library/ArmDmaLib/ArmDmaLib.inf\r
ArmGicLib|ArmPkg/Drivers/PL390Gic/PL390GicLib.inf\r
ArmPlatformStackLib|ArmPlatformPkg/Library/ArmPlatformStackLib/ArmPlatformStackLib.inf\r
+ ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf\r
\r
# Versatile Express Specific Libraries\r
ArmPlatformSysConfigLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf\r
+++ /dev/null
-/** @file\r
-*\r
-* Copyright (c) 2012, ARM Limited. All rights reserved.\r
-*\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
-#ifndef __ARM_SMC_LIB__\r
-#define __ARM_SMC_LIB__\r
-\r
-VOID\r
-ArmCallSmc (\r
- IN OUT UINTN *Rx\r
- );\r
-\r
-VOID\r
-ArmCallSmcArg1 (\r
- IN OUT UINTN *Rx,\r
- IN OUT UINTN *Arg1\r
- );\r
-\r
-VOID\r
-ArmCallSmcArg2 (\r
- IN OUT UINTN *Rx,\r
- IN OUT UINTN *Arg1,\r
- IN OUT UINTN *Arg2\r
- );\r
-\r
-VOID\r
-ArmCallSmcArg3 (\r
- IN OUT UINTN *Rx,\r
- IN OUT UINTN *Arg1,\r
- IN OUT UINTN *Arg2,\r
- IN OUT UINTN *Arg3\r
- );\r
-\r
-#endif\r
+++ /dev/null
-//\r
-// Copyright (c) 2012, ARM Limited. All rights reserved.\r
-//\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
-.text\r
-.align 3\r
-.arch_extension sec\r
-\r
-GCC_ASM_EXPORT(ArmCallSmc)\r
-GCC_ASM_EXPORT(ArmCallSmcArg1)\r
-GCC_ASM_EXPORT(ArmCallSmcArg2)\r
-GCC_ASM_EXPORT(ArmCallSmcArg3)\r
-\r
-ASM_PFX(ArmCallSmc):\r
- push {r1}\r
- mov r1, r0\r
- ldr r0,[r1]\r
- smc #0\r
- str r0,[r1]\r
- pop {r1}\r
- blx lr\r
-\r
-// Arg1 in R1\r
-ASM_PFX(ArmCallSmcArg1):\r
- push {r2-r3}\r
- mov r2, r0\r
- mov r3, r1\r
- ldr r0,[r2]\r
- ldr r1,[r3]\r
- smc #0\r
- str r0,[r2]\r
- str r1,[r3]\r
- pop {r2-r3}\r
- blx lr\r
-\r
-ASM_PFX(ArmCallSmcArg2):\r
- push {r3-r5}\r
- mov r3, r0\r
- mov r4, r1\r
- mov r5, r2\r
- ldr r0,[r3]\r
- ldr r1,[r4]\r
- ldr r2,[r5]\r
- smc #0\r
- str r0,[r3]\r
- str r1,[r4]\r
- str r2,[r5]\r
- pop {r3-r5}\r
- blx lr\r
-\r
-ASM_PFX(ArmCallSmcArg3):\r
- push {r4-r7}\r
- mov r4, r0\r
- mov r5, r1\r
- mov r6, r2\r
- mov r7, r3\r
- ldr r0,[r4]\r
- ldr r1,[r5]\r
- ldr r2,[r6]\r
- ldr r3,[r7]\r
- smc #0\r
- str r0,[r4]\r
- str r1,[r5]\r
- str r2,[r6]\r
- str r3,[r7]\r
- pop {r4-r7}\r
- blx lr\r
+++ /dev/null
-//\r
-// Copyright (c) 2012, ARM Limited. All rights reserved.\r
-//\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 ArmCallSmc\r
- EXPORT ArmCallSmcArg1\r
- EXPORT ArmCallSmcArg2\r
- EXPORT ArmCallSmcArg3\r
-\r
- AREA ArmSmc, CODE, READONLY\r
-\r
-ArmCallSmc\r
- push {r1}\r
- mov r1, r0\r
- ldr r0,[r1]\r
- smc #0\r
- str r0,[r1]\r
- pop {r1}\r
- blx lr\r
-\r
-// Arg1 in R1\r
-ArmCallSmcArg1\r
- push {r2-r3}\r
- mov r2, r0\r
- mov r3, r1\r
- ldr r0,[r2]\r
- ldr r1,[r3]\r
- smc #0\r
- str r0,[r2]\r
- str r1,[r3]\r
- pop {r2-r3}\r
- blx lr\r
-\r
-ArmCallSmcArg2\r
- push {r3-r5}\r
- mov r3, r0\r
- mov r4, r1\r
- mov r5, r2\r
- ldr r0,[r3]\r
- ldr r1,[r4]\r
- ldr r2,[r5]\r
- smc #0\r
- str r0,[r3]\r
- str r1,[r4]\r
- str r2,[r5]\r
- pop {r3-r5}\r
- blx lr\r
-\r
-ArmCallSmcArg3\r
- push {r4-r7}\r
- mov r4, r0\r
- mov r5, r1\r
- mov r6, r2\r
- mov r7, r3\r
- ldr r0,[r4]\r
- ldr r1,[r5]\r
- ldr r2,[r6]\r
- ldr r3,[r7]\r
- smc #0\r
- str r0,[r4]\r
- str r1,[r5]\r
- str r2,[r6]\r
- str r3,[r7]\r
- pop {r4-r7}\r
- blx lr\r
-\r
- END\r
+++ /dev/null
-#/** @file\r
-# \r
-# Copyright (c) 2012, 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
-[Defines]\r
- INF_VERSION = 0x00010005\r
- BASE_NAME = ArmSmcLib\r
- FILE_GUID = eb3f17d5-a3cc-4eac-8912-84162d0f79da \r
- MODULE_TYPE = BASE\r
- VERSION_STRING = 1.0\r
- LIBRARY_CLASS = ArmSmcLib\r
- \r
-[Sources.common]\r
- ArmSmc.asm | RVCT\r
- ArmSmc.S | GCC\r
-\r
-[Packages]\r
- MdePkg/MdePkg.dec\r
- ArmPlatformPkg/ArmPlatformPkg.dec\r
ArmPlatformLib|BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardLib.inf\r
ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA8Lib/ArmCortexA8Lib.inf\r
ArmPlatformStackLib|ArmPlatformPkg/Library/ArmPlatformStackLib/ArmPlatformStackLib.inf\r
+ ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf\r
\r
HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf\r