Skip to content
Browse files

Fix paths in bochs files, format ASM

  • Loading branch information...
1 parent a19526d commit 295c0041fa44a3637d4b6e946cedd5ddc6591c4f @jackpot51 jackpot51 committed
Showing with 17 additions and 15 deletions.
  1. +2 −2 bochs.i386
  2. +2 −2 bochs.x86_64
  3. +2 −0 kernel/asm/interrupts-x86_64.asm
  4. +11 −11 kernel/asm/startup-x86_64.asm
View
4 bochs.i386
@@ -1,6 +1,6 @@
-ata0-master: type=disk, path="build/i386/harddrive.bin", mode=flat
+ata0-master: type=disk, path="build/i386-unknown-redox/debug/harddrive.bin", mode=flat
boot: disk
-com1: enabled=1, mode=file, dev=build/i386/serial.log
+com1: enabled=1, mode=file, dev=build/i386-unknown-redox/debug/serial.log
megs: 1024
magic_break: enabled=1
View
4 bochs.x86_64
@@ -1,6 +1,6 @@
-ata0-master: type=disk, path="build/x86_64/harddrive.bin", mode=flat
+ata0-master: type=disk, path="build/x86_64-unknown-redox/debug/harddrive.bin", mode=flat
boot: disk
-com1: enabled=1, mode=file, dev=build/x86_64/serial.log
+com1: enabled=1, mode=file, dev=build/x86_64-unknown-redox/debug/serial.log
megs: 1024
magic_break: enabled=1
View
2 kernel/asm/interrupts-x86_64.asm
@@ -55,6 +55,7 @@ interrupts:
mov rdi, qword [0x100000]
mov rsi, rsp
+
;Stack Align
mov rbp, rsp
and rsp, 0xFFFFFFFFFFFFFFF0
@@ -85,6 +86,7 @@ interrupts:
pop r14
pop r15
pop rbp
+
iretq
.handler: dq 0
View
22 kernel/asm/startup-x86_64.asm
@@ -71,6 +71,7 @@ startup:
long_mode:
use64
+
; load all the other segments with 32 bit data segments
mov rax, 0x10
mov ds, rax
@@ -78,18 +79,10 @@ long_mode:
mov fs, rax
mov gs, rax
mov ss, rax
- ; set up stack
- mov rsp, 0x200000 - 128
-
- mov rax, gdt.tss
- ltr ax
- ;rust init
- xor rax, rax
- mov [0x100000], rax
- mov eax, [kernel_file + 0x18]
- mov [interrupts.handler], rax
+ mov rsp, 0x200000 - 128
+ ;move kernel image
mov rdi, kernel_file
mov rsi, rdi
add rsi, 0xB000
@@ -102,9 +95,16 @@ long_mode:
xor rax, rax
std
rep stosb
-
cld
+ mov rax, gdt.tss
+ ltr ax
+
+ ;rust init
+ xor rax, rax
+ mov [0x100000], rax
+ mov eax, [kernel_file + 0x18]
+ mov [interrupts.handler], rax
mov rax, kernel_file.font
mov rbx, tss
int 255

0 comments on commit 295c004

Please sign in to comment.
Something went wrong with that request. Please try again.