Skip to content

Commit d9b5a69

Browse files
author
Ian Seyler
committed
Remove PIT code
1 parent dcc14a2 commit d9b5a69

File tree

4 files changed

+0
-108
lines changed

4 files changed

+0
-108
lines changed

src/init/pit.asm

Lines changed: 0 additions & 68 deletions
This file was deleted.

src/init/smp.asm

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,7 @@ delay:
126126
push rax
127127
push rbx
128128

129-
mov rbx, [p_HPET_Address] ; Was HPET detected?
130-
cmp rbx, 0
131-
je delay_pit ; If not, use PIT for timing
132129
call os_hpet_delay
133-
jmp delay_done
134-
135-
delay_pit:
136-
call os_pit_delay
137130

138131
delay_done:
139132
pop rbx

src/interrupt.asm

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,6 @@ interrupt_gate: ; handler for all other interrupts
2323
; -----------------------------------------------------------------------------
2424

2525

26-
; -----------------------------------------------------------------------------
27-
; PIT interrupt. IRQ 0x00, INT 0x20
28-
align 16
29-
pit_irq:
30-
push rax
31-
32-
inc qword [p_Counter_Timer]
33-
34-
mov al, 0x20 ; Acknowledge the IRQ
35-
out 0x20, al
36-
37-
pop rax
38-
iretq
39-
; -----------------------------------------------------------------------------
40-
41-
4226
; -----------------------------------------------------------------------------
4327
; Floppy drive interrupt. IRQ 0x06, INT 0x26
4428
; This IRQ runs when floppy drive reads from or writes to whole disk

src/pure64.asm

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -770,27 +770,11 @@ pde_end:
770770
%endif
771771

772772
; Configure system timer
773-
; HPET is preferred but may not exist. If there was no ACPI table entry then use PIT
774-
775-
mov rax, [p_HPET_Address]
776-
cmp rax, 0
777-
jz skip_hpet
778-
779773
mov rsi, msg_hpet
780774
call debug_msg
781775
call init_hpet ; Configure the HPET
782776
mov rsi, msg_ok
783777
call debug_msg
784-
jmp timer_done
785-
786-
skip_hpet:
787-
mov rsi, msg_pit
788-
call debug_msg
789-
call init_pit ; Configure the PIT
790-
mov rsi, msg_ok
791-
call debug_msg
792-
793-
timer_done:
794778

795779
%ifndef NOVIDEO
796780
; Visual Debug (6/8)
@@ -991,7 +975,6 @@ clear_regs:
991975
%include "init/acpi.asm"
992976
%include "init/cpu.asm"
993977
%include "init/hpet.asm"
994-
%include "init/pit.asm"
995978
%include "init/serial.asm"
996979
%include "init/smp.asm"
997980
%ifdef BIOS

0 commit comments

Comments
 (0)