Mail Archives: djgpp/2013/07/21/22:15:15
<rugxulo AT gmail DOT com> wrote in message
news:ec04489e-817a-435a-82f8-fcd6f5b0aa88 AT googlegroups DOT com...
> On Saturday, July 6, 2013 10:55:26 AM UTC-5, Rod Pemberton wrote:
> > <rugxulo AT hates DOT spam> wrote in message
> >
> > news:2042449e-bcff-4329-a1e2-fd4e67e46446 AT googlegroups DOT com...
> >
> > > BTW, I also mailed a quick message to freedos-devel
> >
> > (Of course, the announcement probably need to be posted to
> > Freedos.org news to get anyone to try it... ;-)
>
> I'm skeptical about how many people read such things,
> but nevertheless, I've gone ahead and announced it
> there too. Hope it helps.
Thanks.
I did find a bug.
If you use the /MAX= parameter and set it to 4GB exactly (in KB),
then it won't clamp to 4GB correctly. I.e., this line, and AFAICT,
only this line, won't work:
/MAX=4194304
Changing 4194304 to 4194303 (or lower) does work. This is a 32-bit
overflow of eax by a shl.
I think the value just needs to be decremented by one for Himemx to
work correctly. But, this "new" machine (2009 parts just
assembled) is only mapping 2.8GB of my 4GB below the 4GB boundary
and pushing the remainder above 4GB! Unfortunately, the original
Himemx code *only* supports memory below the 4GB boundary. So,
this machine's third 001 E820 memory block above 4GB can't be
mapped by Himemx. The E820 map supports 64-bit addresses and
offsets. Himemx only support the lower 32-bits.
Since this machine isn't mapping a full 4GB below 4GB, I still
can't confirm if Himemx is clamped correctly to 4GB or not, just
that it's not clamping incorrectly for the /MAX=4194304 anymore.
So, maybe in the next week, I will adjust my fake BIOS E820 code
and attempt to see if I can confirm correct clamping by HIMEMX.
Sorry, I have yet to get the other old machine with AGP reassembled
to test it.
Anyway, for now, the one line code fix is indicated by FIX comment:
; clamp e820 memory to /MAX= memory limit, if set, and exit
mov eax,[_xms_max]
or eax,eax
je @@e820_loop ; no maximum XMS set
shl eax,10
dec eax ; FIX
cmp esi,eax
jbe @@e820_loop ; at or below maximum
Rod Pemberton
- Raw text -