new:kzalloc

This commit is contained in:
fslongjin
2022-08-15 17:57:05 +08:00
parent cec44c1fd7
commit f513286f53
11 changed files with 73 additions and 29 deletions

View File

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