Merge remote-tracking branch 'origin/master' into x64_new

This commit is contained in:
Stefan Lankes 2012-05-24 12:05:14 +02:00
commit d21e707024
5 changed files with 10 additions and 10 deletions

1
.gitignore vendored
View file

@ -12,6 +12,7 @@
tags
Makefile
include/metalsvm/config.h
include/metalsvm/config.inc
tools/make_initrd
newlib/examples/hello
newlib/examples/jacobi

View file

@ -113,8 +113,12 @@ veryclean: clean
@echo [DEP] $*.dep
$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] $@
$Q$(NASM) $(NASMFLAGS) -o $@ $<

View file

@ -799,15 +799,14 @@ common_switch:
; determine TSS
%if MAX_CORES > 1
call apic_cpu_id
mov ecx, DWORD 0x68
mul ecx
%else
xor eax, eax
%endif
mov ecx, DWORD 0x68
mul ecx
add eax, task_state_segments
add eax, DWORD 4
; set esp0 in TSS
mov [eax], esp
mov [eax+4], esp
; call cleanup code
call finish_task_switch

View file

@ -1,4 +0,0 @@
; config macros for the assembler code
; define the maximum number of core
%define MAX_CORES 1

View file

@ -190,7 +190,7 @@ static void NORETURN do_exit(int arg) {
//remove 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);