Beiträge anzeigen

Diese Sektion erlaubt es dir alle Beiträge dieses Mitglieds zu sehen. Beachte, dass du nur solche Beiträge sehen kannst, zu denen du auch Zugriffsrechte hast.


Themen - berlinermauer

Seiten: [1]
1
Lowlevel-Coding / No bootable device.
« 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)
2
Lowlevel-Coding / C Kernel, ld : Unrrecognized File format
« am: 04. May 2009, 08:24 »
hi, ich habe gcc und ld für windows (minGSW),

so nun kommt bei folgendem aufruf :

ld -T link.txt -o c32kernel.bin

File not recognized : file format not recognized.
Dabei ist das einfach ein obj file


OUTPUT_FORMAT("binary")
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 = .;
}
3
Lowlevel-Coding / Bochs spinnt?
« am: 03. May 2009, 00:20 »
Hallo Leute,
Wenn ich Bochs benutze, dann kommt da entweder dauernd
read_virtual_word_32(): segment limit violation

oder dass er das BootMedium nicht gefunden hat.

VMWare zeigt auch nur noch nen schwarzen bildschirm statt ein bisschen text.

Egal ob ich versuche den ProtMode reinzuhauen oder nicht...

http://uploaded.to/file/zrj4vl

Edit:

Mit dieser Config gehts :

http://lowlevel.brainsware.org/wiki/index.php/Eigener_Boot_Record

trotzdem seh ich nur nen Schwarzen bildschirm?!

lst :
     1                                  ; Compile with nasm -o boot.bin -f bin boot.asm
     2                                  org 0x7C00
     3                                 
     4                                  start:
     5 00000000 FA                      cli                  ; Keine Interrupts verwenden!
     6 00000001 B80090                  mov ax, 0x9000       ; Adresse des Stack speichern
     7 00000004 8ED0                    mov ss, ax           ; Stackadresse festlegen
     8 00000006 BC0000                  mov sp, 0            ; Stackpointer auf 0 setzen
     9 00000009 FB                      sti                  ; Jetzt lassen wir wieder Interrupts zu
    10                                 
    11 0000000A 8816[0101]              mov [bootdriv], dl
    12                                 
    13                                  ; Include Works
    14                                  %include "lang.asm"
    15                              <1> ; Compile with nasm -o boot.bin -f bin boot.asm
    16                              <1>
    17                              <1> ;BOOT
    18 0000000E 4C616465205475786D- <1> loadmsg db "Lade Tuxmaniac...",13,10,0 ;Loading up Tuxmaniac
    19 00000017 616E6961632E2E2E0D- <1>
    20 00000020 0A00                <1>
    21 00000022 507265737320616E79- <1> reboot_message db "Press any key to reboot",13,10,0  ; System_PAKT_REBOOT
    22 0000002B 206B657920746F2072- <1>
    23 00000034 65626F6F740D0A00    <1>
    24 0000003C 57656C636F6D652074- <1> welcome_message db "Welcome to Tuxmaniac...",13,10,0 ; WelcomeMessage
    25 00000045 6F205475786D616E69- <1>
    26 0000004E 61632E2E2E0D0A00    <1>
    27 00000056 4D616465206279204D- <1> copyright_message db "Made by Berlinermauer... Have Fun :)",13,10,0 ; Dont change or DELETE!!
    28 0000005F 617263205374726563- <1>
    29 00000068 6B667573732E2E2E20- <1>
    30 00000071 486176652046756E20- <1>
    31 0000007A 3A290D0A00          <1>
    32 0000007F 546869732053797374- <1> sys_goingdown_reboot db "This System is going down for a Reset NOW!",13,10,0 ; Warning/message that the system is about to shutdown
    33 00000088 656D20697320676F69- <1>
    34 00000091 6E6720646F776E2066- <1>
    35 0000009A 6F7220612052657365- <1>
    36 000000A3 74204E4F57210D0A00  <1>
    37                                  %include "prot.asm"
    38                              <1> protmode_on:
    39                              <1> ;;;  Ein kleines Beispiel, wie man in den 32-Bit Protected Mode wechselt
    40                              <1> ;;;  Bei Fragen kann man sich einfach an die ICQ-Nummer 338-417-614 wenden.
    41                              <1> 
    42                              <1> [BITS 16]
    43                              <1> ; org 0x0000 ; Addiert zu allen Offsetes die Start-Adresse dieses Codes
    44                              <1> 
    45 000000AC FA                  <1> cli ; Interrupts ausschalten
    46 000000AD 0F0116[CC00]        <1> lgdt [gdtr] ; GDT Pointer laden
    47                              <1> 
    48 000000B2 0F20C0              <1> mov eax,cr0 ; In PMode wechseln, indem das niedrigste
    49 000000B5 0C01                <1> or al,1 ; Steuerungsbit von cr0 geändert wird
    50 000000B7 0F22C0              <1> mov cr0,eax ; muss über Umweg über ein anderes Register gemacht werden
    51                              <1> 
    52 000000BA EA[BF00]0800        <1> jmp codesel:PMode ; FarJump zu einer 32-Bit PMode Funktion
    53                              <1> 
    54                              <1> [BITS 32]
    55                              <1> PMode:
    56 000000BF 66B81000            <1> mov ax,datasel ; Segmentregister laden
    57 000000C3 8ED8                <1> mov ds,ax
    58 000000C5 8ED0                <1> mov ss,ax
    59 000000C7 BC00000900          <1> mov esp,0x90000 ; Stack aufsetzen
    60                              <1> 
    61                              <1> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    62                              <1> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; == GDT == ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    63                              <1> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    64                              <1> 
    65                              <1> gdtr: ; Desktiptortabelle
    66 000000CC 1700                <1>    dw gdt_end-gdt-1 ; Limit
    67 000000CE [D2000000]          <1>    dd gdt ; Basisadresse
    68                              <1> gdt:
    69 000000D2 0000000000000000    <1>    dd 0,0 ; Null-Deskriptor
    70                              <1> codesel equ $-gdt
    71 000000DA FFFF                <1>    dw 0xFFFF ; Segmentgrösse 0..15
    72 000000DC 0000                <1>    dw 0x0000 ; Segmentadresse 0..15
    73 000000DE 00                  <1>    db 0x00 ; Segmentadresse 16..23
    74 000000DF 9A                  <1>    db 0x9A ; Zugriffsberechtigung und Typ
    75 000000E0 CF                  <1>    db 0xCF ; Zusatzinformationen und Segmentgrösse 16...19
    76 000000E1 00                  <1>    db 0x00 ; Segmentadresse 24..31
    77                              <1> datasel equ $-gdt
    78 000000E2 FFFF                <1>    dw 0xFFFF ; Segmentgrösse 0..15
    79 000000E4 0000                <1>    dw 0x0000 ; Segmentadresse 0..15
    80 000000E6 00                  <1>    db 0x00 ; Segmentadresse 16..23
    81 000000E7 92                  <1>    db 0x92 ; Zugriffsberechtigung und Typ
    82 000000E8 CF                  <1>    db 0xCF ; Zusatzinformationen und Segmentgrösse 16...19
    83 000000E9 00                  <1>    db 0x00 ; Segmentadresse 24..31
    84                              <1> gdt_end:
    85 000000EA C3                  <1> retn
    86                                 
    87 000000EB E825000000              call load
    88 000000F0 66B80010                mov ax, 0x1000       ; 0x1000 ist die Speicheradresse unserer Shell
    89 000000F4 8EC0                    mov es, ax
    90 000000F6 8ED8                    mov ds, ax
    91 000000F8 6650                    push ax
    92 000000FA 66B80000                mov ax, 0
    93 000000FE 6650                    push ax
    94 00000100 CB                      retf
    95                                 
    96 00000101 00                      bootdriv db 0         ; Das Bootlaufwerk 
    97                                  ;loadmsg db "Lade Tuxmaniac...",13,10,0
    98                                 
    99                                  ; Mit dieser Funktion geben wir einen String aus
   100                                  putstr:
   101 00000102 AC                      lodsb
   102 00000103 08C0                    or al,al
   103 00000105 740D                    jz short putstrd
   104 00000107 B40E                    mov ah,0x0E
   105 00000109 66BB0700                mov bx,0x0007
   106 0000010D CD10                    int 0x10
   107 0000010F E9EEFFFFFF              jmp putstr
   108                                  putstrd:
   109 00000114 C3                      retn
   110                                 
   111                                  ; Mit dieser Funktion laden wir unsere Shell vom Bootlaufwerk
   112                                  load:
   113 00000115 1E                      push ds
   114 00000116 66B80000                mov ax, 0
   115 0000011A 8A15[01010000]          mov dl, [bootdriv]
   116 00000120 CD13                    int 13h
   117 00000122 1F                      pop ds
   118 00000123 72F0                    jc load
   119                                 
   120                                  load1:
   121 00000125 66B80010                mov ax,0x1000
   122 00000129 8EC0                    mov es,ax
   123 0000012B 66BB0000                mov bx, 0
   124 0000012F B402                    mov ah, 2
   125 00000131 B005                    mov al, 5
   126 00000133 66B90200                mov cx, 2
   127 00000137 66BA0000                mov dx, 0
   128 0000013B CD13                    int 13h
   129 0000013D 72E6                    jc load1
   130 0000013F 66BE[0E00]              mov si,loadmsg
   131 00000143 E8BAFFFFFF              call putstr
   132 00000148 E95FFFFFFF              jmp protmode_on
   133                                 
   134                                  ;Bis zu 512 Byte füllen
   135 0000014D 00<rept>                times 512-($-$$)-2 db 0
   136 000001FE 55AA                    dw 0AA55h
   137                                 

oder kann es was hiermit : ROM: System BIOS must end at 0xfffff

zu tun haben?
Seiten: [1]

Einloggen