to jump to protected mode I use
Code: Select all
jmp 08:DWORD 80010h + Start32
[bits 32]
Start32:
mov eax,016 ;
mov es,eax
mov bh,'D'
mov [es:0b8000h],bh
jmp $
what it wrong
Code: Select all
jmp 08:DWORD 80010h + Start32
[bits 32]
Start32:
mov eax,016 ;
mov es,eax
mov bh,'D'
mov [es:0b8000h],bh
jmp $
Code: Select all
[org 0]
Code: Select all
GDTR:
GDTSize DW GDTEND-GDT
GDTBase DD GDT+080010h
GDT:
NULLSEL equ $-GDT
???DD 0h
???DD 0h
???
CODESEL equ $-GDT
???dw 0xFFFF
???dw 0
???db 0
???db 9ah
???db 0cfh
???db 0???
DATASEL equ $-GDT
???dw 0xFFFF
???dw 0
???db 0
???db 92h
???db 0cfh
???db 0
GDTEND:
I'm still in the boot loader.bubach wrote: you have set up the segments so that it can handle var/function addresses, right?
Code: Select all
00000000000i[ ] Bochs x86 Emulator 2.0.cvs
00000000000i[ ] Build from CVS, after 2.0
00000000000i[ ] System configuration
00000000000i[ ] processors: 1
00000000000i[ ] A20 line support: yes
00000000000i[ ] APIC support: no
00000000000i[ ] CPU configuration
00000000000i[ ] level: 5
00000000000i[ ] fpu support: yes
00000000000i[ ] paging support: yes, tlb enabled: yes
00000000000i[ ] mmx support: yes
00000000000i[ ] sse support: no
00000000000i[ ] v8086 mode support: yes
00000000000i[ ] PAE support: no
00000000000i[ ] PGE support: no
00000000000i[ ] PSE support: no
00000000000i[ ] x86-64 support: no
00000000000i[ ] SEP support: no
00000000000i[ ] Optimization configuration
00000000000i[ ] Guest2HostTLB support: yes
00000000000i[ ] RepeatSpeedups support: yes
00000000000i[ ] Icache support: yes
00000000000i[ ] Host Asm support: yes
00000000000i[MEM0 ] 0.00MB
00000000000i[MEM0 ] allocated memory at 00D50020. after alignment, vector=00D51000
00000000000i[MEM0 ] 32.00MB
00000000000i[MEM0 ] rom at 0xf0000/65536 ('../BIOS-bochs-latest')
00000000000i[MEM0 ] rom at 0xc0000/32769 ('../VGABIOS-elpin-2.40')
00000000000i[CMOS ] Setting initial clock to: Tue May 17 13:04:00 2005 (time0=1116299040)
00000000000i[DMA ] channel 4 used by cascade
00000000000i[DMA ] channel 2 used by Floppy Drive
00000000000i[FDD ] fd0: 'a:' ro=0, h=2,t=80,spt=18
00000000000i[VGA ] interval=30000
00000000000i[VGA ] VBE Bochs Display Extension Enabled
00000000000i[ ] init_mem of 'harddrv' plugin device by virtual method
00000000000i[ ] init_mem of 'keyboard' plugin device by virtual method
00000000000i[ ] init_mem of 'serial' plugin device by virtual method
00000000000i[ ] init_mem of 'parallel' plugin device by virtual method
00000000000i[ ] init_mem of 'extfpuirq' plugin device by virtual method
00000000000i[ ] init_dev of 'harddrv' plugin device by virtual method
00000000000i[HD ] Boot device will be 'a'
00000000000i[HD ] Floppy boot signature check is enabled
00000000000i[ ] init_dev of 'keyboard' plugin device by virtual method
00000000000i[KBD ] will paste characters every 1000 keyboard ticks
00000000000i[ ] init_dev of 'serial' plugin device by virtual method
00000000000i[SER ] com1 at 0x3f8/8 irq 4
00000000000i[ ] init_dev of 'parallel' plugin device by virtual method
00000000000i[PAR ] parallel port 1 at 0x378
00000000000i[ ] init_dev of 'extfpuirq' plugin device by virtual method
00000000000i[ ] reset of 'harddrv' plugin device by virtual method
00000000000i[ ] reset of 'keyboard' plugin device by virtual method
00000000000i[ ] reset of 'serial' plugin device by virtual method
00000000000i[ ] reset of 'parallel' plugin device by virtual method
00000000000i[ ] reset of 'extfpuirq' plugin device by virtual method
00000003980i[BIOS ] rombios.c,v 1.92 2003/03/08 22:59:17 cbothamy Exp $
00000330071i[KBD ] reset-disable command received
00000506038e[HD ] device set to 0 which does not exist
00000506331e[HD ] device set to 1 which does not exist
00000560214i[BIOS ] int13_diskette: unsupported AH=7F
00000564645i[BIOS ] int13_diskette: unsupported AH=7F
00000569135i[BIOS ] int13_diskette: unsupported AH=7F
00000573566i[BIOS ] int13_diskette: unsupported AH=7F
00000578000i[BIOS ] int13_diskette: unsupported AH=7F
00000582431i[BIOS ] int13_diskette: unsupported AH=7F
00000610049p[CPU ] >>PANIC<< exception(): 3rd (13) exception with no resolution
00000610049i[SYS ] Last time is 1116299041
00000610049i[CPU ] protected mode
00000610049i[CPU ] CS.d_b = 32 bit
00000610049i[CPU ] SS.d_b = 16 bit
00000610049i[CPU ] | EAX=00000010 EBX=00004416 ECX=000d0000 EDX=00000100
00000610049i[CPU ] | ESP=00000400 EBP=00000000 ESI=00000265 EDI=0000003c
00000610049i[CPU ] | IOPL=0 NV UP EI PL NZ NA PE NC
00000610049i[CPU ] | SEG selector base limit G D
00000610049i[CPU ] | SEG sltr(index|ti|rpl) base limit G D
00000610049i[CPU ] | DS:8001( 0000| 0| 0) 00080010 0000ffff 0 0
00000610049i[CPU ] | ES:0010( 0002| 0| 0) 00000000 000fffff 1 1
00000610049i[CPU ] | FS:0000( 0000| 0| 0) 00000000 0000ffff 0 0
00000610049i[CPU ] | GS:0000( 0000| 0| 0) 00000000 0000ffff 0 0
00000610049i[CPU ] | SS:0100( 0000| 0| 0) 00001000 0000ffff 0 0
00000610049i[CPU ] | CS:0008( 0001| 0| 0) 00000000 000fffff 1 1
00000610049i[CPU ] | EIP=00080080 (00080080)
00000610049i[CPU ] | CR0=0x60000011 CR1=0x00000000 CR2=0x00000000
00000610049i[CPU ] | CR3=0x00000000 CR4=0x00000000
00000610049i[ ] restoring default signal behavior
00000610049i[CTRL ] quit_sim called with exit code 1
B.E wrote: My second stage is at 8001:0000
to jump to protected mode I useit restarts just after i the jmp to prtected modeCode: Select all
??????jmp 08:DWORD 80010h + Start32 [bits 32] ??????Start32: ??????mov eax,016 ; ??????mov es,eax ??????mov bh,'D' ??????mov [es:0b8000h],bh?????? ??????jmp $
what it wrong