Hi Eric, On Fri, Apr 04, 2008 at 03:20:40AM +0200, Eric Auer wrote: > > I've been working on a gpl implementation of the bios. > > I've been using freedos as a test case for the code. > > Hmmm I thought Bochs already uses a LGPL BIOS...? :-)
Yes - I am working on the bochs bios. Specifically, I have ported bochs bios to gcc. > > I'm having some issues with lbacache. I've seen lbacache call into > > the bios with less than 150 bytes of stack space. This seems too > > small to me. > > That is odd. I confused another report with the lbacache case. The disk accesses that are causing stack overflows for me are being called with 236 bytes of stack. Although this is notably larger, it still seems small to me. [...] > The FreeDOS kernel itself has 3 stacks of each 384 bytes size > for internal use while it is doing kernel work. I guess this > setting is similar to what you get in MS DOS and other DOSes, > and disk access is sort of typical kernel work. That is interesting. I don't think the int 13 handler is directly exceeding the stack - instead I think the int 13 handler uses part of the stack and turns on irqs. This turning on of irqs I think leads to the stack being overflowed. If FreeDOS has separate stacks for irqs, does this mean the above shouldn't be happening? >If you can > measure stack sizes at the moment when your BIOS is running: > > I would like to know how much stack you have with and how > much stack you have without lbacache :-). With lbacache on, TUNS on: 13-stack 000003a6:000000cd = 000003fa:000000ec That is "cs:ip = ss:sp" for "int 13". The stack represents the position prior to the six bytes for "int" overhead being added. With lbacache off: 13-stack 000003a6:000000cd = 000000d1:00000e68 With lbacache on, TUNS on, EMM386 off: 13-stack 00000751:00000561 = 00000751:00002be6 With lbacache on, TUNS off: 13-stack 000003a6:000000cd = 0000cd3c:00002be0 With lbacache on, TUNS off, EMM386 off: 13-stack 00000751:00000561 = 00000751:00002be6 With lbacache off, EMM386 off: 13-stack 0000ffff:0000a01c = 000000d1:00000e6e >For the lbacache > case, please also test with and without TUNS option and also > with and without using LOADHIGH (possibly together with TUNS > so you get 2*2 cases with and 1 case without lbacache). For > example if DOS gives you 100 bytes more free than lbacache, > it can be useful to make the lbacache stack 100 bytes bigger > by default. For your own experiments, see above about how you > can change the default size of the stack. I don't know much about DOS - I assume disabling LOADHIGH is equivalent to disabling EMM386. Let me know if I missed something. Thanks for your help. -Kevin ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel