Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
maxmati
Posts: 4 Joined: Thu Aug 18, 2011 6:58 am
Post
by maxmati » Thu Aug 18, 2011 7:11 am
I've initialize Paging by this code:
Code: Select all
unsigned long *page_directory = (unsigned long *) 0x720000;
unsigned long *page_table = (unsigned long *) 0x721000; // the page table comes right after the page directory
void init_paging()
{
unsigned long address=0; // holds the physical address of where a page is
// map the first 4MB of memory
for (unsigned int i=0; i<2048; i++)
{
page_table[i] = address | 3; // attribute set to: supervisor level, read/write, present(011 in binary)
address = address + 4096; // 4096 = 4kb
}
#ifdef DEBUG
kprint(address,WHITE_TXT,20,0);
kprint(sizeof(unsigned long),WHITE_TXT,21,0);
#endif//DEBUG
// fill the first entry of the page directory
page_directory[0] = (unsigned long) page_table; // attribute set to: supervisor level, read/write, present(011 in binary)
page_directory[0] = (unsigned long) page_directory[0] | 3;
page_directory[1] = (unsigned long) page_table+1024; // attribute set to: supervisor level, read/write, present(011 in binary)
page_directory[1] = (unsigned long) page_directory[1] | 3;
#ifdef DEBUG
kprint((unsigned int) page_table,WHITE_TXT,22,0);
kprint((unsigned int) (page_table+1024) ,WHITE_TXT,23,0);
#endif//DEBUG
for(unsigned int i=1; i<1024; i++)
{
page_directory[i] = 0 | 2; // attribute set to: supervisor level, read/write, not present(010 in binary)
};
// write_cr3, read_cr3, write_cr0, and read_cr0 all come from the assembly functions
write_cr3((unsigned long) page_directory); // put that page directory address into CR3
write_cr0(read_cr0() | 0x80000000); // set the paging bit in CR0 to 1
}
and make any interrupt i've got crash.
I know that you need some more data but i don't know whats data so write if you need something else.
Combuster
Member
Posts: 9301 Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:
Post
by Combuster » Thu Aug 18, 2011 7:23 am
maxmati wrote: I know that you need some more data but i don't know whats data so write if you need something else.
Have you tried
looking at the standard responses ? You could have known what we were likely to ask next:
bochs and
logs .
On another note: 2048 is not the number of entries in a page table.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[
My OS ] [
VDisk/SFS ]
maxmati
Posts: 4 Joined: Thu Aug 18, 2011 6:58 am
Post
by maxmati » Thu Aug 18, 2011 8:12 am
ok so i now trying to get bochs on my slack but slackbuild only for old version.
Can i get logs from qemu?
Update:
There is bochs log:
Code: Select all
00000000000i[ ] Bochs x86 Emulator 2.4.6
00000000000i[ ] Build from CVS snapshot, on February 22, 2011
00000000000i[ ] Compiled at Feb 22 2011, 19:57:47
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[ ] 3dnow! support: no
00000000000i[ ] SEP support: yes
00000000000i[ ] SSE support: sse2
00000000000i[ ] XSAVE support: no
00000000000i[ ] AES support: no
00000000000i[ ] MOVBE support: no
00000000000i[ ] x86-64 support: yes
00000000000i[ ] 1G paging 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, enabled=yes
00000000000i[ ] SB16 support: yes
00000000000i[ ] USB support: yes
00000000000i[ ] VGA extension support: vbe cirrus
00000000000i[MEM0 ] allocated memory at 08860020. after alignment, vector=08861000
00000000000i[MEM0 ] 32,00MB
00000000000i[MEM0 ] mem block size = 0x00100000, blocks=32
00000000000i[MEM0 ] rom at 0xfffe0000/131072 ('C:\Program Files (x86)\Bochs-2.4.6/BIOS-bochs-latest')
00000000000i[MEM0 ] rom at 0xc0000/40448 ('C:\Program Files (x86)\Bochs-2.4.6/VGABIOS-lgpl-latest')
00000000000i[CMOS ] Using local time for initial clock
00000000000i[CMOS ] Setting initial clock to: Thu Aug 18 16:52:55 2011 (time0=1313711575)
00000000000i[DMA ] channel 4 used by cascade
00000000000i[DMA ] channel 2 used by Floppy Drive
00000000000i[FDD ] fd0: 'Y:\docs\svn\OS\bin\floppy.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: 0x00000000000a0000 - 0x00000000000bffff
00000000000i[WGUI ] Desktop Window dimensions: 1366 x 768
00000000000i[WGUI ] Number of Mouse Buttons = 5
00000000000i[WGUI ] IME disabled
00000000000i[MEM0 ] Register memory access handlers: 0x00000000e0000000 - 0x00000000e0ffffff
00000000000i[CLVGA] VBE Bochs Display Extension Enabled
00000000000i[CLVGA] interval=50000
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: 0x00000000fec00000 - 0x00000000fec00fff
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] allocate APIC id=0 (MMIO enabled) to 0x00000000fee00000
00000000000i[CPU0 ] CPUID[0x00000000]: 00000003 756e6547 6c65746e 49656e69
00000000000i[CPU0 ] CPUID[0x00000001]: 00000f23 00000800 00002000 07cbfbff
00000000000i[CPU0 ] CPUID[0x00000002]: 00410601 00000000 00000000 00000000
00000000000i[CPU0 ] CPUID[0x00000003]: 00000000 00000000 00000000 00000000
00000000000i[CPU0 ] CPUID[0x00000004]: 00000000 00000000 00000000 00000000
00000000000i[CPU0 ] CPUID[0x00000007]: 00000000 00000000 00000000 00000000
00000000000i[CPU0 ] CPUID[0x80000000]: 80000008 00000000 00000000 00000000
00000000000i[CPU0 ] CPUID[0x80000001]: 00000000 00000000 00000001 2a100800
00000000000i[CPU0 ] CPUID[0x80000002]: 20202020 20202020 20202020 6e492020
00000000000i[CPU0 ] CPUID[0x80000003]: 286c6574 50202952 69746e65 52286d75
00000000000i[CPU0 ] CPUID[0x80000004]: 20342029 20555043 20202020 00202020
00000000000i[CPU0 ] CPUID[0x80000006]: 00000000 42004200 02008140 00000000
00000000000i[CPU0 ] CPUID[0x80000007]: 00000000 00000000 00000000 00000000
00000000000i[CPU0 ] CPUID[0x80000008]: 00003028 00000000 00000000 00000000
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.257 $ $Date: 2011/01/26 09:52:02 $
00000200000i[WGUI ] dimension update x=720 y=400 fontheight=16 fontwidth=9 bpp=8
00000318042i[KBD ] reset-disable command received
00000444800i[VBIOS] VGABios $Id: vgabios.c,v 1.69 2009/04/07 18:18:20 vruppert Exp $
00000444871i[CLVGA] VBE known Display Interface b0c0
00000444903i[CLVGA] VBE known Display Interface b0c5
00000447828i[VBIOS] VBE Bios $Id: vbe.c,v 1.62 2009/01/25 15:46:25 vruppert Exp $
00000760517i[BIOS ] Starting rombios32
00000761014i[BIOS ] Shutdown flag 0
00000761695i[BIOS ] ram_size=0x02000000
00000762173i[BIOS ] ram_end=32MB
00000802745i[BIOS ] Found 1 cpu(s)
00000821732i[BIOS ] bios_table_addr: 0x000fb928 end=0x000fcc00
00000821835i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush)
00001149532i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush)
00001477460i[P2I ] PCI IRQ routing: PIRQA# set to 0x0b
00001477481i[P2I ] PCI IRQ routing: PIRQB# set to 0x09
00001477502i[P2I ] PCI IRQ routing: PIRQC# set to 0x0b
00001477523i[P2I ] PCI IRQ routing: PIRQD# set to 0x09
00001477533i[P2I ] write: ELCR2 = 0x0a
00001478418i[BIOS ] PIIX3/PIIX4 init: elcr=00 0a
00001486376i[BIOS ] PCI: bus=0 devfn=0x00: vendor_id=0x8086 device_id=0x1237 class=0x0600
00001488938i[BIOS ] PCI: bus=0 devfn=0x08: vendor_id=0x8086 device_id=0x7000 class=0x0601
00001491339i[BIOS ] PCI: bus=0 devfn=0x09: vendor_id=0x8086 device_id=0x7010 class=0x0101
00001491569i[PIDE ] new BM-DMA address: 0xc000
00001492273i[BIOS ] region 4: 0x0000c000
00001494583i[BIOS ] PCI: bus=0 devfn=0x0b: vendor_id=0x8086 device_id=0x7113 class=0x0680
00001494821i[ACPI ] new irq line = 11
00001494835i[ACPI ] new irq line = 9
00001494865i[ACPI ] new PM base address: 0xb000
00001494879i[ACPI ] new SM base address: 0xb100
00001494907i[PCI ] setting SMRAM control register to 0x4a
00001659001i[CPU0 ] Enter to System Management Mode
00001659011i[CPU0 ] RSM: Resuming from System Management Mode
00001823031i[PCI ] setting SMRAM control register to 0x0a
00001832202i[BIOS ] MP table addr=0x000fba00 MPC table addr=0x000fb930 size=0xd0
00001834261i[BIOS ] SMBIOS table addr=0x000fba10
00001836649i[BIOS ] ACPI tables: RSDP addr=0x000fbb30 ACPI DATA addr=0x01ff0000 size=0x988
00001839887i[BIOS ] Firmware waking vector 0x1ff00cc
00001851000i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush)
00001851844i[BIOS ] bios_table_cur_addr: 0x000fbb54
00014041548i[BIOS ] Booting from 0000:7c00
00023139361i[BIOS ] int13_harddisk: function 41, unmapped device for ELDL=80
00023144142i[BIOS ] int13_harddisk: function 08, unmapped device for ELDL=80
00023148793i[BIOS ] *** int 15h function AX=00c0, BX=0000 not yet supported!
00335370373i[CPU0 ] CPU is in protected mode (active)
00335370373i[CPU0 ] CS.d_b = 32 bit
00335370373i[CPU0 ] SS.d_b = 32 bit
00335370373i[CPU0 ] EFER = 0x00000000
00335370373i[CPU0 ] | RAX=0000000000000001 RBX=000000000002bd20
00335370373i[CPU0 ] | RCX=0000000000000007 RDX=00000000000b8485
00335370373i[CPU0 ] | RSP=00000000002fffc8 RBP=00000000002ffff0
00335370373i[CPU0 ] | RSI=000000000002be78 RDI=0000000000000080
00335370373i[CPU0 ] | R8=0000000000000000 R9=0000000000000000
00335370373i[CPU0 ] | R10=0000000000000000 R11=0000000000000000
00335370373i[CPU0 ] | R12=0000000000000000 R13=0000000000000000
00335370373i[CPU0 ] | R14=0000000000000000 R15=0000000000000000
00335370373i[CPU0 ] | IOPL=0 id vip vif ac vm RF nt of df IF tf sf zf af pf cf
00335370373i[CPU0 ] | SEG selector base limit G D
00335370373i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00335370373i[CPU0 ] | CS:0008( 0001| 0| 0) 00000000 ffffffff 1 1
00335370373i[CPU0 ] | DS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00335370373i[CPU0 ] | SS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00335370373i[CPU0 ] | ES:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00335370373i[CPU0 ] | FS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00335370373i[CPU0 ] | GS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00335370373i[CPU0 ] | MSR_FS_BASE:0000000000000000
00335370373i[CPU0 ] | MSR_GS_BASE:0000000000000000
00335370373i[CPU0 ] | RIP=00000000001001e6 (00000000001001e6)
00335370373i[CPU0 ] | CR0=0xe0000011 CR2=0x0000000000710041
00335370373i[CPU0 ] | CR3=0x00720000 CR4=0x00000000
00335370373i[CPU0 ] 0x00000000001001e6>> int 0x30 : CD30
00335370373e[CPU0 ] exception(): 3rd (14) exception with no resolution, shutdown status is 00h, resetting
00335370373i[SYS ] bx_pc_system_c::Reset(HARDWARE) called
00335370373i[CPU0 ] cpu hardware reset
00335370373i[APIC0] allocate APIC id=0 (MMIO enabled) to 0x00000000fee00000
00335370373i[CPU0 ] CPUID[0x00000000]: 00000003 756e6547 6c65746e 49656e69
00335370373i[CPU0 ] CPUID[0x00000001]: 00000f23 00000800 00002000 07cbfbff
00335370373i[CPU0 ] CPUID[0x00000002]: 00410601 00000000 00000000 00000000
00335370373i[CPU0 ] CPUID[0x00000003]: 00000000 00000000 00000000 00000000
00335370373i[CPU0 ] CPUID[0x00000004]: 00000000 00000000 00000000 00000000
00335370373i[CPU0 ] CPUID[0x00000007]: 00000000 00000000 00000000 00000000
00335370373i[CPU0 ] CPUID[0x80000000]: 80000008 00000000 00000000 00000000
00335370373i[CPU0 ] CPUID[0x80000001]: 00000000 00000000 00000001 2a100800
00335370373i[CPU0 ] CPUID[0x80000002]: 20202020 20202020 20202020 6e492020
00335370373i[CPU0 ] CPUID[0x80000003]: 286c6574 50202952 69746e65 52286d75
00335370373i[CPU0 ] CPUID[0x80000004]: 20342029 20555043 20202020 00202020
00335370373i[CPU0 ] CPUID[0x80000006]: 00000000 42004200 02008140 00000000
00335370373i[CPU0 ] CPUID[0x80000007]: 00000000 00000000 00000000 00000000
00335370373i[CPU0 ] CPUID[0x80000008]: 00003028 00000000 00000000 00000000
00335370373i[ ] reset of 'unmapped' plugin device by virtual method
00335370373i[ ] reset of 'biosdev' plugin device by virtual method
00335370373i[ ] reset of 'speaker' plugin device by virtual method
00335370373i[ ] reset of 'extfpuirq' plugin device by virtual method
00335370373i[ ] reset of 'gameport' plugin device by virtual method
00335370373i[ ] reset of 'pci_ide' plugin device by virtual method
00335370373i[ ] reset of 'acpi' plugin device by virtual method
00335370373i[ ] reset of 'ioapic' plugin device by virtual method
00335370373i[ ] reset of 'keyboard' plugin device by virtual method
00335370373i[ ] reset of 'harddrv' plugin device by virtual method
00335370373i[ ] reset of 'serial' plugin device by virtual method
00335370373i[ ] reset of 'parallel' plugin device by virtual method
00335373679i[BIOS ] $Revision: 1.257 $ $Date: 2011/01/26 09:52:02 $
00335688051i[KBD ] reset-disable command received
00335814809i[VBIOS]
VGABios $Id: vgabios.c,v 1.69 2009/04/07 18:18:20 vruppert Exp $
00335814880i[CLVGA] VBE known Display Interface b0c0
00335814912i[CLVGA] VBE known Display Interface b0c5
00335817837i[VBIOS] VBE Bios $Id: vbe.c,v 1.62 2009/01/25 15:46:25 vruppert Exp $
00336130526i[BIOS ] Starting rombios32
00336131023i[BIOS ] Shutdown flag 0
00336131704i[BIOS ] ram_size=0x02000000
00336132182i[BIOS ] ram_end=32MB
00336172754i[BIOS ] Found 1 cpu(s)
00336191741i[BIOS ] bios_table_addr: 0x000fb928 end=0x000fcc00
00336191844i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush)
00336519541i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush)
00336847469i[P2I ] PCI IRQ routing: PIRQA# set to 0x0b
00336847490i[P2I ] PCI IRQ routing: PIRQB# set to 0x09
00336847511i[P2I ] PCI IRQ routing: PIRQC# set to 0x0b
00336847532i[P2I ] PCI IRQ routing: PIRQD# set to 0x09
00336847542i[P2I ] write: ELCR2 = 0x0a
00336848427i[BIOS ] PIIX3/PIIX4 init: elcr=00 0a
00336856385i[BIOS ] PCI: bus=0 devfn=0x00: vendor_id=0x8086 device_id=0x1237 class=0x0600
00336858947i[BIOS ] PCI: bus=0 devfn=0x08: vendor_id=0x8086 device_id=0x7000 class=0x0601
00336861348i[BIOS ] PCI: bus=0 devfn=0x09: vendor_id=0x8086 device_id=0x7010 class=0x0101
00336862282i[BIOS ] region 4: 0x0000c000
00336864592i[BIOS ] PCI: bus=0 devfn=0x0b: vendor_id=0x8086 device_id=0x7113 class=0x0680
00336864830i[ACPI ] new irq line = 11
00336864844i[ACPI ] new irq line = 9
00336864916i[PCI ] setting SMRAM control register to 0x4a
00337029010i[CPU0 ] Enter to System Management Mode
00337029020i[CPU0 ] RSM: Resuming from System Management Mode
00337193040i[PCI ] setting SMRAM control register to 0x0a
00337202211i[BIOS ] MP table addr=0x000fba00 MPC table addr=0x000fb930 size=0xd0
00337204270i[BIOS ] SMBIOS table addr=0x000fba10
00337206658i[BIOS ] ACPI tables: RSDP addr=0x000fbb30 ACPI DATA addr=0x01ff0000 size=0x988
00337209896i[BIOS ] Firmware waking vector 0x1ff00cc
00337221009i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush)
00337221853i[BIOS ] bios_table_cur_addr: 0x000fbb54
00349411927i[BIOS ] Booting from 0000:7c00
00358509740i[BIOS ] int13_harddisk: function 41, unmapped device for ELDL=80
00358514521i[BIOS ] int13_harddisk: function 08, unmapped device for ELDL=80
00358519172i[BIOS ] *** int 15h function AX=00c0, BX=0000 not yet supported!
jnc100
Member
Posts: 775 Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:
Post
by jnc100 » Thu Aug 18, 2011 12:56 pm
Combuster wrote: On another note: 2048 is not the number of entries in a page table.
To be fair to him he does set up two page tables with that loop (depsite the comment above it to the contrary) then insert them correctly into the page directory further down. His error though is the loop 'for(unsigned int i=1; i<1024; i++)' which overwrites the 2nd PD entry he has set up (hence the page fault with CR2 = 0x710041) . Hint to OP: 'for(unsigned int i = 2...'. One thing to note when reading the bochs log is not to look at the last register dump as when it enconunters a triple fault it will output first the register dump at the site of the problem, then reset itself and then when you close it it will dump the registers again - so you need to look further up for the line 'exception(): 3rd (14) exception with no resolution, shutdown status is 00h, resetting'
Regards,
John.
maxmati
Posts: 4 Joined: Thu Aug 18, 2011 6:58 am
Post
by maxmati » Fri Aug 19, 2011 6:03 am
i've change it to i=2 but still crash now witch exception 13.
Intresting part of bochs log
Code: Select all
00014041548i[BIOS ] Booting from 0000:7c00
00023139361i[BIOS ] int13_harddisk: function 41, unmapped device for ELDL=80
00023144142i[BIOS ] int13_harddisk: function 08, unmapped device for ELDL=80
00023148793i[BIOS ] *** int 15h function AX=00c0, BX=0000 not yet supported!
00141683685e[CPU0 ] interrupt(): not accessible or not code segment cs=0x0008
00141683685e[CPU0 ] interrupt(): not accessible or not code segment cs=0x0008
00141683685e[CPU0 ] interrupt(): not accessible or not code segment cs=0x0008
00141683685i[CPU0 ] CPU is in protected mode (active)
00141683685i[CPU0 ] CS.d_b = 32 bit
00141683685i[CPU0 ] SS.d_b = 32 bit
00141683685i[CPU0 ] EFER = 0x00000000
00141683685i[CPU0 ] | RAX=0000000000000001 RBX=000000000002bd20
00141683685i[CPU0 ] | RCX=0000000000000007 RDX=00000000000b83df
00141683685i[CPU0 ] | RSP=00000000002fffc8 RBP=00000000002ffff0
00141683685i[CPU0 ] | RSI=000000000002be78 RDI=0000000000000080
00141683685i[CPU0 ] | R8=0000000000000000 R9=0000000000000000
00141683685i[CPU0 ] | R10=0000000000000000 R11=0000000000000000
00141683685i[CPU0 ] | R12=0000000000000000 R13=0000000000000000
00141683685i[CPU0 ] | R14=0000000000000000 R15=0000000000000000
00141683685i[CPU0 ] | IOPL=0 id vip vif ac vm RF nt of df IF tf sf zf af pf cf
00141683685i[CPU0 ] | SEG selector base limit G D
00141683685i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00141683685i[CPU0 ] | CS:0008( 0001| 0| 0) 00000000 ffffffff 1 1
00141683685i[CPU0 ] | DS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00141683685i[CPU0 ] | SS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00141683685i[CPU0 ] | ES:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00141683685i[CPU0 ] | FS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00141683685i[CPU0 ] | GS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00141683685i[CPU0 ] | MSR_FS_BASE:0000000000000000
00141683685i[CPU0 ] | MSR_GS_BASE:0000000000000000
00141683685i[CPU0 ] | RIP=00000000001001e6 (00000000001001e6)
00141683685i[CPU0 ] | CR0=0xe0000011 CR2=0x0000000000000000
00141683685i[CPU0 ] | CR3=0x00720000 CR4=0x00000000
00141683685i[CPU0 ] 0x00000000001001e6>> int 0x30 : CD30
00141683685e[CPU0 ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting
00141683685i[SYS ] bx_pc_system_c::Reset(HARDWARE) called
00141683685i[CPU0 ] cpu hardware reset
Combuster
Member
Posts: 9301 Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:
Post
by Combuster » Fri Aug 19, 2011 7:46 am
00141683685e[CPU0 ] interrupt(): not accessible or not code segment cs=0x0008
This begs for "Do you know how to read?" as the answer.
You might want to get/build a copy of Bochs with debugger, from within there you can diagnose what the CPU sees from your key structures and if they actually correspond to what you think they should.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[
My OS ] [
VDisk/SFS ]
maxmati
Posts: 4 Joined: Thu Aug 18, 2011 6:58 am
Post
by maxmati » Fri Aug 19, 2011 9:34 am
Thanks for help.
For others problem was because i running paging after GDT.