Merge remote-tracking branch 'origin/master' into x64_new
This commit is contained in:
commit
d21e707024
5 changed files with 10 additions and 10 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -12,6 +12,7 @@
|
||||||
tags
|
tags
|
||||||
Makefile
|
Makefile
|
||||||
include/metalsvm/config.h
|
include/metalsvm/config.h
|
||||||
|
include/metalsvm/config.inc
|
||||||
tools/make_initrd
|
tools/make_initrd
|
||||||
newlib/examples/hello
|
newlib/examples/hello
|
||||||
newlib/examples/jacobi
|
newlib/examples/jacobi
|
||||||
|
|
|
@ -113,8 +113,12 @@ veryclean: clean
|
||||||
@echo [DEP] $*.dep
|
@echo [DEP] $*.dep
|
||||||
$Q$(CPP_FOR_TARGET) -MF $*.dep -MT $*.o -MM -D__KERNEL__ $(CFLAGS) $<
|
$Q$(CPP_FOR_TARGET) -MF $*.dep -MT $*.o -MM -D__KERNEL__ $(CFLAGS) $<
|
||||||
|
|
||||||
|
include/metalsvm/config.inc: include/metalsvm/config.h
|
||||||
|
@echo "; This file is generated automatically from the config.h file." > include/metalsvm/config.inc
|
||||||
|
@echo "; Before editing this, you should consider editing config.h." >> include/metalsvm/config.inc
|
||||||
|
@awk '/^#define MAX_CORES/{ print "%define MAX_CORES", $$3 }' include/metalsvm/config.h >> include/metalsvm/config.inc
|
||||||
|
|
||||||
%.o : %.asm
|
%.o : %.asm include/metalsvm/config.inc
|
||||||
@echo [ASM] $@
|
@echo [ASM] $@
|
||||||
$Q$(NASM) $(NASMFLAGS) -o $@ $<
|
$Q$(NASM) $(NASMFLAGS) -o $@ $<
|
||||||
|
|
||||||
|
|
|
@ -799,15 +799,14 @@ common_switch:
|
||||||
; determine TSS
|
; determine TSS
|
||||||
%if MAX_CORES > 1
|
%if MAX_CORES > 1
|
||||||
call apic_cpu_id
|
call apic_cpu_id
|
||||||
|
mov ecx, DWORD 0x68
|
||||||
|
mul ecx
|
||||||
%else
|
%else
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
%endif
|
%endif
|
||||||
mov ecx, DWORD 0x68
|
|
||||||
mul ecx
|
|
||||||
add eax, task_state_segments
|
add eax, task_state_segments
|
||||||
add eax, DWORD 4
|
|
||||||
; set esp0 in TSS
|
; set esp0 in TSS
|
||||||
mov [eax], esp
|
mov [eax+4], esp
|
||||||
|
|
||||||
; call cleanup code
|
; call cleanup code
|
||||||
call finish_task_switch
|
call finish_task_switch
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
; config macros for the assembler code
|
|
||||||
|
|
||||||
; define the maximum number of core
|
|
||||||
%define MAX_CORES 1
|
|
|
@ -190,7 +190,7 @@ static void NORETURN do_exit(int arg) {
|
||||||
|
|
||||||
//remove fildes_table
|
//remove fildes_table
|
||||||
if(!curr_task->fildes_table)
|
if(!curr_task->fildes_table)
|
||||||
kfree(curr_task->fildes_table, sizeof(fildes_t)*NR_OPEN);
|
kfree(curr_task->fildes_table, sizeof(filp_t)*NR_OPEN);
|
||||||
|
|
||||||
spinlock_unlock(&curr_task->vma_lock);
|
spinlock_unlock(&curr_task->vma_lock);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue