delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2013/07/21/22:15:15

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <do_not_have AT notemailnotq DOT cpm>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: HimemX patch (was Re: Rebuilding 2.04 from source)
Date: Sun, 21 Jul 2013 22:05:11 -0400
Organization: Aioe.org NNTP Server
Lines: 62
Message-ID: <ksi3s6$iv2$1@speranza.aioe.org>
References: <CAB9Rao_8KC6ddube7z-4AcaJJbt4BJG3i3gjwhq5y-23KEC5PQ AT mail DOT gmail DOT com> <713e6460-511d-4b27-a9a5-b07cc63fd02d AT googlegroups DOT com> <kqab83$jpa$1 AT speranza DOT aioe DOT org> <a5de500e-67da-4fc7-83d9-8842e04e8235 AT googlegroups DOT com> <kqe74c$mp7$1 AT speranza DOT aioe DOT org> <f54c7536-b2e9-46e0-b3a7-561d52bcad00 AT googlegroups DOT com> <kqh11l$eec$1 AT speranza DOT aioe DOT org> <fd61ee1c-d350-4961-aa09-a18014165080 AT googlegroups DOT com> <kqub5c$l2l$1 AT speranza DOT aioe DOT org> <2042449e-bcff-4329-a1e2-fd4e67e46446 AT googlegroups DOT com> <kr9ed3$e9i$1 AT speranza DOT aioe DOT org> <ec04489e-817a-435a-82f8-fcd6f5b0aa88 AT googlegroups DOT com>
NNTP-Posting-Host: CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org
X-Complaints-To: abuse AT aioe DOT org
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.2001
X-Notice: Filtered by postfilter v. 0.8.2
X-Newsreader: Microsoft Outlook Express 6.00.2800.2001
X-Priority: 3
X-MSMail-Priority: Normal
Bytes: 3578
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

<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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019