cvs commit: src/sys/i386/i386 locore.s machdep.c

Peter Wemm peter at wemm.org
Fri Oct 10 10:53:33 PDT 2003


Bruce Evans wrote:

[patch committed as-is so as to not cause any more conflicts for you]

> Unfinished related details:
> - Why do we make page 0 and the pages between biosmem and ISA_HOLE_START
>   writeable in 2 maps?

There are both regular bios32 calls (eg: apm) and bios calls in vm86 mode.

> - Which parts of vm86 and/or BIOSes need to write these pages?

apm (bios32) seems to want to write to the bios scratch space in page 0 on
many newer machines.  Older 386/486 laptop bioses dont seem to want to do
this.

> - I think the non-FreeBSD part of vm86 needs to access (write?) page 0
>   in the vm86 map, so we must be mapping it there somewhere else.  If
>   so, why do we handle it different to the other BIOS pages.

I believe this is for the vm86 monitor, which is code that we provide.  I
am not really 100% sure how all that stuff works.  I believe we provide a
fixed set of base mappings, and then explicitly map in additional pages
into the vm86map based on the descriptors passed into the vm86 setup code.
You can see the code to parse the descriptors over there.  I've been a bit
reluctant to learn how that stuff works because it wasn't relevant to amd64
and I was already overloaded with things to learn as it was.

> - Page 0 will need to be writeable in cpu_reset_real(), so the comment
>   which says that writeability is for vm86 will be incomplete.  However,
>   r/w mapping could easily be delayed until it is needed in all cases.

Yes, it also needs to be writeable for SMP startup because it twiddles the
bios warm start vector.

> - ISA_HOLE_START / PAGE_SIZE is sometimes hard-coded as 160.

There is a lot of ugly stuff there.  I fixed some (but not all by a long
shot) of this when working on the amd64 fork.  On one hand I was seriously
tempted to clean stuff up, but on the other hand, I didn't want to make
merging unnecessarily difficult.

> - other points mentioned in comments.

XXX need a 50 hour day. :-/

Cheers,
-Peter
--
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5



More information about the cvs-src mailing list