1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00

Add function "kernaux_arch_i386_hang"

This commit is contained in:
Alex Kotov 2020-11-27 19:11:58 +05:00
parent 362f94935b
commit d6be5aafe2
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 8 additions and 0 deletions

View file

@ -5,6 +5,8 @@
extern "C" {
#endif
void kernaux_arch_i386_hang() __attribute__((noreturn));
unsigned long kernaux_arch_i386_read_cr0();
unsigned long kernaux_arch_i386_read_cr4();

View file

@ -1,9 +1,15 @@
.global kernaux_arch_i386_hang
.global kernaux_arch_i386_read_cr0
.global kernaux_arch_i386_read_cr4
.global kernaux_arch_i386_write_cr0
.global kernaux_arch_i386_write_cr3
.global kernaux_arch_i386_write_cr4
kernaux_arch_i386_hang:
cli
hlt
jmp kernaux_arch_i386_hang
kernaux_arch_i386_read_cr0:
mov %cr0, %eax
ret