Remove the cache flush routines that have been moved to cpu.c
Make sure we clear out the unused PA bits in the TTE which causes breakage
on some MMU models.
sizes and line sizes. This is needed for cache flusing, clearing
memory, and several other operations. This information is accessible
from userland through a new CPU_CACHEINFO sysctl.
Audio-related stuff is left almost intact.
* support audiocs at ebus playback and capture
tested on krups and u5 (thanks, martin)
* make first attempt at supporting audiocs at sbus capture
* nb: full-duplex is not tested
* while here, fix CSAUDIO_MONITOR_MUTE to be of CSAUDIO_MONITOR_CLASS
i.e. outputs.monitor.mute -> monitor.monitor.mute
Ok by pk, eeh.
the others. It is perfectly reasonable to have multiple adb keyboards,
and a number of multi-button mice have a fake kbd for the second and
third mouse buttons. Now my machine doesn't panic during boot when it
is trying to add a second ws console kbd.
* Use BUS_ADDR() where appropriate to encode I/O space and physical
address offset into a `bus_addr_t' value.
* Drop obio_bus_map() since it's now completely equivalent to bus_space_map()
* Use bus_space_map2() to map device space at a fixed virtual address.
* Remove the virtual address argument from sbus_sbus_addr()
but not used resulting in a compiler error. By splitting the declaration
and the initialisation this is solved.
Better would be to not even declare the flag when ARMFPE isnt enabled but
that would just add to the #ifdef jungle.
- Reinstall the "dynamic page table length" that was removed some
years ago.
- Limit the user page table submap to max 5% of available memory.
- Free the page table space when a process is swapped out.
- If the UPT submap runs out of space, throw away pmap mappings
using the same algorithm as for swapping processes.
As a result of this, 4MB machines are useable again and it's even possible
to compile a kernel for 2MB machines (but it will be slow... :-)
Still to do:
- Multiprocessor fixes.
- More profiling.
tell nothing in the acorn32 port was using this version of
MEMORY_DISK_SIZE but I've left the code here incase the portmaster
wants it.
* rename MINIROOTSIZE to MEMORY_DISK_SIZE, so that all md(4) options
are consistently named
* fold opt_mdsize.h into opt_md.h
look for a block of free virtual memory big enough to hold all sections. The
blocks starts at the beginning of the first section and ends at the end of
the last section. In the previous version the block ended at the beginning
of the last section, hence creating situations where there was not enough
free space to map the section.
even bother probing for an FPA. If ARMFPE is configured, always use it,
even if there's an FPA (since it provides the FPA support code). Move all
printfs about FPAs into armfpe_init.c.
This means I can delete the last two elements from struct _cpu, so that the
structure, and the whole of <arm/cpus.h> is redundant and can be deleted.
for the registers, which was true, but actually the same as the driver
did without this option.
What it realy did is work around a stupid bug in the driver that did not
use the "offset" result from the pcmcia_mem_map call mapping the CIS memory.
We got away with this for a long time since on i386 and typical pcmcia
bridged the offset returned will be 0. It always failed (without
RAY_USE_AMEM=1) if the check for a different function CCR aliases in pcmcia.c
failed and mapped the CCR base new - this time at the CCR base of this
function (0xf00), so all register acceses (that had 0xf00 added) happened
way off in neverland.
Now we do not hardcode the CCR base to the register definitions, but
instead use the offset returned by pcmcia_mem_map. This makes the driver
work with and without CCR base aliases being found.
This has been on my TODO list for some time and i found it time to fix it
since its pretty simple to do.
The patch checks if the kernel is booted from the `UnixFS' RISC OS filing
system (case unimportant) and if so interprets its name to get the unix
file name the kernel has. If it doesn't see this prefix it will asume its
just called `netbsd'
in identify_arm_cpu(), since it's almost unused elsewhere.
Change the detection of bugged StrongARMs to use the cpu ID rather than the
class. This turns "almost" into "entirely".
struct cpu_info. Also kill the cpuctrl global while we're here, and make
identify_arm_cpu() take a struct cpu_info * as an argument alongside the CPU
number.
structure for the mountid, but it is 32/64 bits long only, whereas
mountid is 128 bits long. Because we did not initialize the unused bits to
zero, the mountid was not always unique within a filesystem.
This makes autocad 1.3 able to start up.
first. This is necessary to avoid warnings with -fshort-enums. Casting
to an int really should be enough, but turns out not to be.
This change will be documented in doc/HACKS.
m_reclaim() to match the drain hook signature. This allows us to
delete m_retry() and m_retryhdr(), as the pool allocator will now
perform the reclaimation step for us.
From art@openbsd.org.
and the latter, while there was some code tested the bit, was woefully
incomplete and also unused by anything. Besides, PR_STATIC functionality
could be better handled by backend allocators anyhow.
From art@openbsd.org
pool_set_drain_hook(). This hook is called in three cases:
* When a pool has hit the hard limit, just before either erroring
out or sleeping.
* When a backend allocator fails to allocate memory.
* Just before trying to reclaim pages in pool_reclaim().
This hook requests the client to try and free some items back to
the pool.
From art@openbsd.org.
Configure power supply on VPP1 at 5V when powering up a socket.
Get rid of stray interrupts.
Make the driver quiet for normal operation when not in debugging mode.
This makes ray0 at nell0 actually work when compiled with RAY_USE_AMEM=1.
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map). Try to deal with this:
* Group all information about the backend allocator for a pool in a
separate structure. The pool references this structure, rather than
the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
to become available, but will still fail if it cannot callocate KVA
space for the pages. If this happens, carefully drain all pools using
the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
some pages, and use that information to make draining easier and more
efficient.
* Get rid of PR_URGENT. There was only one use of it, and it could be
dealt with by the caller.
From art@openbsd.org.
MIPS32 4Kc CPU board, with support for the MIPS64 5Kc and the QED RM5261
CPU boards to follow.
The cs4281 audio hasn't been tested, there are some interrupt problems
with onboard the pciide, but all other on-board peripherals work.
The evbmips port will support more MIPS evaluation boards in the future.
http://mail-index.netbsd.org/tech-kern/2002/03/04/0005.html
auconv.c: Add conversion functions
audio.c: Sample alignment, calling conversion functions, etc.
audio_if.h: Add four hw_* members to "struct audio_params"
audiovar.h: Add conversion buffers, etc.
auich and uaudio: Add conversion request code to *_set_params().
it worked- but I ran into a case with a 2204 where commands were being lost
right and left. Best be safe.
For target mode, or things called if we call isp_handle_other response- note
that we might have dropped locks by changing the output pointer so we bail
from the loop. It's the responsibility of the entity dropping the lock to
make sure that we let the f/w know we've read thus far into the response
queue (else we begin processing the same entries again- blech!).
- Change structures for each device to make them more suitable with
our scsipi mid-layer.
- Use ADAPTER_REQ_SET_XFER_MODE callback.
- Cleanup misc functions/structures/style.
XXX Tagged queuieng support is disabled for now.
XXX Maybe we should have common library of the scsi protocol engine
XXX to share it among all other drivers..
sequence using the reciprocal of the delay divisor to perform the
division.
Set the cp0 compare register so that it doesn't trigger interrupts and
reset the cp0 count register in the hardclock interrupt handler.
To implement a more accurate microtime using the CP0 COUNT
register we need to divide that register by the number of
cycles per MHz. But...
DIV and DIVU are expensive on MIPS (eg 75 clocks on the
R4000). MULT and MULTU are only 12 clocks on the same CPU.
On the SB1 these appear to be 40-72 clocks for DIV/DIVU and 3
clocks for MUL/MULTU.
The strategy we use to to calculate the reciprical of cycles
per MHz, scaled by 1<<32. Then we can simply issue a MULTU
and pluck of the HI register and have the results of the
division.
"swarm"). Other SB-cpu boards will be supported by this port in
the future.
Includes support for on-chip ethernet and serial. Many features
still missing - notably SMP, PCI/LDT and IDE.
This code is provided by the Broadband Processor Business Unit at
Broadcom Corp with minor updates by me.