Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ mkdir -p bin

cd src

nasm -dBIOS=1 -dNOVIDEO=1 pure64.asm -o ../bin/pure64-bios-novideo.sys -l ../bin/pure64-bios-novideo-debug.txt
nasm -dBIOS=1 pure64.asm -o ../bin/pure64-bios.sys -l ../bin/pure64-bios-debug.txt
nasm -dUEFI=1 pure64.asm -o ../bin/pure64-uefi.sys -l ../bin/pure64-uefi-debug.txt
nasm -dBIOS -dNOVIDEO pure64.asm -o ../bin/pure64-bios-novideo.sys -l ../bin/pure64-bios-novideo-debug.txt
nasm -dBIOS pure64.asm -o ../bin/pure64-bios.sys -l ../bin/pure64-bios-debug.txt
nasm -dUEFI pure64.asm -o ../bin/pure64-uefi.sys -l ../bin/pure64-uefi-debug.txt

cd boot

Expand Down
1 change: 1 addition & 0 deletions clean.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash

rm -f bin/*.sys
rm -f bin/*.txt
157 changes: 0 additions & 157 deletions src/init/hpet.asm

This file was deleted.

29 changes: 3 additions & 26 deletions src/init/smp.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@


init_smp:
sti ; Enable interrupts in case PIT is needed

; Check if we want the AP's to be enabled.. if not then skip to end
cmp byte [cfg_smpinit], 1 ; Check if SMP should be enabled
jne noMP ; If not then skip SMP init
Expand Down Expand Up @@ -52,7 +50,7 @@ smp_send_INIT_done:

; Wait 500 microseconds
mov eax, 500
call delay
call timer_delay

mov esi, IM_DetectedCoreIDs
xor ecx, ecx
Expand Down Expand Up @@ -84,7 +82,7 @@ smp_send_SIPI_done:

; Wait 10000 microseconds for the AP's to finish
mov eax, 10000
call delay
call timer_delay

noMP:
; Gather and store the APIC ID of the BSP
Expand All @@ -102,7 +100,7 @@ noMP:
rdtsc
push rax
mov rax, 1024
call delay
call timer_delay
rdtsc
pop rdx
sub rax, rdx
Expand All @@ -111,28 +109,7 @@ noMP:
div rcx
mov [p_cpu_speed], ax

cli ; Disable interrupts in case PIT was needed

ret


; -----------------------------------------------------------------------------
; delay -- Delay by X microseconds
; IN: RAX = Time microseconds
; OUT: All registers preserved
; Note: There are 1,000,000 microseconds in a second
; There are 1,000 milliseconds in a second
delay:
push rax
push rbx

call os_hpet_delay

delay_done:
pop rbx
pop rax
ret
; -----------------------------------------------------------------------------


; =============================================================================
Expand Down
Loading