Skip to content

Commit 2f6152d

Browse files
authored
Merge pull request #125 from ReturnInfinity/kvm
KVM and serial additions
2 parents 7efd48b + 5643829 commit 2f6152d

File tree

13 files changed

+484
-155
lines changed

13 files changed

+484
-155
lines changed

src/drivers.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
; Internal
1010
%include "drivers/apic.asm"
11-
%include "drivers/hpet.asm"
1211
%include "drivers/ioapic.asm"
1312
%include "drivers/ps2.asm"
1413
%include "drivers/serial.asm"
14+
%include "drivers/timer.asm"
1515
%ifndef NO_VIRTIO
1616
%include "drivers/virtio.asm"
1717
%endif

src/drivers/hpet.asm

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

src/drivers/serial.asm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@
1010
serial_init:
1111
; Pure64 has already initialized the serial port
1212

13+
; Check if we booted via BIOS
14+
cmp byte [os_boot_mode], 'B'
15+
je serial_init_skip_arch ; If so, skip the IAPC_BOOT_ARCH check
16+
1317
; Check if Serial is present via ACPI IAPC_BOOT_ARCH
1418
mov ax, [os_boot_arch]
1519
bt ax, 0 ; LEGACY_DEVICES
1620
jnc serial_init_error
1721

22+
serial_init_skip_arch:
23+
1824
; Set flag that Serial was enabled
1925
or qword [os_SysConfEn], 1 << 2
2026

@@ -35,6 +41,9 @@ serial_init:
3541
out dx, al
3642
%endif
3743

44+
mov rax, b_output_serial
45+
mov [0x100018], rax ; Set kernel b_output to the serial port
46+
3847
serial_init_error:
3948
ret
4049
; -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)