bugfix: 解决了ignore_int在运行时可能破坏进程执行上下文的问题。 (#61)

This commit is contained in:
login
2022-10-16 19:38:46 +08:00
committed by GitHub
parent fbe1e23e97
commit bf8f61b500
6 changed files with 76 additions and 96 deletions

View File

@ -326,6 +326,7 @@ entry64:
jnc start_smp
setup_IDT:
// 使cIDT
leaq m_ignore_int(%rip), %rdx // ignore_int8B
movq $(0x08 << 16), %rax // IDT0x100000TI=0,RPL=0
movw %dx, %ax
@ -460,6 +461,7 @@ go_to_smp_kernel:
.quad smp_ap_start
// ==== / ignore int
// (使cIDTignore_int)
m_ignore_int:
// cignore_int
movq go_to_ignore_int(%rip), %rax
@ -470,7 +472,7 @@ m_ignore_int:
go_to_ignore_int:
.quad ignore_int
.quad ignore_int_handler
ENTRY(head_stack_start)