haileys / rustboot

A tiny 32 bit kernel written in Rust
MIT License
1.53k stars 227 forks source link

Trying to execute code outside RAM or ROM at 0x000a0000 #6

Closed takeiteasy closed 11 years ago

takeiteasy commented 11 years ago

After building, it fails to run in QEMU on OSX

NASM version is 2.10.07 QEMU version is 1.4.1 rustc version is 0.6 (a394298 2013-05-30 10:37:46 -0700)

nasm -o loader.bin -f bin loader.asm
nasm -f elf32 -o runtime.o runtime.asm
rustc -O --target i386-intel-linux --lib -o main.o -c main.rs
warning: missing crate link meta `name`, using `main` as default
warning: missing crate link meta `vers`, using `0.0` as default
i386-elf-ld -o main.bin -T linker.ld runtime.o main.o
cat loader.bin main.bin > floppy.img
qemu-system-i386 -fda floppy.img
qemu: fatal: Trying to execute code outside RAM or ROM at 0x000a0000

EAX=00007bc7 EBX=00007e20 ECX=00000000 EDX=00000000
ESI=0000fe10 EDI=00000000 EBP=00007bf7 ESP=00007bab
EIP=0009ffb0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0010 00000000 000fffff 004f9300 DPL=0 DS   [-WA]
CS =0008 00000000 000fffff 004f9a00 DPL=0 CS32 [-R-]
SS =0010 00000000 000fffff 004f9300 DPL=0 DS   [-WA]
DS =0010 00000000 000fffff 004f9300 DPL=0 DS   [-WA]
FS =0010 00000000 000fffff 004f9300 DPL=0 DS   [-WA]
GS =0010 00000000 000fffff 004f9300 DPL=0 DS   [-WA]
LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT
TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy
GDT=     00007c91 00000019
IDT=     00000000 00000000
CR0=00000011 CR2=00000000 CR3=00000000 CR4=00000000
DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000 
DR6=ffff0ff0 DR7=00000400
CCS=00007bc7 CCD=00007c28 CCO=ADDB    
EFER=0000000000000000
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000
XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000
XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000
XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000
make: *** [run] Abort trap: 6
takeiteasy commented 11 years ago

Updated Rust again and it works now. Must have had an older version.