on indirect-config busses a (permanent) softc that they could share
between 'match' and 'attach' routines:
Define __BROKEN_INDIRECT_CONFIG so that old autoconfiguration
interfaces are used, until drivers are converted to use the new
interfaces (actually, converted back to use the _older_ interfaces)
which prohibit indirect configuration devices from receiving a softc
in their match routine that they can share with their attach routine.
- New variables: biosextmem, biosbasemem, nkpde
- Above can be set by using the options BIOSEXTMEM, BIOSBASEMEM,
and NKPDE respectively (EXTMEM_SIZE is now called BIOSEXTMEM).
When preset this way, they won't be filled in / calculated.
- Readable by sysctl using machdep.nkpde, machdep.biosbasemem
and machdep.biosextmem.
- nkpde is calculated as:
min(NKPDE_MAX, NKPDE_BASE + (biosextmem >> 10) * NKPDE_SCALE)
Where NKPDE_MAX is 31, NKPDE_BASE is 4, NKPDE_SCALE = 1.
- The boundary argument to bus_space_alloc() should be a bus_size_t, not
a bus_addr_t.
- The buffer arguments in the "multiple write" methods should have
const qualifiers.
And one from me:
- Make bus_space_barrier() eat up the arguments passed to it so that
the compiler doesn't needlessly whine.
- No more distinction between i/o-mapped and memory-mapped
devices. It's all "bus space" now, and space tags
differentiate the space with finer grain than the
bus chipset tag.
- Add memory barrier methods.
- Implement space alloc/free methods.
- Implement region read/write methods (like memcpy to/from
bus space).
This interface provides a better abstraction for dealing with
machine-independent chipset drivers.
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).
Map kernel stacks only at unique addresses.
Use one TSS per process.
Add sysarch calls for modifying IOPL and the I/O permission bitmap.
Add a compacting GDT entry allocator, for TSS and LDT selectors.
Enable modifying %fs and %gs with PT_SETREGS.
Sanitize various bits of code.
creating segment descriptors. Add the duplicate system call gate used by
BSD/OS 2.0 executables. Prototype setsegment() and setgate(), and fix a bogon
caught by this.