8c2f15c6fc
- 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. |
||
---|---|---|
.. | ||
alpha | ||
amiga | ||
arm32 | ||
atari | ||
hp300 | ||
i386 | ||
m68k | ||
mac68k | ||
mips | ||
mvme68k | ||
pc532 | ||
pica | ||
pmax | ||
sparc | ||
sun3 | ||
vax | ||
x68k |