Page 2 of 2

Posted: Sat Dec 29, 2007 5:17 pm
by Combuster
I tried some tests on some more ancient hardware. I managed to crash the system in three different ways:

I tried cat-ing the vbe driver. Consequently trying to kill it resulted in a triple fault when I decided to try the ESC button

The VBE driver found the V2100 card. The info seemed to match what I recall of the card. running vbetest resulted in a black screen without exit.

after some stresstesting I managed to get a panic by repeatedly entering "x" in the command line and watch the pids increase. around 150 it submitted to my evil will and gave the following dump (copied by hand -- prone to errors):

Code: Select all

Nested mutex_lock of 0xC0116480 detected

_panic+403 (addr: c010dfa3, frame: e0127617)
mutex_lock+122 (addr: c010ddc2, frame: e0127647)
tty_new_input+23 (addr: c010f8bf, frame: e0127667)
intr_handle+41 (addr: c01030f1, frame: e0127687)
isr_common+63 (addr: c0101d03, frame: e01276a7)
console_putch+158 (addr: c0102282, frame: e0127703)
tty_write+395 (addr: c010fb03, frame: e0127723)
vfs_write+365 (addr: c010898c, frame: e01277a3)
sys_write+86 (addr: c0108a6e, frame: e01277e3)
_sc_handle_regs+24 (addr: c0101d98, frame: e0127803)
syscall_handler+160 (addr: c0103cb4, frame: e012781f)
intr_handler+41 (addr: c01030f1, frame: e012784f)
isr_common+63 (addr: c0101d03, frame: e012786f)
btw, is the stack unaligned? (performance hit and wasting bits of memory)

Posted: Sun Dec 30, 2007 1:39 am
by xyzzy
The ESC key is configured to reboot in the i8042 driver atm, I set that because one of my test boxes doesn't have a reset button and it makes my life easier.

VBE driver should show a blue screen, so there's another card it doesn't work on! I'll look into it :roll:

Oh, and that panic is already fixed in the source repo.

EDIT: Yes, the stack is unaligned. It's on my TODO list to fix that already ;)

Thanks!
Alex

Posted: Sun Dec 30, 2007 4:06 am
by Combuster
AlexExtreme wrote:The ESC key is configured to reboot in the i8042 driver atm, I set that because one of my test boxes doesn't have a reset button and it makes my life easier.
It doesn't work everywhere though... (most notably, not in graphics mode)

Posted: Sun Dec 30, 2007 5:22 am
by xyzzy
So if you're in graphics mode (with vbetest) and you press ESC, nothing happens? That means the kernel has died :roll: Where else does it not work?

Posted: Mon Dec 31, 2007 6:26 am
by lukem95
The VBE driver works fine in virtual pc, just to let you know.

i havnt found any real bugs as of yet, just a few userbility issues, it takes a while to get used to :)

Posted: Tue Jan 01, 2008 6:35 am
by xyzzy
Thanks a lot to everyone who tested and reported problems, I've just released 0.2.0. I've disabled the VBE driver in the binary builds as I cannot figure out what is wrong with it for now.

So, thanks again to people who tested, and happy new year!

Posted: Thu Jan 03, 2008 4:46 am
by devel
Hi,
I've got one stupid question regarding your code especially these two hacks:

Code: Select all

/* Hack to make GAS emit full-length jumps and pushes (thanks froggey
 * for this) */
.macro jmp32 addr
        .byte   0xE9
        .long   (\addr-.-4)
.endm
.macro push32 byte
        .byte   0x68
        .long   \byte
.endm
What's wrong with push or jmp instruction in GAS?

Regards,
devel.

Posted: Thu Jan 03, 2008 9:42 am
by xyzzy
It's to make sure each ISR block is 12 bytes long - the code that builds the IDT adds ISR handlers starting from isr_base, and assumes they are 12 bytes apart. Just makes things a little easier.