switched qemu to qemu-system-i386, even though it doesnt change anything useful
This commit is contained in:
parent
e2cf54877e
commit
91d6d126e8
8 changed files with 28 additions and 35 deletions
|
|
@ -1,2 +1,2 @@
|
|||
set arch i386:x86-64
|
||||
symbol-file build/bluesnow-x86.bin
|
||||
set arch i386
|
||||
file build/bluesnow-x86.bin
|
||||
|
|
|
|||
|
|
@ -25,3 +25,7 @@ path = "x86"
|
|||
[dependencies.lazy_static]
|
||||
version = "1.0.0"
|
||||
features = ["spin_no_std"]
|
||||
|
||||
[dependencies.compiler_builtins]
|
||||
#I'm waiting for somebody to port i386/udivdi3.S ... :(((
|
||||
git = "https://github.com/rust-lang-nursery/compiler-builtins"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ all:
|
|||
## COMPILE ASM (nasm)
|
||||
asm_source := $(wildcard src/arch/$(ARCH)/*.asm)
|
||||
asm_object := $(patsubst src/arch/$(ARCH)/%.asm, build/arch/$(ARCH)/%.o, $(asm_source))
|
||||
NASM := /usr/bin/nasm -f elf -g
|
||||
NASM := /usr/bin/nasm -f elf -gdwarf
|
||||
build/arch/$(ARCH)/%.o: src/arch/$(ARCH)/%.asm Makefile
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(NASM) $< -o $@
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ else
|
|||
PORTG := 4344
|
||||
endif
|
||||
|
||||
QEMU := qemu-system-x86_64\
|
||||
QEMU := qemu-system-i386\
|
||||
-gdb tcp::$(PORTG)\
|
||||
-S\
|
||||
-enable-kvm\
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ set_up_page_tables:
|
|||
or eax, 0b10000011 ; huge + present + writable
|
||||
mov [p2_table + 4], eax
|
||||
|
||||
mov eax, 0x800000 ; 8MB -> 12Mb (second page)
|
||||
mov eax, 0x800000 ; 8MB -> 12Mb (third page)
|
||||
or eax, 0b10000011 ; huge + present + writable
|
||||
mov [p2_table + 8], eax
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,6 @@ ENTRY(start)
|
|||
OUTPUT_FORMAT(elf32-i386)
|
||||
|
||||
SECTIONS {
|
||||
/* GDT for the win */
|
||||
/* . = 0x800; */
|
||||
/* .gdt : {KEEP(*(.gdt))} */
|
||||
|
||||
/* VGA, cannot use section for this */
|
||||
VGA_PTR = 0xb8000;
|
||||
. = 0xb8000;
|
||||
|
|
@ -15,6 +11,7 @@ SECTIONS {
|
|||
/* ensure that the multiboot header is at the beginning */
|
||||
.multiboot :
|
||||
{
|
||||
/* KEEP otherwise it gets garbage collected by linker */
|
||||
KEEP(*(.multiboot))
|
||||
. = ALIGN(4K);
|
||||
}
|
||||
|
|
@ -37,12 +34,6 @@ SECTIONS {
|
|||
. = ALIGN(4K);
|
||||
}
|
||||
|
||||
.debug :
|
||||
{
|
||||
*(.debug_*)
|
||||
. = ALIGN(4K);
|
||||
}
|
||||
|
||||
.gdt :
|
||||
{
|
||||
*(.gdt)
|
||||
|
|
@ -67,15 +58,15 @@ SECTIONS {
|
|||
. = ALIGN(4K);
|
||||
}
|
||||
|
||||
.stab :
|
||||
{
|
||||
*(.stab)
|
||||
. = ALIGN(4K);
|
||||
}
|
||||
/* .stab : */
|
||||
/* { */
|
||||
/* KEEP(*(.stab)) */
|
||||
/* . = ALIGN(4K); */
|
||||
/* } */
|
||||
|
||||
.stabstr :
|
||||
{
|
||||
*(.stabstr)
|
||||
. = ALIGN(4K);
|
||||
}
|
||||
/* .stabstr : */
|
||||
/* { */
|
||||
/* KEEP(*(.stabstr)) */
|
||||
/* . = ALIGN(4K); */
|
||||
/* } */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,8 +46,6 @@ pub mod memory;
|
|||
pub mod arch;
|
||||
pub use arch::x86::consts::*;
|
||||
|
||||
// use core::mem;
|
||||
// use x86::structures::idt::*;
|
||||
/// kernel entry point. arch module is responsible for
|
||||
/// calling this once the core has loaded
|
||||
pub fn kmain() -> ! {
|
||||
|
|
@ -78,11 +76,11 @@ pub fn kmain() -> ! {
|
|||
// }
|
||||
let ip = self::init as *const () as u32;
|
||||
|
||||
unsafe {
|
||||
arch::x86::usermode(ip, sp, 0);
|
||||
}
|
||||
unreachable!()
|
||||
// loop {}
|
||||
// unsafe {
|
||||
// arch::x86::usermode(ip, sp, 0);
|
||||
// }
|
||||
// unreachable!()
|
||||
loop {}
|
||||
}
|
||||
|
||||
pub fn init() {
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
"_comment": "http://llvm.org/docs/LangRef.html#data-layout",
|
||||
"data-layout": "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128",
|
||||
|
||||
"llvm-target": "i686-unknown-none",
|
||||
"llvm-target": "i386-unknown-none",
|
||||
"linker-flavor": "gcc",
|
||||
"no-compiler-rt": true,
|
||||
"os": "bluesnow",
|
||||
"os": "none",
|
||||
"target-endian": "little",
|
||||
"target-pointer-width": "32",
|
||||
"target-c-int-width": "32",
|
||||
"features": "-mmx,-fxsr,-sse,-sse2,+soft-float",
|
||||
"eliminate-frame-pointer": false,
|
||||
"disable-redzone": true,
|
||||
"panic-strategy": "abort"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue