From fd5a9b87e47bc072aa63fcaf5735232a37338303 Mon Sep 17 00:00:00 2001 From: Miguel Date: Sun, 2 Sep 2018 15:47:29 +0200 Subject: cleanup filenames --- asm/gdt.s | 2 -- asm/int.s | 3 --- asm/mp.asm | 23 ++++++++++++++--------- asm/mp.h | 3 ++- asm/start.s | 3 +-- asm/task.h | 1 + 6 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 asm/task.h (limited to 'asm') diff --git a/asm/gdt.s b/asm/gdt.s index 698dcf6..c155ce9 100644 --- a/asm/gdt.s +++ b/asm/gdt.s @@ -39,6 +39,4 @@ asm_setup_gdt: ret - - ret diff --git a/asm/int.s b/asm/int.s index 3049a52..566b646 100644 --- a/asm/int.s +++ b/asm/int.s @@ -61,8 +61,6 @@ pop %eax // load original .endm - - .macro intx ack num func /* @@ -174,4 +172,3 @@ exc15: excx exception_handle_15 exc16: excx exception_handle_16 exc17: excx exception_handle_17 exc18: excx exception_handle_18 - diff --git a/asm/mp.asm b/asm/mp.asm index e5cc26d..f0eb9c0 100644 --- a/asm/mp.asm +++ b/asm/mp.asm @@ -1,7 +1,8 @@ -global smp_go +global smp_start +extern smp_main ; master boot record for application processors ;[org 0x7000] -smp_go: +smp_start: [bits 16] cli ;switch off interrupts! @@ -34,15 +35,19 @@ init_pm: call boot_32_pm ;continue booting in 32-bit protected mode boot_32_pm: - - mov eax, 1 ; semaphore - xchg eax, [LLOCK] - cmp eax,1 hlt - je $ - jmp $ ; loop forever here + jmp boot_32_pm + + ;mov eax, 1 ; semaphore + ;xchg eax, [LLOCK] + ;cmp eax,1 + ;hlt + ;je $ + ;jmp $ ; loop forever here + + ;call [0x8010] ;kernel_ap ;jump into our Kernel! + call smp_main - call [0x8010] ;kernel_ap ;jump into our Kernel! jmp $ ; should never be reached diff --git a/asm/mp.h b/asm/mp.h index d050012..3ace14a 100644 --- a/asm/mp.h +++ b/asm/mp.h @@ -1 +1,2 @@ -void smp_go(); +/** Application processors */ +void smp_start(); diff --git a/asm/start.s b/asm/start.s index 1d881b4..26464a7 100644 --- a/asm/start.s +++ b/asm/start.s @@ -19,8 +19,7 @@ .section .smp .code16 _start_smp: -jmp . -//call smp_go # TODO: align later before going C +call smp_start # TODO: align later before going C # Declare a header as in the Multiboot Standard. We put this into a special # section so we can force the header to be in the start of the final program. diff --git a/asm/task.h b/asm/task.h new file mode 100644 index 0000000..40a8c17 --- /dev/null +++ b/asm/task.h @@ -0,0 +1 @@ +/* empty */ -- cgit v1.2.3