www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000368

When Created: 06/18/2004 01:34:01
Against DJGPP version: 2.03
By whom: funkee10@hotmail.com
Abstract: DJGPP crashes under bochs
gcc.exe and rhide.exe (and probably others) crash under bochs. I have DJGPP
running under bochs with DOS 6.22

bochs crashes with the errors below

I've had issues with rhide even when not running under bochs, just a console window in windows 2k or XP will often generate GPF's randomly

Any ideas on why this would be happening?

----------------------------------------------------------------------------
00059530884i[CPU  ] #GP(0): SetCR4: Write of 0x00000010 not supported (allow
=0x0)
00059545717i[CPU  ] LOCK prefix unallowed (op1=0x53, attr=0x0, mod=0x0, nnn=
00059579359p[CPU  ] >>PANIC<< prefetch: RIP > CS.limit
00059579359i[SYS  ] Last time is 1087536663
# In bx_win32_gui_c::exit(void)!
00059579359i[CPU  ] real mode
00059579359i[CPU  ] CS.d_b = 16 bit
00059579359i[CPU  ] SS.d_b = 16 bit
00059579359i[CPU  ] | EAX=0000006e  EBX=00000023  ECX=00000007  EDX=00000000
00059579359i[CPU  ] | ESP=000008f8  EBP=00005e62  ESI=0000010d  EDI=00000002
00059579359i[CPU  ] | IOPL=0 OV UP DI NG NZ AC PO NC
00059579359i[CPU  ] | SEG selector     base    limit G D
00059579359i[CPU  ] | SEG sltr(index|ti|rpl)     base    limit G D
00059579359i[CPU  ] |  DS:011c( 0004| 0|  0) 000011c0 0000ffff 0 1
00059579359i[CPU  ] |  ES:011c( 0000| 0|  0) 000011c0 0000ffff 0 1
00059579359i[CPU  ] |  FS:1be0( 0000| 0|  0) 0001be00 0000ffff 0 1
00059579359i[CPU  ] |  GS:1be0( 0000| 0|  0) 0001be00 0000ffff 0 1
00059579359i[CPU  ] |  SS:011c( 0004| 0|  0) 000011c0 0000ffff 0 0
00059579359i[CPU  ] |  CS:5e90( 0003| 0|  0) 0005e900 0000ffff 0 0
00059579359i[CPU  ] | EIP=00010700 (00010700)
00059579359i[CPU  ] | CR0=0x00000010 CR1=0x00000000 CR2=0x00000000
00059579359i[CPU  ] | CR3=0x00000000 CR4=0x00000000
00059579359i[     ] restoring default signal behavior
========================================================================
Bochs is exiting with the following message:
[CPU  ] prefetch: RIP > CS.limit
========================================================================
00059579359i[CTRL ] quit_sim called with exit code 1

------------------------------------------------------------------------

or THIS error

00030000531i[CPU  ] protected mode
00030000531i[CPU  ] CS.d_b = 16 bit
00030000531i[CPU  ] SS.d_b = 32 bit
00030000531i[CPU  ] | EAX=0000000d  EBX=0000249a  ECX=00000087  EDX=00000000
00030000531i[CPU  ] | ESP=00003c86  EBP=00000000  ESI=4343475c  EDI=00000005
00030000531i[CPU  ] | IOPL=0 NV UP DI PL NZ NA PO NC
00030000531i[CPU  ] | SEG selector     base    limit G D
00030000531i[CPU  ] | SEG sltr(index|ti|rpl)     base    limit G D
00030000531i[CPU  ] |  DS:0020( 0004| 0|  0) 0001e2b0 0000ffff 0 1
00030000531i[CPU  ] |  ES:0000( 0000| 0|  0) 0001e2b0 0000ffff 0 1
00030000531i[CPU  ] |  FS:0000( 0000| 0|  0) 0001e2b0 0000ffff 0 1
00030000531i[CPU  ] |  GS:0000( 0000| 0|  0) 0001e2b0 0000ffff 0 1
00030000531i[CPU  ] |  SS:0020( 0004| 0|  0) 0001e2b0 0000ffff 0 1
00030000531i[CPU  ] |  CS:0018( 0003| 0|  0) 00019a30 0000ffff 0 0
00030000531i[CPU  ] | EIP=00003c58 (00003c53)
00030000531i[CPU  ] | CR0=0x80000019 CR1=0x00000000 CR2=0x00000000
00030000531i[CPU  ] | CR3=0x0002f000 CR4=0x00000000
00030000531i[     ] restoring default signal behavior
========================================================================
Bochs is exiting with the following message:
[CPU  ] jump_protected: JUMP to busy 386 TSS unsupported.
========================================================================

Solution added: 06/22/2004 21:19:46
By whom: funkee10@hotmail.com
Found the solution for this one, the bug is with cwsdpmi
(Thanks to Chris Giese from alt.os.development for the info)

From http://clio.rice.edu/djgpp/r5bug03.txt

Bug Report

CWSDPMI tests wrong feature bit when turning on PSE bit in CR4

Summary:

On CPUs which support TSCs but not 4Mb pages (currently this is only
known to happen in BOCHS emulator) CWSDPMI will set the PSE bit in 
CR4, even though it is not supported.  This can generate many warnings
in the emulator, but might cause a crash in a real CPU if one exists.

Analysis:

CWSDPMI is testing the wrong bit, it should choose bit 3 in MSWITCH,
not bit 4 (0x10) in the comparison.  4Mb pages are not used in this 
release.

By updating cwsdpmi, it has fixed the problem. I used this link

http://clio.rice.edu/djgpp/r5updtst.zip



  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010