mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
MdePkg: Add LoongArch64 support for StackCheckLib
Added LoongArch64 stack cookie interrupt instance, calling `CpuBreakpoint` to stop the CPU. Signed-off-by: Chao Li <lichao@loongson.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
parent
7779b1a042
commit
8756401a02
2 changed files with 24 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# LoongArch64/StackCookieInterrupt.S
|
||||
#
|
||||
# Copyright (c) 2026, Loongson Technology Corporation Limited. All rights reserved.<BR>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#include <Library/BaseLib.h>
|
||||
ASM_GLOBAL ASM_PFX(TriggerStackCookieInterrupt)
|
||||
|
||||
#/**
|
||||
# Calling `CpuBreakpoint` to create a breakpoint to the LoongArch64 exception handle and stop.
|
||||
#**/
|
||||
|
||||
ASM_PFX(TriggerStackCookieInterrupt):
|
||||
bl CpuBreakpoint
|
||||
jirl $zero, $ra, 0
|
||||
.end
|
||||
|
|
@ -30,6 +30,9 @@
|
|||
AArch64/StackCookieInterrupt.S |GCC
|
||||
AArch64/StackCookieInterrupt.asm |MSFT
|
||||
|
||||
[Sources.LOONGARCH64]
|
||||
LoongArch64/StackCookieInterrupt.S | GCC
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue