Autor Thema: No bootable device.  (Gelesen 8491 mal)

berlinermauer

  • Beiträge: 37
    • Profil anzeigen
Gespeichert
« am: 31. August 2009, 01:11 »
Hallo Leute,

ich habe nun das Problem dass Bochs bei meinem Kernel einfach "den Löffel abgibt" und meint, es wäre "kein Medium" eingelegt.

Ich hab mir mein OS via HexEdit angeschaut und es sind sehr viele Leerstellen (00) drin?!

bochsout.txt
00000000000i[     ] Bochs x86 Emulator 2.4.pre1
00000000000i[     ]   Build from CVS snapshot on April 18, 2009
00000000000i[     ] System configuration
00000000000i[     ]   processors: 1 (cores=1, HT threads=1)
00000000000i[     ]   A20 line support: yes
00000000000i[     ] CPU configuration
00000000000i[     ]   level: 6
00000000000i[     ]   SMP support: no
00000000000i[     ]   APIC support: yes
00000000000i[     ]   FPU support: yes
00000000000i[     ]   MMX support: yes
00000000000i[     ]   SSE support: 2
00000000000i[     ]   CLFLUSH support: yes
00000000000i[     ]   VME support: yes
00000000000i[     ]   3dnow! support: no
00000000000i[     ]   PAE support: yes
00000000000i[     ]   PGE support: yes
00000000000i[     ]   PSE support: yes
00000000000i[     ]   1G paging support: no
00000000000i[     ]   x86-64 support: yes
00000000000i[     ]   SEP support: yes
00000000000i[     ]   MWAIT support: no
00000000000i[     ]   XSAVE support: no
00000000000i[     ]   AES support: no
00000000000i[     ]   VMX support: no
00000000000i[     ] Optimization configuration
00000000000i[     ]   RepeatSpeedups support: yes
00000000000i[     ]   Trace cache support: yes
00000000000i[     ]   Fast function calls: yes
00000000000i[     ] Devices configuration
00000000000i[     ]   ACPI support: yes
00000000000i[     ]   NE2000 support: yes
00000000000i[     ]   PCI support: yes
00000000000i[     ]   SB16 support: yes
00000000000i[     ]   USB support: yes
00000000000i[     ]   VGA extension support: vbe cirrus
00000000000i[MEM0 ] allocated memory at 05E50020. after alignment, vector=05E51000
00000000000i[MEM0 ] 32,00MB
00000000000i[MEM0 ] rom at 0xfffe0000/131072 ('C:\Program Files (x86)\Bochs-2.4.pre1/BIOS-bochs-latest')
00000000000i[MEM0 ] rom at 0xc0000/40448 ('C:\Program Files (x86)\Bochs-2.4.pre1/VGABIOS-lgpl-latest')
00000000000i[CMOS ] Using local time for initial clock
00000000000i[CMOS ] Setting initial clock to: Mon Aug 31 01:10:42 2009 (time0=1251673842)
00000000000i[DMA  ] channel 4 used by cascade
00000000000i[DMA  ] channel 2 used by Floppy Drive
00000000000i[FDD  ] fd0: 'C:\Users\Marc\Coding\ASM\nasm-2.06rc2-win32\nasm-2.06rc2\tux\kernel.img' ro=0, h=2,t=80,spt=18
00000000000i[PCI  ] 440FX Host bridge present at device 0, function 0
00000000000i[PCI  ] PIIX3 PCI-to-ISA bridge present at device 1, function 0
00000000000i[MEM0 ] Register memory access handlers: 0x000a0000 - 0x000bffff
00000000000i[WGUI ] Desktop Window dimensions: 1400 x 1050
00000000000i[WGUI ] Number of Mouse Buttons = 5
00000000000i[WGUI ] IME disabled
00000000000i[MEM0 ] Register memory access handlers: 0xe0000000 - 0xe0ffffff
00000000000i[CLVGA] VBE Bochs Display Extension Enabled
00000000000i[CLVGA] interval=300000
00000000000i[     ] init_dev of 'unmapped' plugin device by virtual method
00000000000i[     ] init_dev of 'biosdev' plugin device by virtual method
00000000000i[     ] init_dev of 'speaker' plugin device by virtual method
00000000000i[     ] init_dev of 'extfpuirq' plugin device by virtual method
00000000000i[     ] init_dev of 'gameport' plugin device by virtual method
00000000000i[     ] init_dev of 'pci_ide' plugin device by virtual method
00000000000i[PCI  ] PIIX3 PCI IDE controller present at device 1, function 1
00000000000i[     ] init_dev of 'acpi' plugin device by virtual method
00000000000i[PCI  ] ACPI Controller present at device 1, function 3
00000000000i[     ] init_dev of 'ioapic' plugin device by virtual method
00000000000i[IOAP ] initializing I/O APIC
00000000000i[MEM0 ] Register memory access handlers: 0xfec00000 - 0xfec00fff
00000000000i[     ] init_dev of 'keyboard' plugin device by virtual method
00000000000i[KBD  ] will paste characters every 1000 keyboard ticks
00000000000i[     ] init_dev of 'harddrv' plugin device by virtual method
00000000000i[HD   ] Using boot sequence floppy, none, none
00000000000i[HD   ] Floppy boot signature check is enabled
00000000000i[     ] init_dev of 'serial' plugin device by virtual method
00000000000i[SER  ] com1 at 0x03f8 irq 4
00000000000i[     ] init_dev of 'parallel' plugin device by virtual method
00000000000i[PAR  ] parallel port 1 at 0x0378 irq 7
00000000000i[     ] register state of 'unmapped' plugin device by virtual method
00000000000i[     ] register state of 'biosdev' plugin device by virtual method
00000000000i[     ] register state of 'speaker' plugin device by virtual method
00000000000i[     ] register state of 'extfpuirq' plugin device by virtual method
00000000000i[     ] register state of 'gameport' plugin device by virtual method
00000000000i[     ] register state of 'pci_ide' plugin device by virtual method
00000000000i[     ] register state of 'acpi' plugin device by virtual method
00000000000i[     ] register state of 'ioapic' plugin device by virtual method
00000000000i[     ] register state of 'keyboard' plugin device by virtual method
00000000000i[     ] register state of 'harddrv' plugin device by virtual method
00000000000i[     ] register state of 'serial' plugin device by virtual method
00000000000i[     ] register state of 'parallel' plugin device by virtual method
00000000000i[SYS  ] bx_pc_system_c::Reset(HARDWARE) called
00000000000i[CPU0 ] cpu hardware reset
00000000000i[APIC0] local apic 0 initializing
00000000000i[APIC0] allocate APIC id=0 (MMIO enabled) to 0xfee00000
00000000000i[     ] reset of 'unmapped' plugin device by virtual method
00000000000i[     ] reset of 'biosdev' plugin device by virtual method
00000000000i[     ] reset of 'speaker' plugin device by virtual method
00000000000i[     ] reset of 'extfpuirq' plugin device by virtual method
00000000000i[     ] reset of 'gameport' plugin device by virtual method
00000000000i[     ] reset of 'pci_ide' plugin device by virtual method
00000000000i[     ] reset of 'acpi' plugin device by virtual method
00000000000i[     ] reset of 'ioapic' plugin device by virtual method
00000000000i[     ] reset of 'keyboard' plugin device by virtual method
00000000000i[     ] reset of 'harddrv' plugin device by virtual method
00000000000i[     ] reset of 'serial' plugin device by virtual method
00000000000i[     ] reset of 'parallel' plugin device by virtual method
00000003305i[BIOS ] $Revision: 1.230 $ $Date: 2009/04/10 16:36:34 $
00000320074i[KBD  ] reset-disable command received
00000449796i[VBIOS] VGABios $Id: vgabios.c,v 1.69 2009/04/07 18:18:20 vruppert Exp $

00000449867i[CLVGA] VBE known Display Interface b0c0
00000449899i[CLVGA] VBE known Display Interface b0c5
00000452824i[VBIOS] VBE Bios $Id: vbe.c,v 1.62 2009/01/25 15:46:25 vruppert Exp $
00000759385i[BIOS ] Starting rombios32
00000759882i[BIOS ] Shutdown flag 0
00000760563i[BIOS ] ram_size=0x02000000
00000761041i[BIOS ] ram_end=32MB
00000861037i[BIOS ] Found 1 cpu(s)
00000880072i[BIOS ] bios_table_addr: 0x000fb9a8 end=0x000fcc00
00000880180i[PCI  ] 440FX PMC write to PAM register 59 (TLB Flush)
00001207877i[PCI  ] 440FX PMC write to PAM register 59 (TLB Flush)
00001535805i[P2I  ] PCI IRQ routing: PIRQA# set to 0x0b
00001535826i[P2I  ] PCI IRQ routing: PIRQB# set to 0x09
00001535847i[P2I  ] PCI IRQ routing: PIRQC# set to 0x0b
00001535868i[P2I  ] PCI IRQ routing: PIRQD# set to 0x09
00001535878i[P2I  ] write: ELCR2 = 0x0a
00001536763i[BIOS ] PIIX3/PIIX4 init: elcr=00 0a
00001544721i[BIOS ] PCI: bus=0 devfn=0x00: vendor_id=0x8086 device_id=0x1237 class=0x0600
00001547297i[BIOS ] PCI: bus=0 devfn=0x08: vendor_id=0x8086 device_id=0x7000 class=0x0601
00001549712i[BIOS ] PCI: bus=0 devfn=0x09: vendor_id=0x8086 device_id=0x7010 class=0x0101
00001549952i[PIDE ] new BM-DMA address: 0xc000
00001550656i[BIOS ] region 4: 0x0000c000
00001552970i[BIOS ] PCI: bus=0 devfn=0x0b: vendor_id=0x8086 device_id=0x7113 class=0x0680
00001553222i[ACPI ] new irq line = 11
00001553236i[ACPI ] new irq line = 9
00001553266i[ACPI ] new PM base address: 0xb000
00001553280i[ACPI ] new SM base address: 0xb100
00001553308i[PCI  ] setting SMRAM control register to 0x4a
00001717402i[CPU0 ] Enter to System Management Mode
00001717412i[CPU0 ] RSM: Resuming from System Management Mode
00001881432i[PCI  ] setting SMRAM control register to 0x0a
00001890601i[BIOS ] MP table addr=0x000fba80 MPC table addr=0x000fb9b0 size=0xd0
00001892543i[BIOS ] SMBIOS table addr=0x000fba90
00001894927i[BIOS ] ACPI tables: RSDP addr=0x000fbba0 ACPI DATA addr=0x01ff0000 size=0x988
00001898166i[BIOS ] Firmware waking vector 0x1ff00cc
00001909279i[PCI  ] 440FX PMC write to PAM register 59 (TLB Flush)
00001910123i[BIOS ] bios_table_cur_addr: 0x000fbbc4
00003000000i[WGUI ] dimension update x=720 y=400 fontheight=16 fontwidth=9 bpp=8
00032361880p[BIOS ] >>PANIC<< No bootable device.
00032361880i[CPU0 ] CPU is in real mode (active)
00032361880i[CPU0 ] CS.d_b = 16 bit
00032361880i[CPU0 ] SS.d_b = 16 bit
00032361880i[CPU0 ] EFER   = 0x00000000
00032361880i[CPU0 ] | RAX=000000000000040a  RBX=000000000000cd04
00032361880i[CPU0 ] | RCX=0000000000000004  RDX=0000000000000402
00032361880i[CPU0 ] | RSP=000000000000ffa8  RBP=000000000000ffac
00032361880i[CPU0 ] | RSI=00000000000e3238  RDI=000000000000ffac
00032361880i[CPU0 ] |  R8=0000000000000000   R9=0000000000000000
00032361880i[CPU0 ] | R10=0000000000000000  R11=0000000000000000
00032361880i[CPU0 ] | R12=0000000000000000  R13=0000000000000000
00032361880i[CPU0 ] | R14=0000000000000000  R15=0000000000000000
00032361880i[CPU0 ] | IOPL=0 id vip vif ac vm rf nt of df if tf sf ZF af PF cf
00032361880i[CPU0 ] | SEG selector     base    limit G D
00032361880i[CPU0 ] | SEG sltr(index|ti|rpl)     base    limit G D
00032361880i[CPU0 ] |  CS:f000( 0004| 0|  0) 000f0000 0000ffff 0 0
00032361880i[CPU0 ] |  DS:0000( 0005| 0|  0) 00000000 0000ffff 0 0
00032361880i[CPU0 ] |  SS:0000( 0005| 0|  0) 00000000 0000ffff 0 0
00032361880i[CPU0 ] |  ES:07c0( 0005| 0|  0) 00007c00 0000ffff 0 0
00032361880i[CPU0 ] |  FS:0000( 0005| 0|  0) 00000000 0000ffff 0 0
00032361880i[CPU0 ] |  GS:0000( 0005| 0|  0) 00000000 0000ffff 0 0
00032361880i[CPU0 ] |  MSR_FS_BASE:0000000000000000
00032361880i[CPU0 ] |  MSR_GS_BASE:0000000000000000
00032361880i[CPU0 ] | RIP=0000000000000560 (000000000000055f)
00032361880i[CPU0 ] | CR0=0x60000010 CR2=0x0000000000000000
00032361880i[CPU0 ] | CR3=0x00000000 CR4=0x00000000
00032361880i[CPU0 ] 0x000000000000055f>> out dx, al : EE
00032361880i[CMOS ] Last time is 1251673845 (Mon Aug 31 01:10:45 2009)
00032361880i[     ] restoring default signal behavior
00032361880i[CTRL ] quit_sim called with exit code 1

Sagt euch das was?

btw: VmWare kommt mit einem Hardware Stack Fault (oder so)

SHyx0rmZ

  • Beiträge: 67
    • Profil anzeigen
Gespeichert
« Antwort #1 am: 31. August 2009, 10:42 »
Für mich hört sich das so an, als ob du keinen Bootloader auf deinem Image installiert hast (siehe auch: http://lowlevel.brainsware.org/wiki/index.php/GRUB-Image_erstellen). Falls du einen eigenen Bootloader verwendest, musst du darauf achten, die Bootsignatur ans Ende des ersten 512-Byte Sektors zu schreiben.

PS: Die vielen Nullen sind normal, solang du nicht als in ein binäres Rohformat compiled hast.
@X="krJhbuaesrytre c a cnR.ohut";while@X[/(..)(.)/];@X=@X[3..-1]+$1;print$2;end
"Scheiß auf Perl, wir haben Kekse" - Emperor Ruby

berlinermauer

  • Beiträge: 37
    • Profil anzeigen
Gespeichert
« Antwort #2 am: 31. August 2009, 11:04 »
Hey SHy,

ich verwende einen eigenen Bootloader, jedoch scheint dann bei ld was scheifgeloffen zu sein?


Meine link.txt:
INPUT(kernel32.obj ckernel.obj)
ENTRY(start)
SECTIONS
{
  .text  0x10200 : {
    code = .; _code = .; __code = .;
    *(.text)
    . = ALIGN(1);
  }
  .data  : {
    data = .; _data = .; __data = .;
    *(.data)
    . = ALIGN(1);
  }
  .bss  :
  {
    bss = .; _bss = .; __bss = .;
    *(.bss)
    . = ALIGN(1);
  }
  end = .; _end = .; __end = .;
}

Achja und der Befehl den kernel "zusammen zu kleben":
copy kernel16.bin+c32kernel.bin kernel.img
c32 = 32bitasm code + CKernel

ähm vielleixcht kannst du mir auch erklären wie ich rausfinde was was in der Hex Datei ist, es kommt zB 2mal This Program can not run in DOS Mode vor

kevin

  • Administrator
  • Beiträge: 2 767
    • Profil anzeigen
Gespeichert
« Antwort #3 am: 31. August 2009, 11:17 »
Der Kernel ist erstmal nicht von Interesse. Offenbar wird nicht einmal dein Bootloader geladen. Es wäre also eher von Interesse, ob der die Bootsignatur an der richtigen Stelle hat und wie du dein Diskettenimage erstellst.
Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end.

berlinermauer

  • Beiträge: 37
    • Profil anzeigen
Gespeichert
« Antwort #4 am: 31. August 2009, 11:41 »
Also ich habe das folgende am ende der ersten Datei (die aus dem protected mode rausspringt):

END:
times 512-($-$$) db 0 ;Da der Linker sich nicht mit ungeraden
dw 0AA55h ;Dateigrößen verträgt, wird diese Datei auf 512
;gepaddet.
;0xAA55 am Ende des Bootsektors schreiben

Obwohl, wisst ihr was, ich lade einfach alles hoch, die datei ccompile.bat ist mein "make file" naja so in der art.

Es ruft die Ports von Linux Befehlen auf die sich in C:\gcc\bin befindet (das müsst ihr ggf anpassen, aber es geht ja eigentlich nicht darum).

http://darkchaos.eu/tux.rar

MNemo

  • Beiträge: 547
    • Profil anzeigen
Gespeichert
« Antwort #5 am: 31. August 2009, 11:50 »
Bochs braucht AFAIK ein floppy Image das auch die angegebene Größe hat.
Also exakt 1.44MB.

END:
times 512-($-$$) db 0 ;Da der Linker sich nicht mit ungeraden
dw 0AA55h ;Dateigrößen verträgt, wird diese Datei auf 512
;gepaddet.
;0xAA55 am Ende des Bootsektors schreiben
das sollte eher
times 510-($-$$) db 0
dw 0AA55h
heißen. sonst landet die Signatur doch hinter dem ersten Sektor
« Letzte Änderung: 31. August 2009, 11:57 von MNemo »
„Wichtig ist nicht, besser zu sein als alle anderen. Wichtig ist, besser zu sein als du gestern warst!“

Jidder

  • Administrator
  • Beiträge: 1 625
    • Profil anzeigen
Gespeichert
« Antwort #6 am: 31. August 2009, 12:07 »
Das Image kann kleiner als 1,44 MB sein. Falls irgendein Code einen nicht-vorhandenen Teil ausliest, wird das im Log vermerkt.

Außerdem ist folgendes nicht korrekt:
mov eax, cs ;EAX auf derzeitiges Codesegment setzen
mov ds, ax ;DS auf Codesegment setzen
Wenn du in deinem Bootloader-Code org 0 oder gar kein org erwähnst, dann ist der einzig korrekte Wert für ds, 0x7c0. Wenn du org 0x7c00 an den Anfang des Codes setzt, ist der einzig korrekte Wert 0. Der Wert von cs kann entweder vernachlässigt werden (so lange du nur mit relativen Adressen hantierst, und nicht z.B. anfängst in der IVT rumzuschrauben) oder auf den selben Wert gesetzt werden.
« Letzte Änderung: 31. August 2009, 12:10 von PorkChicken »
Dieser Text wird unter jedem Beitrag angezeigt.

berlinermauer

  • Beiträge: 37
    • Profil anzeigen
Gespeichert
« Antwort #7 am: 31. August 2009, 12:09 »
gut danke, wenn ich es ändere bekomme ich keinen Fehler mehr aber bochs bootet dauernd neu, was ja eigentlich heißen sollte ich habe keine Endlosschleife, jedoch existiert diese, aber da auch kein Text ausgegeben wird hab ich das gefühl er bricht vorher ab?!

Edit: Das ändern von
;mov eax, cs ;EAX auf derzeitiges Codesegment setzen
;mov ds, ax ;DS auf Codesegment setzen
mov eax, 0x7C00
mov ds, ax

Hat jedoch immernoch nicht viel mehr gebracht, da er immer "Neu bootet" und (wahrscheinlich) nicht ein mal den text darstellt


Hier mal die bochsout.txt

00000000000i[     ] Bochs x86 Emulator 2.4.pre1
00000000000i[     ]   Build from CVS snapshot on April 18, 2009
00000000000i[     ] System configuration
00000000000i[     ]   processors: 1 (cores=1, HT threads=1)
00000000000i[     ]   A20 line support: yes
00000000000i[     ] CPU configuration
00000000000i[     ]   level: 6
00000000000i[     ]   SMP support: no
00000000000i[     ]   APIC support: yes
00000000000i[     ]   FPU support: yes
00000000000i[     ]   MMX support: yes
00000000000i[     ]   SSE support: 2
00000000000i[     ]   CLFLUSH support: yes
00000000000i[     ]   VME support: yes
00000000000i[     ]   3dnow! support: no
00000000000i[     ]   PAE support: yes
00000000000i[     ]   PGE support: yes
00000000000i[     ]   PSE support: yes
00000000000i[     ]   1G paging support: no
00000000000i[     ]   x86-64 support: yes
00000000000i[     ]   SEP support: yes
00000000000i[     ]   MWAIT support: no
00000000000i[     ]   XSAVE support: no
00000000000i[     ]   AES support: no
00000000000i[     ]   VMX support: no
00000000000i[     ] Optimization configuration
00000000000i[     ]   RepeatSpeedups support: yes
00000000000i[     ]   Trace cache support: yes
00000000000i[     ]   Fast function calls: yes
00000000000i[     ] Devices configuration
00000000000i[     ]   ACPI support: yes
00000000000i[     ]   NE2000 support: yes
00000000000i[     ]   PCI support: yes
00000000000i[     ]   SB16 support: yes
00000000000i[     ]   USB support: yes
00000000000i[     ]   VGA extension support: vbe cirrus
00000000000i[MEM0 ] allocated memory at 05F40020. after alignment, vector=05F41000
00000000000i[MEM0 ] 32,00MB
00000000000i[MEM0 ] rom at 0xfffe0000/131072 ('C:\Program Files (x86)\Bochs-2.4.pre1/BIOS-bochs-latest')
00000000000i[MEM0 ] rom at 0xc0000/40448 ('C:\Program Files (x86)\Bochs-2.4.pre1/VGABIOS-lgpl-latest')
00000000000i[CMOS ] Using local time for initial clock
00000000000i[CMOS ] Setting initial clock to: Mon Aug 31 12:35:31 2009 (time0=1251714931)
00000000000i[DMA  ] channel 4 used by cascade
00000000000i[DMA  ] channel 2 used by Floppy Drive
00000000000i[FDD  ] fd0: 'C:\Users\Marc\Coding\ASM\nasm-2.06rc2-win32\nasm-2.06rc2\tux\kernel.img' ro=0, h=2,t=80,spt=18
00000000000i[PCI  ] 440FX Host bridge present at device 0, function 0
00000000000i[PCI  ] PIIX3 PCI-to-ISA bridge present at device 1, function 0
00000000000i[MEM0 ] Register memory access handlers: 0x000a0000 - 0x000bffff
00000000000i[WGUI ] Desktop Window dimensions: 1400 x 1050
00000000000i[WGUI ] Number of Mouse Buttons = 5
00000000000i[WGUI ] IME disabled
00000000000i[MEM0 ] Register memory access handlers: 0xe0000000 - 0xe0ffffff
00000000000i[CLVGA] VBE Bochs Display Extension Enabled
00000000000i[CLVGA] interval=300000
00000000000i[     ] init_dev of 'unmapped' plugin device by virtual method
00000000000i[     ] init_dev of 'biosdev' plugin device by virtual method
00000000000i[     ] init_dev of 'speaker' plugin device by virtual method
00000000000i[     ] init_dev of 'extfpuirq' plugin device by virtual method
00000000000i[     ] init_dev of 'gameport' plugin device by virtual method
00000000000i[     ] init_dev of 'pci_ide' plugin device by virtual method
00000000000i[PCI  ] PIIX3 PCI IDE controller present at device 1, function 1
00000000000i[     ] init_dev of 'acpi' plugin device by virtual method
00000000000i[PCI  ] ACPI Controller present at device 1, function 3
00000000000i[     ] init_dev of 'ioapic' plugin device by virtual method
00000000000i[IOAP ] initializing I/O APIC
00000000000i[MEM0 ] Register memory access handlers: 0xfec00000 - 0xfec00fff
00000000000i[     ] init_dev of 'keyboard' plugin device by virtual method
00000000000i[KBD  ] will paste characters every 1000 keyboard ticks
00000000000i[     ] init_dev of 'harddrv' plugin device by virtual method
00000000000i[HD   ] Using boot sequence floppy, none, none
00000000000i[HD   ] Floppy boot signature check is enabled
00000000000i[     ] init_dev of 'serial' plugin device by virtual method
00000000000i[SER  ] com1 at 0x03f8 irq 4
00000000000i[     ] init_dev of 'parallel' plugin device by virtual method
00000000000i[PAR  ] parallel port 1 at 0x0378 irq 7
00000000000i[     ] register state of 'unmapped' plugin device by virtual method
00000000000i[     ] register state of 'biosdev' plugin device by virtual method
00000000000i[     ] register state of 'speaker' plugin device by virtual method
00000000000i[     ] register state of 'extfpuirq' plugin device by virtual method
00000000000i[     ] register state of 'gameport' plugin device by virtual method
00000000000i[     ] register state of 'pci_ide' plugin device by virtual method
00000000000i[     ] register state of 'acpi' plugin device by virtual method
00000000000i[     ] register state of 'ioapic' plugin device by virtual method
00000000000i[     ] register state of 'keyboard' plugin device by virtual method
00000000000i[     ] register state of 'harddrv' plugin device by virtual method
00000000000i[     ] register state of 'serial' plugin device by virtual method
00000000000i[     ] register state of 'parallel' plugin device by virtual method
00000000000i[SYS  ] bx_pc_system_c::Reset(HARDWARE) called
00000000000i[CPU0 ] cpu hardware reset
00000000000i[APIC0] local apic 0 initializing
00000000000i[APIC0] allocate APIC id=0 (MMIO enabled) to 0xfee00000
00000000000i[     ] reset of 'unmapped' plugin device by virtual method
00000000000i[     ] reset of 'biosdev' plugin device by virtual method
00000000000i[     ] reset of 'speaker' plugin device by virtual method
00000000000i[     ] reset of 'extfpuirq' plugin device by virtual method
00000000000i[     ] reset of 'gameport' plugin device by virtual method
00000000000i[     ] reset of 'pci_ide' plugin device by virtual method
00000000000i[     ] reset of 'acpi' plugin device by virtual method
00000000000i[     ] reset of 'ioapic' plugin device by virtual method
00000000000i[     ] reset of 'keyboard' plugin device by virtual method
00000000000i[     ] reset of 'harddrv' plugin device by virtual method
00000000000i[     ] reset of 'serial' plugin device by virtual method
00000000000i[     ] reset of 'parallel' plugin device by virtual method
00000003305i[BIOS ] $Revision: 1.230 $ $Date: 2009/04/10 16:36:34 $
00000320074i[KBD  ] reset-disable command received
00000449796i[VBIOS] VGABios $Id: vgabios.c,v 1.69 2009/04/07 18:18:20 vruppert Exp $

00000449867i[CLVGA] VBE known Display Interface b0c0
00000449899i[CLVGA] VBE known Display Interface b0c5
00000452824i[VBIOS] VBE Bios $Id: vbe.c,v 1.62 2009/01/25 15:46:25 vruppert Exp $
00000759385i[BIOS ] Starting rombios32
00000759882i[BIOS ] Shutdown flag 0
00000760563i[BIOS ] ram_size=0x02000000
00000761041i[BIOS ] ram_end=32MB
00000861037i[BIOS ] Found 1 cpu(s)
00000880072i[BIOS ] bios_table_addr: 0x000fb9a8 end=0x000fcc00
00000880180i[PCI  ] 440FX PMC write to PAM register 59 (TLB Flush)
00001207877i[PCI  ] 440FX PMC write to PAM register 59 (TLB Flush)
00001535805i[P2I  ] PCI IRQ routing: PIRQA# set to 0x0b
00001535826i[P2I  ] PCI IRQ routing: PIRQB# set to 0x09
00001535847i[P2I  ] PCI IRQ routing: PIRQC# set to 0x0b
00001535868i[P2I  ] PCI IRQ routing: PIRQD# set to 0x09
00001535878i[P2I  ] write: ELCR2 = 0x0a
00001536763i[BIOS ] PIIX3/PIIX4 init: elcr=00 0a
00001544721i[BIOS ] PCI: bus=0 devfn=0x00: vendor_id=0x8086 device_id=0x1237 class=0x0600
00001547297i[BIOS ] PCI: bus=0 devfn=0x08: vendor_id=0x8086 device_id=0x7000 class=0x0601
00001549712i[BIOS ] PCI: bus=0 devfn=0x09: vendor_id=0x8086 device_id=0x7010 class=0x0101
00001549952i[PIDE ] new BM-DMA address: 0xc000
00001550656i[BIOS ] region 4: 0x0000c000
00001552970i[BIOS ] PCI: bus=0 devfn=0x0b: vendor_id=0x8086 device_id=0x7113 class=0x0680
00001553222i[ACPI ] new irq line = 11
00001553236i[ACPI ] new irq line = 9
00001553266i[ACPI ] new PM base address: 0xb000
00001553280i[ACPI ] new SM base address: 0xb100
00001553308i[PCI  ] setting SMRAM control register to 0x4a
00001717402i[CPU0 ] Enter to System Management Mode
00001717412i[CPU0 ] RSM: Resuming from System Management Mode
00001881432i[PCI  ] setting SMRAM control register to 0x0a
00001890601i[BIOS ] MP table addr=0x000fba80 MPC table addr=0x000fb9b0 size=0xd0
00001892543i[BIOS ] SMBIOS table addr=0x000fba90
00001894927i[BIOS ] ACPI tables: RSDP addr=0x000fbba0 ACPI DATA addr=0x01ff0000 size=0x988
00001898166i[BIOS ] Firmware waking vector 0x1ff00cc
00001909279i[PCI  ] 440FX PMC write to PAM register 59 (TLB Flush)
00001910123i[BIOS ] bios_table_cur_addr: 0x000fbbc4
00003000000i[WGUI ] dimension update x=720 y=400 fontheight=16 fontwidth=9 bpp=8
00032315724i[BIOS ] Booting from 0000:7c00
00032315804e[CPU0 ] check_cs(0x0008): not a valid code segment !
00032315804e[CPU0 ] interrupt(): gate descriptor is not valid sys seg (vector=0x0d)
00032315804e[CPU0 ] interrupt(): gate descriptor is not valid sys seg (vector=0x08)
00032315804i[CPU0 ] CPU is in protected mode (active)
00032315804i[CPU0 ] CS.d_b = 16 bit
00032315804i[CPU0 ] SS.d_b = 16 bit
00032315804i[CPU0 ] EFER   = 0x00000000
00032315804i[CPU0 ] | RAX=0000000060000011  RBX=0000000000000000
00032315804i[CPU0 ] | RCX=0000000000000000  RDX=0000000000000000
00032315804i[CPU0 ] | RSP=000000000000ffd6  RBP=0000000000000000
00032315804i[CPU0 ] | RSI=00000000000e3238  RDI=000000000000ffac
00032315804i[CPU0 ] |  R8=0000000000000000   R9=0000000000000000
00032315804i[CPU0 ] | R10=0000000000000000  R11=0000000000000000
00032315804i[CPU0 ] | R12=0000000000000000  R13=0000000000000000
00032315804i[CPU0 ] | R14=0000000000000000  R15=0000000000000000
00032315804i[CPU0 ] | IOPL=0 id vip vif ac vm RF nt of df if tf sf zf af PF cf
00032315804i[CPU0 ] | SEG selector     base    limit G D
00032315804i[CPU0 ] | SEG sltr(index|ti|rpl)     base    limit G D
00032315804i[CPU0 ] |  CS:0000( 0004| 0|  0) 00000000 0000ffff 0 0
00032315804i[CPU0 ] |  DS:7c00( 0005| 0|  0) 0007c000 0000ffff 0 0
00032315804i[CPU0 ] |  SS:0000( 0005| 0|  0) 00000000 0000ffff 0 0
00032315804i[CPU0 ] |  ES:0000( 0005| 0|  0) 00000000 0000ffff 0 0
00032315804i[CPU0 ] |  FS:0000( 0005| 0|  0) 00000000 0000ffff 0 0
00032315804i[CPU0 ] |  GS:0000( 0005| 0|  0) 00000000 0000ffff 0 0
00032315804i[CPU0 ] |  MSR_FS_BASE:0000000000000000
00032315804i[CPU0 ] |  MSR_GS_BASE:0000000000000000
00032315804i[CPU0 ] | RIP=0000000000007c66 (0000000000007c66)
00032315804i[CPU0 ] | CR0=0x60000011 CR2=0x0000000000000000
00032315804i[CPU0 ] | CR3=0x00000000 CR4=0x00000000
00032315804i[CPU0 ] 0x0000000000007c66>> jmp far 0008:006b : EA6B000800
00032315804e[CPU0 ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting
00032315804i[SYS  ] bx_pc_system_c::Reset(HARDWARE) called
00032315804i[CPU0 ] cpu hardware reset
00032315804i[APIC0] local apic 0 initializing
00032315804i[APIC0] allocate APIC id=0 (MMIO enabled) to 0xfee00000
00032315804i[     ] reset of 'unmapped' plugin device by virtual method
00032315804i[     ] reset of 'biosdev' plugin device by virtual method
00032315804i[     ] reset of 'speaker' plugin device by virtual method
00032315804i[     ] reset of 'extfpuirq' plugin device by virtual method
00032315804i[     ] reset of 'gameport' plugin device by virtual method
00032315804i[     ] reset of 'pci_ide' plugin device by virtual method
00032315804i[     ] reset of 'acpi' plugin device by virtual method
00032315804i[     ] reset of 'ioapic' plugin device by virtual method
00032315804i[     ] reset of 'keyboard' plugin device by virtual method
00032315804i[     ] reset of 'harddrv' plugin device by virtual method
00032315804i[     ] reset of 'serial' plugin device by virtual method
00032315804i[     ] reset of 'parallel' plugin device by virtual method
00032319110i[BIOS ] $Revision: 1.230 $ $Date: 2009/04/10 16:36:34 $
00032635043i[KBD  ] reset-disable command received
« Letzte Änderung: 31. August 2009, 12:36 von berlinermauer »

Jidder

  • Administrator
  • Beiträge: 1 625
    • Profil anzeigen
Gespeichert
« Antwort #8 am: 31. August 2009, 12:48 »
Der Wert für ds lautet 0x7c0 nicht 0x7c00. Das Segmentregister cs wird außerdem an einer weiteren Stelle gelesen. Wenn du das korrigierst, behebt das allerdings noch nicht alle Probleme.

Ich halte nicht viel von dem Tutorial, wo du den Code her hast, weil jeder damit Probleme hat. Irgendwie macht das Tutorial ganz schlechte Arbeit den Real Mode zu erklären...

Wenn dir der Grund dafür, dass manchmal 0x7c0 und manchmal 0x7c00 benutzt wird, nicht klar ist, solltest du dich vielleicht mit dem Real Mode stärker auseinandersetzen, oder aber einfach GRUB als Bootloader nehmen, und direkt im Protected Mode starten.
« Letzte Änderung: 31. August 2009, 12:52 von PorkChicken »
Dieser Text wird unter jedem Beitrag angezeigt.

berlinermauer

  • Beiträge: 37
    • Profil anzeigen
Gespeichert
« Antwort #9 am: 31. August 2009, 12:54 »
also den wert den hab ich einmal mit einer 0 und einmal mit zweien genommen, zum testen, weil du in deinem Post 2 verschiedene geschrieben hast.

Im Nachhinen seh ich gerade das das org war, und das andere das ds.

Naja aufjedenfall, woran liegt dann das Problem mit dem dauer reboot bzw, gibt es noch ein anderes tutorial für einen c kernel?

Grub wollte ich nicht nutzen, ich dachte das sei zu viel aufwand und alles.

Edit: Das hier sieht auch gut aus, aber muss ich das mit mount dd und die ganzen unix befehlen, muss ich die auch benutzen?

http://lowlevel.brainsware.org/wiki/index.php/C-Kernel_mit_GRUB

Edit: es sieht ja gut aus, jedoch gefällt mir das Image erstellen nicht
« Letzte Änderung: 31. August 2009, 13:00 von berlinermauer »

Jidder

  • Administrator
  • Beiträge: 1 625
    • Profil anzeigen
Gespeichert
« Antwort #10 am: 31. August 2009, 13:03 »
Grub wollte ich nicht nutzen, ich dachte das sei zu viel aufwand und alles.
Verglichen mit dem Schreiben eines Bootloaders ist die Benutzung von GRUB ein Kinderspiel.

Edit: Das hier sieht auch gut aus, aber muss ich das mit mount dd und die ganzen unix befehlen, muss ich die auch benutzen?

http://lowlevel.brainsware.org/wiki/index.php/C-Kernel_mit_GRUB
Nein, unter Windows solltest du das ganze anders machen. Du solltest dir ein Floppy-Image besorgen, auf dem GRUB bereits installiert ist, z.B. das von tyndur. Da löschst du alles bis auf den boot/grub-Ordner. Dann kannst du da deinen Kernel drauf kopieren, und musst nur die Datei boot/grub/menu.lst anpassen.

Um das Image unter Windows einzubinden, kannst du zum Beispiel VFD nehmen. Dort musst du in vfdwin.exe zunächst im Tab "Driver" den Treiber installieren und starten, dann kannst du im Tab "Drive 0" einen Laufwerksbuchstaben auswählen und dann das Disketten-Image auswählen.

Wenn du das ganze in Bochs testen willst, solltest du den Laufwerksbuchstaben und nicht das Diskettenimage als Laufwerk angeben, weil Bochs das Image nicht öffnen kann, während es eingebunden ist. Das Laufwerk hingegen kann es öffnen.
« Letzte Änderung: 31. August 2009, 13:04 von PorkChicken »
Dieser Text wird unter jedem Beitrag angezeigt.

berlinermauer

  • Beiträge: 37
    • Profil anzeigen
Gespeichert
« Antwort #11 am: 31. August 2009, 13:05 »
Ok, ich werde mir dann das Image von tyndur klauen ;)

Das einbinden des Images mach ich eh via bochs (oder geht das nicht mehr und ich brauche dazu vfd?)

edit: hab mir jetzt die source runtergeladen, finde aber keinen solchen ordner?
« Letzte Änderung: 31. August 2009, 13:11 von berlinermauer »

Jidder

  • Administrator
  • Beiträge: 1 625
    • Profil anzeigen
Gespeichert
« Antwort #12 am: 31. August 2009, 13:17 »
Das einbinden des Images mach ich eh via bochs (oder geht das nicht mehr und ich brauche dazu vfd?)
Was ich damit meinte, ist dass wenn du folgende Zeile in Bochs hast, die nicht mehr geht:
floppya: 1_44="kernel.bin", status=insertedWeil der Treiber von VFD das Image bereits geöffnet hat. Stattdessen musst du folgendes angeben (wenn b: dein virtuelles Laufwerk ist)
floppya: 1_44="b:", status=inserted

edit: hab mir jetzt die source runtergeladen, finde aber keinen solchen ordner?
Nicht den Source, sondern das Floppy-Image.
Dieser Text wird unter jedem Beitrag angezeigt.

berlinermauer

  • Beiträge: 37
    • Profil anzeigen
Gespeichert
« Antwort #13 am: 31. August 2009, 13:42 »
Zitat
Zitat von: berlinermauer am Heute um 11:05:18
Das einbinden des Images mach ich eh via bochs (oder geht das nicht mehr und ich brauche dazu vfd?)
Was ich damit meinte, ist dass wenn du folgende Zeile in Bochs hast, die nicht mehr geht:
Code:
floppya: 1_44="kernel.bin", status=inserted
Weil der Treiber von VFD das Image bereits geöffnet hat. Stattdessen musst du folgendes angeben (wenn b: dein virtuelles Laufwerk ist)
Code:
floppya: 1_44="b:", status=inserted

Kann ich das also so interpretieren, dass ich VFD doch downloaden muss, und dann aber bochs sagen dass er das virtuelle laufwerk B: benutzen soll, oder brauch ich das nur wenn ich auch in mein Floppy schreiben will?

Und das Floppy Image hatte ich mir auch gedownloaded, aber dass ist ja schon compiled,oder?

Ach jetzt fällts mir ein, ich soll das VFD nutzen und dann kann ich auf die ordner von tyndur zugreifen?

Edit: VFD mag kein Vista 64bit er sagt es würde unter 95/98/ME nicht laufen
« Letzte Änderung: 31. August 2009, 13:55 von berlinermauer »

Jidder

  • Administrator
  • Beiträge: 1 625
    • Profil anzeigen
Gespeichert
« Antwort #14 am: 31. August 2009, 14:05 »
Hm... also auf der Seite ist eine 64-Bit-Version verlinkt (http://chitchat.at.infoseek.co.jp/vmware/vfd-x64-critical0.zip), die ich aber nicht ausprobieren kann.

Wenn dir das zu heikel ist, dann ist die einzige Alternative, die mir einfällt eine VM mit einem 32-Bit-Windows oder vielleicht gleich einem Linux zu installieren.
« Letzte Änderung: 31. August 2009, 14:12 von PorkChicken »
Dieser Text wird unter jedem Beitrag angezeigt.

berlinermauer

  • Beiträge: 37
    • Profil anzeigen
Gespeichert
« Antwort #15 am: 31. August 2009, 14:13 »
Jap, es ist der Treiber in der 64 bit edition, aber warum auch immer startet das programm nicht da es sagen will "windows 95 nicht "unterstützt".

Edit: habs jetzt geschafft (in nem anderen betriebssystem aber).

Soo nun habe ich festgestellt beim Mounten meines Images, dass da steht dass mein Image zu klein ist?!

Naja aufjedenfall werd ich mich mal bei dem mit GRUB versuchen.

Danke euch
« Letzte Änderung: 31. August 2009, 14:41 von berlinermauer »

berlinermauer

  • Beiträge: 37
    • Profil anzeigen
Gespeichert
« Antwort #16 am: 31. August 2009, 15:24 »
So nun habe ich aber wieder ein Problem, ich habe es auch mit meinem alten Compile Prozess verglichen aber ohne Erfolg?!

Linking using ld
D:\gcc\bin\ld: cannot perform PE operations on non PE output file 'kernel.bin'.

Hat da jemand eine Idee?

kevin

  • Administrator
  • Beiträge: 2 767
    • Profil anzeigen
Gespeichert
« Antwort #17 am: 31. August 2009, 15:40 »
Du benutzt einen Linker für Windows, d.h. er möchte nur mit PE-Dateien arbeiten. Deine kernel.bin ist aber anscheinend nicht PE - was es genau ist, müsstest du selbst wissen, vielleicht ELF. In diesem Fall brauchst du einen Cross-Linker, der mit ELF umgehen kann (und dazu vermutlich auch einen Crosscompiler, denn der ELF-Linker wird natürlich wiederum keine PE-Dateien lesen, die dein gcc ausspuckt). Du kannst dir dazu http://lowlevel.brainsware.org/wiki/index.php/Crosscompiler_für_Windows anschauen.

Die Alternative ist, alles in PE zu machen und den Multiboot-Header zu erweitern (um den sogenannten a.out-Kludge), also die Felder mit Einsprungspunkt usw. auch noch anzugeben.
Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end.

berlinermauer

  • Beiträge: 37
    • Profil anzeigen
Gespeichert
« Antwort #18 am: 01. September 2009, 00:41 »
Ok es geht jetzt, zumindest kommt der grub.

aber wenn ich mit kernel (irgendwas) versuche darauf zuzugreifen, funktionierts nicht? entweder cannot mount (oder sowas wie is not mounted) und mal dass er nicht auf sie zugreifen kann (nicht existiert)

DerHartmut

  • Beiträge: 236
    • Profil anzeigen
    • Mein Blog
Gespeichert
« Antwort #19 am: 01. September 2009, 00:43 »
Wie genau meinst du das? Meldet GRUB einen Fehler?
$_="krJhruaesrltre c a cnp,ohet";$_.=$1,print$2while s/(..)(.)//;
Nutze die Macht, nutze Perl ;-)

 

Einloggen