keeping track of where the kernel lives in K0SEG. Place early data
structure allocation into an allocsys() function, like other ports, so
that it can be used to first calculate the amount of memory needed
for those data structures.
called anyway, but now at least the reason is documented).
- rearrange a few things to make it easier to add support for non-contigous
physical memory.
called "MACHINE_NEW_NONCONGIG". this is required for UVM, the new VM
system (also written by chuck) that is coming soon. adds new functions:
vm_page_physload() -- tell the VM system about an area of memory.
vm_physseg_find() -- returns index in vm_physmem array that this
address is in.
and several new versions of old functions/macros defined in vm_page.h.
this is the sparc portion.
- make sure all sigreturn error conditions are reported to the caller,
instead of the place jumped to.
This is the bugfix part of pr 4628 by ITOH Yasufumi.
The performance optimization part will be handled seperately, after evaluating
its implications.
Testing on 68040 and removing the performance change from the proposed patch
by scottr. Half of the Amiga machdep.c change had to be done manually by me,
as the patchfile didn't apply cleanly.
XXX Yes, Amiga should be changed to use the common sig_machdep.c instead.
XXX Really soon now. I promise.
function (thought, we might revisit that later). Just call pmap_pinit()
in pmap_create(), instead of inlining what pmap_pinit() does.
Also, g/c a TAILQ_FIRST() macro that is now defined in <sys/queue.h>
was converted to use Mach VM for Net2/4.4BSD. The user segment table
pointer was originally stored in the PCB. When Mach VM came along,
however, it was also stored in the pmap, and loaded into the PCB in
pmap_activate(). pmap_activate() would then note that the PCB's USTP
was now in sync with the pmap's USTP, and the low-level context switch
code would use the value from the PCB.
However, pmap_activate() would also load the hardware MMU context if
the pmap was the current pmap (or, in the case where pmaps can be shared,
such as in NetBSD, if the proc was the current proc). The low-level
context switch code would then reload the hardware _again_ using the
USTP from the PCB.
However, the optimization of not calling pmap_activate() if "stchanged"
was false ended up causing some processes to use stale USTP values from
the PCB when the low-level context switch code reloaded the hardware!
This was noticed by using a real vfork(2) (which worked for some time
before failing, surprisingly!)
Since I'm hard pressed to find any real optimization here (since the
hardware was always reloaded once, sometimes twice!), the code now always
calls pmap_activate(), which uses the correct USTP value (the one in the
pmap). The PCB's USTP is now ignored, and should eventually be g/c'd.
Another optimization can actually be performed, and I have added a comment
describing what it is, but have not yet implemented it.
Also note that most of the loadustp() functions where actually incomplete.
This has been corrected. These functions should probably be split up into
MMU-specific operations, and called indirectly, rather than doing constant
run-time decision making based on values that will never change during the
course of a boot's lifetime.
Store the page {0,1} base and length registers in the pmap structure,
and implement pmap_activate(), which stores them in the PCB (for the
hardware's use).
- Re-implement pmap_pinit(); allocate the PTEs here, not in cpu_fork().
page {0,1} base and length registers in the pmap structure. They will
be loaded in to the PCB when the process's address space is activated
by way of pmap_activate().
- Remove pmap_pinit() macro; it's now a real function.
- Prototypes for pmap_pinit(), pmap_activate(), pmap_deactivate().
it in initializing during autoconfig. Similar to sys/arch/sun3/dev/zs.c
revision 1.47. Ought to fix hangs at first tty access reported by
Johnny Lam, <jlbg+@andrew.cmu.edu>.
performance hit, and on an 80386 processor, it most certainly is. Pull it
from the GENERIC (and DISKLESS "generic") kernels--configure it in
yourself if you actually need it.
16M, thus eating up all candidate bounce pages, which are not allocated
until autoconfiguration runs, by deferring allocation of the buffer
cache pages until after autoconfiguration has run.
XXX This is safe because the i386 port doesn't read any disklabels
XXX during autoconfiguration.
ourselves, but this can still happen on a 386 in copyout & friends.
Fixes pmap_changebit panics seen on 386s. Thanks to Juergen Hannken-Illjes
for providing detailed info on bug occurances.
to the TLB dump routines arguements. Machines would die horibbly when
trying to dump the TLB entries in DDB. Also don't explicitly "page" the
output, since db_printf takes care of that.
causes the MI interrupt handler to barf when we get a 5380 RST interrupt
while probing. Worse, the VIA latches the interrupt, so simply having
all interrupts disabled during autoconfig doesn't resolve the problem.
[I demonstrated the latter on a IIci, which erroneously reports a
reselection attempt(!) after autoconfig is complete. The latched
interrupt results from the SCSI bus reset we do when initializing the
bus.]
Since interrupts must be enabled during autoconfig anyway (sigh), test
to see if autoconfig has completed in sbc_irq_intr(). If not, we don't
pass the interrupt up to the MI interrupt handler. Also, make sure to
clear the VIA interrupt if we're servicing an unclaimed 5380 RST
interrupt.
Thanks to Bill Studenmund for providing the key insight needed to unlock
this problem.
- allow get/set of enums SUNAUDIO_SOURCE and SUNAUDIO_OUTPUT rather
than returning EINVAL
- add missing SUNAUDIO_MONITOR_CLASS case in query_devinfo
- convert SUNAUDIO_MONITOR case from a MIXER_CLASS to a MIXER_VALUE
like it is supposed to be
- the labels for outputs/record class were swapped: fix it
this patch allows "mixerctl" to work properly on a sparc
interrupt properly on a SuperMac Spectrum/8 Series III, and thanks
to Dan McMahill for loaning the card to Paul.
I modified Paul's patch somewhat to change grfmv_intr_generic_{1,4}
to grfmv_intr_generic_write{1,4} and added grfmv_intr_generic_or4 to
handle this card.
"struct cpu_cpuid_family", so that we can have a cpu_setup function per
known cpu type. For now use it only for cyrix 6x86 to enable suspend-on-halt
and implement cyrix's workaround to the "coma bug".
We play mono samples on all 4 channels.
However, we get the volume settings for mono samples as a symmetic two-channel
setting... the other two channels used to stay at max volume...
I believe that something else is wrong here, but dont want to change MI
code (which in turn influences a couple of MD driver) thus late in the release
cycle.
memory-mapped device access (manifested by an apparent wedging of the
PCI bus):
- If cpu_class == CPUCLASS_486, disable memory-mapped PCI device access,
leaving only i/o-mapped access enabled.
- Provide a patchable kernel variable (i486_pci_mem_enabled) and a kernel
option (I486_PCI_MEM_ENABLED) to re-enable it.
during auto-configuration (`cold'), raise interrupt level to splhigh
and return, instead of reporting a stray interrupt.
2. In cpu_switch(), start running a newly selected proces at splclock()
instead of the saved IPL, allowing high-priority interrupts in
ctx_alloc() which can take many cycles to install a new context
(especially on the two-level sun4c MMU).
deal with cheap CD-ROMs and other devices that do not appear to have
any way to enable parity generation. In the future, it might be nice
to have this configurable on a per-device basis with back-to-back
parity errors automatically disabling parity for the device. That
would require some MI changes.
* Handle unaligned and odd-length transfers.
This could probably be handled better in the future.
if the break instruction is still there. This works around a problem with
the software single step in DDB not recognizing the temporary breakpoint
set to emulate the single step.
Fix cursor sprite for X11 startup/exit:
* add cursor on/off functions.
* Default cursor state is off (for framebuffer console).
* Turn off cursor in each driver's xxxCursorInit() entrypoint.
* Turn on cursor at the end of each driver's xxxLoadCursor() entrypoint.
works with X11R5 servers shipped with NetBSD 1.3.
* add cursor on/off functions.
* Default cursor state is off (for framebuffer console).
* Turn off cursor in each driver's xxxCursorInit() entrypoint.
* Turn on cursor at the end of each driver's xxxLoadCursor() entrypoint.
works with X11R5 servers shipped with NetBSD 1.3.
tech-kern. Reported by Sean Davidson to cause erroneous doubling of
keyboard input on a 5000/50 under load.
Increasing the DELAY() from 2 to 30 doesn't help. Remove it for the
1.3 release. May cause problems with low-speed serial input, but
console keyboards work properly.
* Call gdt_init() earlier on.
* Don't bother to check for TSS and LDT descriptors in verr_gdt().
* Nuke the sti special case for trace and breakpoint traps.
* Move some variable declarations into more appropriate locations.
- use board address space > 4 MB, instead of iszthreepa(), to detect Z3-mode
boards. We dont want the bus, but want the address configuration.
- s/CV64CONSOLE/CV3DCONSOLE/
- s/cv3d_zorroIII == 1/cv3d_zorroIII/ and s/cv3d_zorroIII != 1/!cv3d_zorroIII/
* Add code to query CDs for size, from MI scsi cd.c. Use it on CDs.
* Set C partition size for CDs. 4.4bsd/pmax code only set `a' partition
size and required users to mount `a' partition, breking raw-device
access like "disklabel rz?".
* Avoid possible divide-by-zero call to howmany() from rzstart(),
on removable media that aren't ready at device-open time.
Verified to work on rrz42.
until a proper fix is available:
Perpetuate the 4.4bsd design even further. Change keyboard-driver
open routines to check for an active raster console. If active, set the
keyboard struct tty's t_winsize from the rcons t_winsize on first open.
See pr 4438 for remaining problems and discussion of a complete fix.
* add includes for sys/dev/scsipi headers.
* cut-and-paste mode_sense and disk-geometry sense code from sd.c,
with name changes sd -> rz.
* Write `rz_command()' to send SCSI sense commands based on
existing rz size-sensing code.
* get geometry info with page 4 and page 5 mode sense.
* use resulting geom info for default label, fake label, and when
using ultrix labels. (ultrix labels have no geometry info).
Fixes incrrect-label bugs with using sysinst to install onto
Ultrix-labelled disks.
to remove. The address of the pointer rather than the address of what
is pointed to was use to track the previous handler resulting in problems
when releasing a chained irq. (from John Ballance)
Added check for zero terminator after removing spaces in
get_bootconf_option(). This fixes a problem of matching NULL terminators
if there are trailing spaces in the boot args.
configured into the kernel, or when the platform is not supported.
Use the defopt'ed options, rather than NDEC_... and remove the needs-flag
hack that's existed for a while.
but is a marked improvement. This takes advantage of a pseudo-DMA hardware
hack of Apple's that exposes a 16-bit register that the Apple-designed
memory controller acts like a DMA controller and handshakes into or out
of the FIFO. Wierd.
Unfortunately, there does not seem to be a good way to determine what
variety of comm-slot card is present in a machine. There is still an
interrupt issue preventing these cards from working--hopefully that will
be ironed out shortly.
normal rei course. If the handler returns non-zero, just rte.
This should allow better MACE response-time and still keep serial
interrupt overhead to a minimum on older, slower machines.
- fix _C_LABEL so that it actually works.
- make __RENAME use _C_LABEL.
- fix __RENAME so that it expects an unquoted argument.
- fix __indr_reference and __warn_references so that they
supply their own final semicolon.
- define __warn_references to nothing if not GNU C (required
by the way it's used).
The __warn_references semicolon change has to be made
so that __warn_references can be defined into nothing.
(A ; all by itself isn't a great idea.) The __indr_reference
change was made for consistency.
internal ethernet on the Quadra/Centris 660av/840av.
Add initial support for the PSC (DMA controller) to support the above
(DMA SCSI remains unsupported). This involved also changing the way
that several interrupts are handled.
Above from David Huang <khym@bga.com>
Since the interrupts changed somewhat, we must also make the ipls
dynamic, defaulting to their prior levels and adjusted for the AVs.
I modelled this on the hp300.
touched any user-space address recently. This is efficient
for things that stay in the kernel for a while, waking up
to handle some I/O then going back to sleep (i.e. nfsd).
If and when such a process returns to user-mode, it will
fault and be given a real context at that time.
This also makes context switch faster, because all we need
to do there for the MMU is slam the context register.
--entries / remove kernel entry from locore / reorganize vector entry
--code. Enables access to stack frames transitively w.r.t. palcode
--vectors, e.g. upward traceback works, inverting (possibly several)
--kernel vectors. Until now, all trackbacks ended at the first-reached
--instance of trap(), which was totally useless as there is no mystery
--to trap->panic->cpu_reboot
destination register bit pattern with 1.0), which automatically provides
corner case handling.
Missing ftwotox emulation originally reported by Norman Mackenzie in PR 4237,
but he proposed a different implementation.