]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/LoongArch64/EnableInterrupts.S
MdePkg/BaseLib: BaseLib for LOONGARCH64 architecture.
[mirror_edk2.git] / MdePkg / Library / BaseLib / LoongArch64 / EnableInterrupts.S
diff --git a/MdePkg/Library/BaseLib/LoongArch64/EnableInterrupts.S b/MdePkg/Library/BaseLib/LoongArch64/EnableInterrupts.S
new file mode 100644 (file)
index 0000000..3c34fb2
--- /dev/null
@@ -0,0 +1,21 @@
+#------------------------------------------------------------------------------\r
+#\r
+# LoongArch interrupt enable\r
+#\r
+# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>\r
+#\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+ASM_GLOBAL ASM_PFX(EnableInterrupts)\r
+\r
+#/**\r
+#  Enables CPU interrupts.\r
+#**/\r
+\r
+ASM_PFX(EnableInterrupts):\r
+  li.w    $t0, 0x4\r
+  csrxchg $t0, $t0, 0x0\r
+  jirl    $zero, $ra, 0\r
+  .end\r