at least 8-). Add structure offssets for structure members, so we
know how much space we're using. Make the version in the bootinfo
structure be a u_long, so there's no implicit padding in the structure.
Add a few more pointers to the bootinfo v1 structure, which will all
be set to NULL for now.
- Allow BUGCHK and BPT instruction faults in kernel mode if DDB is enabled,
since they are used to invoke the debugger.
- Add a comment about how we'd like to invoke DDB on a trap panic condition,
in a perfect world.
pointer to boot program's bootinfo structure. If the bootinfo magic
matches, save a copy of the bootinfo structure, and use it to determine
booted kernel name, the boot flags, and the location of the kernel symbol
table. If the magic number does not match, revert to the old method
of finding this information (sans symbol table info).
- Add some additonal DDB glue.
was sent to developers, but will eventually become a man page or
something), i noticed a few in various names:
(1) _map and _alloc should take a flags argument, rather than a
'cacheable' boolean.
(2) BUS_BARRIER_* flags should be BUS_SPACE_BARRIER_*.
(3) bus_space_copy_* should be bus_space_copy_region_* for consistency
with other region ops.
Fix all of these (in a backward-compatible way, at least for now). Redefine
internal usees of those names to use the new names. Also, while at it,
clean up the copy functions (remove unnecessary variables) and make sure
that they and other functions conform to the spec.
don't assume that the names/values to be put into defines in assym.h
start with the first .ascii in the assembler file; look for the array
start symbol, instead.
by implementing entirely in assembly. This saves some 6 bytes on all MPUs,
and about 8 cycles on the 030.
Now that it's optimized, define spltty() in terms of _splraise() so that
we don't inadvertantly lower the SPL.
Has unrolled loop for aligned-to-aligned copy.
Notes:
1. this code tuned for DEC 5000/200. ioasic decstations do more unaligned
copies. Better than old non-unrolled loop, but could be improved.
2. Undoes changes made for MIPS3 with comment implying an r4000 TLB bug.
We can't reproduce this on 5000/150 (jonathan) or 5000/50 (mhitch).
Calls to previous bcopy with a bad address show similar symptoms,
reporting a trap in bcopy() after bcopy() has returned. Same thing??
Needs re-checking on an r4000 with no L2 cache.
* Move clockvar.h (header file for generic clock code) to sys/dev/dec.
* Move if_le_dec.c with DEC padded LANCE-dma (pmax/pmax, ioasic, vax 3400)
to sys/dev/dec. Remove from sys/dev/tc.
* Declare attribute le_dec_subr in /sys/dev/dec/files.dec,
use if_le_dec.c when it's defined.
* Move IOCTL asic declaration from pmax and Alpha MD machine
files to sys/dev/tc/files.tc.
* move TurboChannel and ioasic if_le attachments from pmax and Alpha machine
config files to /sys/dev/tc/files.tc. Add le_dec_subr attribute.
* Add if_le_dec attribute to if_le_ibus (pmax ds3100 pmax) LANCE attachment.
sigcode():
executed from user-space stack.
mips1_cpu_switch_resume, mips3_cpu_switch_resume:
arguments passed in via v0, t0, t1 (outlined from cpu_switch())
mips3_VCED(), mips3_VCEI():
called from exception-vector code without any register save,
$at, $ra are live.
- don't erase FPSR exception bits _after_ doing most of the operations in
fpu_implode(), erase them before doing arith and store operations. This fixes
losing the DZ bit.
- create FPSR_OVFL and FPSR_UNFL bits in fpu_implode(). This showed up when
the first error was fixed.
XXX some more work needs to be done. E.g., creating OPERR together with
OVFL looks bogus, but I'm too tired know to re-check docs; and at least we
pass our own regression tests know.
into the 'argument variables' section.
* define variables for CPP and SIZE, defaulting to cpp and size, respectively.
* kill HOSTED_C*, since it's no longer used.
* use ${SIZE} rather than using 'size' directly, so it can be overridden for
cross-builds.
* generate assym.h via assym.s and an awk script.
undone by rev 1.7:
>redo pmax/include/reg.h
>so that the definitions needed by locore.S are in a separate file,
>pmax/include/regnum.h.
* Add explicit `#include <mips/regnum.h>' where symbolic offsets
into a mips trapframe or struct reg are used..
>date: 1997/07/18 00:26:22; author: fvdl; state: Exp; lines: +10 -10
>Work around possible race condition with 2 drives on one controller
>in wd_get_parms. PR 3773, from Onno van der Linden (onno@simplex.nl)
S: ----------------------------------------------------------------------
get APM debugging code compiled in. also, redo the way APM debugging
printfs are invoked, making sure they're always compiled in if debugging
is enabled, but printing them only if the appropriate bits in the
'apmdebug' global variable are set.
* clean up function prototypes (alphabetize in each category, get rid
of 'STATIC' and make them always static since kernels shouldn't have
static symbols stripped anyway, and debugging kernels definitely don't),
group global variables together and note that they're used as globals).
* Export the following as option-settable and patchable global variables:
apmdebug flags word that controls which APM debugging
printfs are printed, set with APMDEBUG_VALUE.
apm_enabled boolean that indicates whether or not APM should
ever be configured on the machine. true by
default, false if APM_DISABLE defined when
compiling. this option exists so that users
whose systems crash when APM is enabled can
disable it with a patchable kernel variable, and
therefore don't necessarily have to compile
a custom kernel as often. With this option set,
a check is still done to see if the APM BIOS
exists; this variable should be used to prevent
the kernel from ever attaching to the APM BIOS.
apm_force_64k_segments
boolean that tells segment setup code to always
use segments with 64k length. false by default,
true if APM_FORCE_64K_SEGMENTS defined when
compiling. used to just be a compile-time option.
apm_do_idle boolean that controls whether or not the APM code
will try to signal the BIOS that the system is
idle when in the idle loop. true by default,
false if APM_NO_IDLE defined when compiling.
apm_do_standby boolean that controls whether or not standby
requests are ever attempted. true by default,
false if APM_NO_STANDBY defined when compiling.
used to just be a compile-time option.
apm_v11_enabled boolean that controls whether or not the driver
attempts to use APM spec v1.1 features. If true,
the driver does (it implements v1.1 of the spec),
and if false the driver only uses v1.0 features.
true by default, false if APM_V10_ONLY is defined
when compiling. Really, the driver should be
updated to do APM v1.2 and this option should
either be updated or go the way of the dodo.
used to just be a compile-time option.
apm_bogus_bios (patchable only) controls a few of the APM segment
setup features. (probably should just be a global
and not patchable.)
* make apm_perror print out the full contents of %ax rather than
just the error code, in addition to printing out the string corresponding
to the error code.
* print estimated remaining battery life time as "[<hours>h ]<minutes>m",
which is actually easily understood, rather than as "<hours>:<minutes>
minutes", which is not.
* restructure match and attach so that they work as they should, remove
redundancy, support attaching the APM device but not actually enabling it
so that APM is attached on systems which have it but on which it's broken
in some fatal way.
* add more debugging printfs in the apm control device entry points.
* return EOPNOTSUPP when trying to do a standby ioctl if standbys have
been disabled, rather than returning the less-intuitive ENOTTY.
* rename a few functions for consistency: apmprobe -> apmmatch,
apm_err_translate -> apm_strerror.
* mark a few serious or annoying bogons XXX so people might look at
them later.
* KNF (lots of changes!)
Despite this substantial amount of work, this driver still needs a _lot_ of
work. In particular, the user-land device interface needs to be gutted, and
better support for APM-aware applications and device drivers (i.e. call-backs)
needs to be added (e.g. callback interfaces somewhat like those suggested
by the APM spec).
There are still outstanding known problems with some machines. The true
source of those problems is not currently known, and could be either the APM
BIOSes of the machines in question or this APM driver. However, even if the
problems are caused by APM BIOS bugs, they could be more gracefully worked
around in this driver.
failure. The latter usually would end up being the (nonzero) opcode
placed in %ax before the call, but could conceivably be modified by the
call to be zero. In any case, 0/1 is much nicer than 0/random-nonzero,
as well as being safer.
XXX This (the m68k FPE, not the glue code) is known to be broken for
68LC040/68040V and 68LC060 cpus. This is also the reason we don't
bother to add options FPU_EMULATE to the DRACO configuration file, as
DraCos only come in 68040V (very few) and 68060 variants.
XXX This (the m68k FPE, not the glue code) is known to be broken for
68LC040/68040V and 68LC060 cpus. This is also the reason we don't
bother to add options FPU_EMULATE to the DRACO configuration file, as
DraCos only come in 68040V (very few) and 68060 variants.
renamed AUDIO_ENCODING_SLINEAR and AUDIO_ENCODING_LINEAR reverts to the
NetBSD 1.2 sematics. A kernel with COMPAT_12 defined will accept
AUDIO_ENCODING_LINEAR and treat it as before, without COMPAT_12 it
will be rejected.
port, which is lifted from amiga port, plus some changes from me:
- Add support for the HP MMU to the 020/030 bus/address error handler
(mostly lifted wholesale from the old code).
- Rename addrerr and buserr to busaddrerr2030. The new name reflects that
these functions are specific to the 68020 and 68030, and that the same
handler function is used for both vectors.
The vector table is patched once we know our CPU type, before the MMU
is enabled. In the event that we're running on a CPU that we're not
configured for, simply invoke the PROM's "reboot request"; we have no
hope of running in the event of a config botch, since we need working
a working bus error handler for console initialization.
These new functions optimze for common-case page faults, eliminate
many run-time checks, and are sharable.
a global variable (yech, but i'm not out to save the world) which had
the same meaning and ended up being stealthily set in pretty much
the same place.
doing 'if (tag == ...) else if (tag == ...) else panic' rather than
by doing a switch. This makes life easier for people who need
the i386 bus_space_* functions to access spaces other than the normal
memory and I/O spaces, because it allows them to define an i386
bus_space_tag_t as a pointer to a function table, rather than just
an int. (They could define it as an int and cast it to a funtion
table pointer, but I think that's bad karma, and this change doesn't
hurt.)
mark all of 0 -> IOM_BEGIN as used, even though there are some regions
which are left for use by the BIOS (namely, the first 4k page and the
area after biosbasemem*1024 but before IOM_BEGIN). Drivers wishing to
manipulate these areas should map them specially, with _i386_memio_map()
rather than bus_space_map() or i386_memio_map().
disabled even if it's attached. If disabled, ENXIO on open.
(2) in the case where the code32 segment len overflows the I/O hole,
instead of giving up truncate it. (In other words, revert
change (2) in rev 1.21 which i suggested mistakenly.)
(3) map bios data space in the 0->640k range with _i386_memio_map()
rather than with bus_space_map(), so that no accounting checks
are done. The checks which are done to make sure that allocation
in this range is safe are sufficient.
(4) check the return value from _i386_memio_map(), and if it indicates
an error disconnect from the APM BIOS, print an error message,
and return without having marked the device 'enabled'.
functions (which only work on memory and i/o space) to i386_memio_*,
and make bus_space_* in bus.h be #defines which invoke them. This makes
life easier for people who need to define the all of the bus_space functions
so that they work on spaces other than memory and I/O space. Also, add
an _i386_memio_map function which is like i386_memio_map but doesn't do
the extent map checking or allocation. _i386_memio_map and i386_memio_*
are for use only by machine-dependent code.
code for this was in my private tree at one time, and I must have
forgotten to g/c the constant from trap.h). Reported by
enami tsugutomo <enami@but-b.or.jp>, PR #3845.
Re-arrange cpuattach() a bit so that more initialization is done before
dealing with the FPU. Some more work is still required to de-couple
FPU detection from the autoconfiguration attach code in SMP systems.
Correct handling for Trap #2 in SunOS executables,
now that we know it is supposed to flush the cache.
(Was thought to be "some obscure FPU operation".)
Add DDB interface to /sys/arch/mips/mips..
Rework heuristic stack traceback to work with DDB.
Add hooks to print exception log from DDB.
Add hooks from pmax console drivers: call Debugger()
after break from serial console, or 'DO' key from LK-xxx.