소스 검색

fix: 未清空ist的问题

fslongjin 2 년 전
부모
커밋
4f24cff980
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      kernel/main.c

+ 1 - 0
kernel/main.c

@@ -103,6 +103,7 @@ void system_initialize()
 
     // =========== 重新设置initial_tss[0]的ist
     uchar *ptr = (uchar *)kmalloc(STACK_SIZE, 0) + STACK_SIZE;
+    memset(ptr, 0, STACK_SIZE); // 将ist清空
     ((struct process_control_block *)(ptr - STACK_SIZE))->cpu_id = 0;
 
     initial_tss[0].ist1 = (ul)ptr;