a global variable (yech, but i'm not out to save the world) which had
the same meaning and ended up being stealthily set in pretty much
the same place.
doing 'if (tag == ...) else if (tag == ...) else panic' rather than
by doing a switch. This makes life easier for people who need
the i386 bus_space_* functions to access spaces other than the normal
memory and I/O spaces, because it allows them to define an i386
bus_space_tag_t as a pointer to a function table, rather than just
an int. (They could define it as an int and cast it to a funtion
table pointer, but I think that's bad karma, and this change doesn't
hurt.)
mark all of 0 -> IOM_BEGIN as used, even though there are some regions
which are left for use by the BIOS (namely, the first 4k page and the
area after biosbasemem*1024 but before IOM_BEGIN). Drivers wishing to
manipulate these areas should map them specially, with _i386_memio_map()
rather than bus_space_map() or i386_memio_map().
disabled even if it's attached. If disabled, ENXIO on open.
(2) in the case where the code32 segment len overflows the I/O hole,
instead of giving up truncate it. (In other words, revert
change (2) in rev 1.21 which i suggested mistakenly.)
(3) map bios data space in the 0->640k range with _i386_memio_map()
rather than with bus_space_map(), so that no accounting checks
are done. The checks which are done to make sure that allocation
in this range is safe are sufficient.
(4) check the return value from _i386_memio_map(), and if it indicates
an error disconnect from the APM BIOS, print an error message,
and return without having marked the device 'enabled'.
functions (which only work on memory and i/o space) to i386_memio_*,
and make bus_space_* in bus.h be #defines which invoke them. This makes
life easier for people who need to define the all of the bus_space functions
so that they work on spaces other than memory and I/O space. Also, add
an _i386_memio_map function which is like i386_memio_map but doesn't do
the extent map checking or allocation. _i386_memio_map and i386_memio_*
are for use only by machine-dependent code.
code for this was in my private tree at one time, and I must have
forgotten to g/c the constant from trap.h). Reported by
enami tsugutomo <enami@but-b.or.jp>, PR #3845.
Re-arrange cpuattach() a bit so that more initialization is done before
dealing with the FPU. Some more work is still required to de-couple
FPU detection from the autoconfiguration attach code in SMP systems.
Correct handling for Trap #2 in SunOS executables,
now that we know it is supposed to flush the cache.
(Was thought to be "some obscure FPU operation".)