macros to use to remove #ifdefs from the machine ID case check.
Eventually, these headers will contain other information, e.g.
machine-dependent relocation information, etc.
/*
* void bioscall(int function, struct apmregs *regs):
* call the BIOS interrupt "function" from real mode with
* registers as specified in "regs"
* (for the flags, though, only these flags are passed to the BIOS;
* the remainder come from the flags register at the time of the call:
* (PSL_C|PSL_PF|PSL_AF|PSL_Z|PSL_N|PSL_D|PSL_V)
*
* Fills in *regs with registers as returned by BIOS.
*/
Thanks to Charles Hannum for complaining and inspiring me to hack this
together.
- A fixed extent map (statically allocated descriptor storage) is
created in init386(), just before the call to consinit(). The
fixed descriptor storage has enough room for 8 region entires,
which is plenty for early initialization, but doesn't chew up
that much memory.
This extent map (ioport_ex) manages the i386 i/o port
space (0x0 - 0xffff).
- Just before the call to configure() in cpu_startup(), a
flag is set which notifies the bus_io functions that it is
safe to use malloc() to allocate descriptor storage, in the
event that more than 8 regions are needed.
- bus_io_map() attempts to allocate the specified region from
ioport_ex. If the allocation succeeds, the io handle is
filled in. If the allocation fails, it is implied that
something else is already using that io space, and an
error condition is returned.
- bus_io_unmap() frees a region previously allocated from
ioport_ex in bus_io_map(). If the free fails, a warning
is printed on the conole.
These changes implement "port accounting". This is required for
proper autoconfiguration on the i386 port, and makes dealing with,
among other things, PCMCIA io mappings _much_ easier.
Changing types from unsigned {long,short} to u_int{32,16}_t causes problems
in a lot of userlevel code because those types aren't defined when machine/
endian.h is included. And IMO including sys/types.h in machine/endian.h
is clearly wrong.
XPG4.2 defines new types in_addr_t and in_port_t for the {h,n}to{n,h}{l,s}
functions. But we don't have time to figure out the implementation issues
given the current release schedule.
Don't mess with the flags when entering a software interrupt.
Use IF, not VIF.
NOTE: These changes break dosemu, but are required for proper emulation.
in VM86 mode.
Allow changing of *all* PSL bits in VM86 mode; some applications don't work
right otherwise, and all the nasty bits are virtualized anyway.
Make sure PSL_VIF, PSL_VIP, and PSL_VM don't show up in the user's view of
the PSL.
partition, add the MBR partitions to the default (faked-up)
disklabel used by NetBSD if it can't find a real one. If the
type of the MBR partition is one of the common DOS ones, mark the
partition as having an MSDOS filesystem.
machine-independent code for more sane access to bus resources.
New functions will be added to this set, in the future, as appropriate,
but this is a good starting set. Defines:
bus_{io,mem}_{map,unmap}
bus_{io,mem}_{read,write}_{1,2,4,8}
functions, and several types to go with them.
execpt without quotes. meant to be __CONCAT()ted for easy #includes
of machine-dependent headers for MI code (e.g. for the MI ISA/EISA/PCI/TC
bus code).