From de8ea03ef010cdef72cf3431879d52456103e4c5 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Tue, 11 Jan 2022 10:55:19 +0500 Subject: [PATCH] Add func "kernaux_asm_x86_64_hang" --- include/kernaux/asm/x86_64.h | 2 ++ src/asm/x86_64.S | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/include/kernaux/asm/x86_64.h b/include/kernaux/asm/x86_64.h index 89308ea..6f71e0c 100644 --- a/include/kernaux/asm/x86_64.h +++ b/include/kernaux/asm/x86_64.h @@ -7,6 +7,8 @@ extern "C" { #include +void kernaux_asm_x86_64_hang() __attribute__((noreturn)); + #ifdef __cplusplus } #endif diff --git a/src/asm/x86_64.S b/src/asm/x86_64.S index c7cde56..a5d1f5c 100644 --- a/src/asm/x86_64.S +++ b/src/asm/x86_64.S @@ -1,3 +1,10 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif + +.global kernaux_asm_x86_64_hang + +kernaux_asm_x86_64_hang: + cli + hlt + jmp kernaux_asm_x86_64_hang