Commit Graph

358 Commits

Author SHA1 Message Date
bjh21 5677634e50 Small comment correction. 2001-03-28 13:04:57 +00:00
bjh21 8bd452c648 Create an MI Ether3 driver. It's derived from the arm26 driver, which uses
my MI SEEQ 8005 driver, which is based on the arm32 ea driver.
2001-03-24 00:14:52 +00:00
bjh21 2714607c72 Add podulebus_shift_tag, which generates a bus_space_tag_t with a specified
address shift (stride).  This is necessary because many podules have standard
chips with odd address-bus wiring to allow for using LDM for
bus_space_*_multi_*().
2001-03-24 00:10:42 +00:00
lukem 723cd818d8 move duplicate definitions for:
pc, lpt, joy, ocis, apm, satlink, i4bctl, i4brbch, i4btel, i4btrc, i4b
from the port-specific arch/*/*/conf.c files into sys/conf.h
2001-03-21 22:25:52 +00:00
bjh21 de59def2f2 Remove spurious #define mod_base. 2001-03-20 23:29:07 +00:00
bjh21 86d6442c28 Move machine-dependent podulebus headers to <machine/podulebus_machdep.h>.
<dev/podulebus/podulebus.h> is the canonical file to include, and includes
<machine/podulebus_machdep.h>.
<arch/${MACHINE}/poudulebus/podulebus.h> remains for backward compatibility.
2001-03-20 22:59:39 +00:00
bjh21 61e80eef9b As Richard Earnshaw pointed out, bus_space_copy_1() and bus_space_copy_2()
had the wrong names and did the wrong things.  Both are now fixed.
2001-03-20 22:56:16 +00:00
bjh21 0fe2c0aedc These have moved to sys/dev/podulebus. 2001-03-20 00:13:16 +00:00
bjh21 2c4e09f4c9 Revert last change, which shouldn't have applied to this file. 2001-03-20 00:04:28 +00:00
bjh21 23836945a3 Redefine bus_space_addr_t to be a raw address, for compatibility with arm32
podulebus drivers.
2001-03-20 00:03:10 +00:00
bjh21 34cca2e23e Pull in shared podulebus drivers. 2001-03-20 00:01:37 +00:00
bjh21 1c300d3ee8 Make pa_*_base bus_addr_ts. 2001-03-19 21:03:47 +00:00
chs c40daf0aed change uvm_winsize to uvm_winshift so that we can avoid division
by a non-constant value.
2001-03-19 00:29:03 +00:00
bjh21 5c98fe3fec Gratuitous change of signature for podulebus_irq_establish(). It now takes
an opaque podulebus_intr_handle_t, which can be found in podulebus_attach_args.
It's actually the slot number, but don't tell anyone.
2001-03-18 15:56:04 +00:00
bjh21 949f93d279 If uvm_fault() returns an error, pass it on to the pcb_onfault handler
if there is one.  They already arrange to return it to their callers.
2001-03-18 14:04:04 +00:00
bjh21 16198f2b92 Podulebus convergence:
pa_memc_[th] -> pa_mod_[th]
Add pa_easi_*
Add pa_*_base
Add pa_slot_flags to indicate whether EASI is supported.
2001-03-17 21:56:06 +00:00
bjh21 697e84ed46 Update for new location of podules.h and podule_data.h 2001-03-17 20:34:43 +00:00
bjh21 bfc2063e69 Create an ARM2-specific undefined-instruction handler which deals with the
undef/SWI bug and handles emulating SWP.

Untested bacuse my ARM2 machine isn't currently set up.
2001-03-17 18:12:09 +00:00
bjh21 9dfd56f6dc Make this compile with "options DEBUG" again. 2001-03-16 18:11:57 +00:00
chs ac3bc537bd eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>
2001-03-15 06:10:32 +00:00
toshii 300d398485 Move references to arm/arm/disksubr*.c from files.arm to
files.{arm26,arm32,dnard}.
2001-03-14 14:39:45 +00:00
bjh21 c3c5158d00 Change the value of tf_pc in undefined-instruction handlers on arm32. It now
always points to the undefined instruction in question.  It's up to the
handler to advance it to the next instruction if it wants execution to
continue there.  This is how things have always worked on arm26.
2001-03-13 23:56:48 +00:00
bjh21 a7ba6bb441 Update for new linked-list undefined-instruction handler. 2001-03-13 21:00:13 +00:00
bjh21 db1f089718 Initialise the undefined-instruction handler at startup. 2001-03-13 20:20:43 +00:00
bjh21 b1475781a2 Make arm26 implementation of DDB slightly less gratuitously different from the
ARM one.  Also update for recent undefined-instruction handler changes.
2001-03-11 16:31:05 +00:00
bjh21 ce5529eabf Change undefined instruction handler to use a linked list for each
co-processor.  This is necessary so we can have several handlers for
CP0 (used as a catch-all for non-CP instructions).

Handlers are now removed using remove_coproc_handler(), rather than by calling
install_coproc_handler() with a NULL handler.

Because install_coproc_handler() can now allocate memory, there's a version
for use at boot time that doesn't.
2001-03-11 16:18:39 +00:00
bjh21 c6c5fda4be Use <arm/undefined.h> 2001-03-11 16:14:36 +00:00
bjh21 c7bfcc0130 These are no longer used. 2001-03-10 23:31:32 +00:00
bjh21 29e609e3c5 Update for recent changes to the i82586 driver. 2001-03-10 22:32:17 +00:00
bjh21 f6c36838ae Use the same undefined-instuction handler on both arm26 and arm32. The handler
is derived mostly from the arm32 version, but with a check for an obscure ARM2
bug thrown in.

arm26 fpu and cpu drivers use the new interface for catching undefined
instructions.
2001-03-08 21:30:35 +00:00
bjh21 c0aee693f5 Add a missing part of FPU support. 2001-03-08 21:12:48 +00:00
bjh21 25ec015449 Merge setregs() from sys/arch/arm32/arm32/machdep.c,
sys/arch/hpcarm/hpcarm/machdep.c and sys/arch/arm26/arm26/vm_machdep.c
into sys/arch/arm/arm/arm_machdep.c.
2001-03-04 23:25:00 +00:00
matt 2bfaa741b1 remove disksubr since they are common. 2001-03-04 20:47:03 +00:00
bjh21 8054b2ad5f dev/cons.c is supplied by files.arm.
XXX should it really be?
2001-03-04 14:38:29 +00:00
bjh21 fddf453e7a Allow for size=0 case in copyin(), copyout() and kcopy(). 2001-02-28 11:55:39 +00:00
bjh21 163eba47d8 Use <arm/cpu.h>. 2001-02-28 00:17:40 +00:00
bjh21 fa45b68520 Actually remember to look up the system call we're trying to invoke.
Oops.
2001-02-27 23:57:30 +00:00
bjh21 9a1c596b0b cpu_wait() is now in vm_machdep_arm.c 2001-02-27 13:58:13 +00:00
bjh21 09f63bd785 Now that arm26 does __HAVE_MINIMAL_EMUL, switch it over to using
<arm/types.h>.
2001-02-26 00:19:57 +00:00
bjh21 e56f5ba174 __HAVE_MINIMAL_EMUL 2001-02-25 23:08:33 +00:00
bjh21 9d22bf6fdf Adapt for __HAVE_MINIMAL_EMUL world. 2001-02-25 23:07:51 +00:00
bjh21 846fe69958 Remove CPU_* options (they're in files.arm now -- for some reason I missed
this lot in the last commit).
2001-02-25 18:28:27 +00:00
bjh21 96b16f75a6 Hack to allow arm26 to have its own "cpu" device. This device should really
be shared between all ARM ports, but the arm32 one is too ugly for me to
touch it till I've got a test system running.
2001-02-25 15:33:33 +00:00
bjh21 090dc051cf Reduce the amount of memory allocated for assembler fragments.
Excise unnecessary instructions from kernel launch code.
Increase HIMEM on >8Mb machines, since the last two changes didn't free
enough memory to boot with 16Mb.
2001-02-23 00:27:40 +00:00
bjh21 ab20625e49 Lint doesn't like zero-sized structs. 2001-02-17 20:07:01 +00:00
bjh21 3dbffcc29f Move the RAM base address of the kernel into a variable.
Set CPPFLAGSm CWARNFLAGS and STRIPFLAGS to the same as arm32 uses.
2001-02-17 19:38:36 +00:00
bjh21 503e69a88a Don't define pmaphistbuf unless UVMHIST is defined. 2001-02-17 19:09:51 +00:00
bjh21 33c7eb2382 Add necessary DDB includes. 2001-02-17 19:08:21 +00:00
bjh21 4acea3a8cc Don't do arithmetic on void *s. 2001-02-17 19:04:36 +00:00
bjh21 2e041e883b Correct return type of arcvideo_show_screen(). 2001-02-17 18:45:19 +00:00
bjh21 b211962232 Include <machine/machdep.h> for update_memc(). 2001-02-17 18:43:13 +00:00
bjh21 575fa5e5af #ifdef out arckbd_pick_layout until we get round to using it again. 2001-02-17 18:39:11 +00:00
bjh21 a72248beab Reduce unnecessary differences between this and Makefile.arm32.
Also (more significantly), use the compiler's default -mcpu setting.  This
means I can now build APCS-32 kernels.  They work, too.
2001-02-17 17:23:48 +00:00
bjh21 8b601afaf3 Re-introduce <arm/endian_machdep.h>, this time using GCC's idea of the target
endianness.
2001-02-17 14:55:44 +00:00
bjh21 9b6de1da90 Move cpu_coredump() from arm32/arm32/vm_machdep.c to arm/arm/vm_machdep_arm.c.
Also ANSIfy it and use it on arm26.
2001-02-13 22:54:25 +00:00
bjh21 f942342607 Fix a typo in the last change (eh_init_media -> eh_media_init). 2001-02-13 18:20:57 +00:00
bjh21 284047a2b2 Move sendsig() and sys___sigreturn14() from arm26/arm26/vm_machdep.c and
arm32/arm32/machdep.c into arm/arm/sig_machdep.c, merging and ANSIfying in
the process.

The code is based on the arm32 version, so I don't think anything should break
there.
2001-02-13 13:19:52 +00:00
bjh21 4e460028dc Since idle() turns up in so many stack backtraces, put it in the global
symbol table.
2001-02-13 13:16:37 +00:00
bjh21 82bf8a9d0a Avoid uninitialised variable reading /dev/mem. 2001-02-12 23:29:08 +00:00
thorpej 043e519d55 Adjust the way that media is initialized on DP8390-compatible
chips.  The dp8390_softc now has media_init and media_fini
function pointers that do the work.
2001-02-12 18:49:03 +00:00
bjh21 a4e55e0f13 Shared ARM ptrace(2) implementation. Mostly the same as the arm32
version, but with some #ifdefs for arm26.

Also, don't define PT_STEP, since we don't implement it.  This should
reduce code size a little.
2001-02-11 17:03:04 +00:00
bjh21 9826a76781 Common <arm/reg.h> (and hence common struct reg) for ARM.
This is theoretically backward-incompatible on arm26, but GDB doesn't work there
yet anyway.
2001-02-11 14:51:55 +00:00
bjh21 60af6ce7ca Don't trust function return to restore IRQ disable flag, since it won't
in APCS-32.
2001-02-11 14:46:11 +00:00
bjh21 6d285953f5 When an array is declared as int r[13], don't go trying to use r[13]. 2001-02-10 19:09:48 +00:00
bjh21 21e1b73962 Update ioeb_irq_clear to match its caller. 2001-02-08 22:21:24 +00:00
bjh21 74591d814f Add a definition of MID_MACHINE -- kernel cores still need it. 2001-02-03 17:18:30 +00:00
bjh21 917e1e8fd2 Set the palette in 4bpp modes. They still don't work right, though. 2001-01-24 00:56:29 +00:00
bjh21 050769744d cf_unit usage is now fixed. 2001-01-24 00:03:21 +00:00
bjh21 3c3ed6cecd Flush out cf_unit abuses.
Also, most device functions related to IRQ handling no longer take a device
pointer.  We make so many assumptions about the machine's layout in irq.c that
this just seemed silly.
2001-01-23 23:58:31 +00:00
bjh21 d21e15aefe This is no longer used. 2001-01-23 23:19:45 +00:00
bjh21 c59e8d1831 ANSIfy. 2001-01-23 22:59:24 +00:00
bjh21 34bf08cd05 Use a permanent breakpoint to invoke DDB rather than constructing a trapframe
manually.  Prevents the problem introduced in the trapframe unification
whereby continuing from DDB would cause a panic.
2001-01-23 22:41:16 +00:00
bjh21 f32fc0fc90 Use evcnts properly for interrupt counting.
The architecture here follows that of the vax port -- each device has its
evcnt in its softc, but defers actually incrementing it to the IRQ
dispatcher.  This way, devices can attach sub-counts (e.g. Rx and Tx counts
for Ethernet interfaces), but don't all have to have code to increment the
counters.

Drivers deliberately call evcnt_attach_dynamic() before establishing their
interrupt handler so that the establish routine can attach a parent event if
that's appropriate.  At present, it isn't.
2001-01-23 22:07:59 +00:00
bjh21 8c87715ce0 We abuse cf_unit. The shame! 2001-01-23 22:07:58 +00:00
bjh21 616dad1a1b Use evcnts properly for interrupt counting.
The architecture here follows that of the vax port -- each device has its
evcnt in its softc, but defers actually incrementing it to the IRQ
dispatcher.  This way, devices can attach sub-counts (e.g. Rx and Tx counts
for Ethernet interfaces), but don't all have to have code to increment the
counters.

Drivers deliberately call evcnt_attach_dynamic() before establishing their
interrupt handler so that the establish routine can attach a parent event if
that's appropriate.  At present, it isn't.
2001-01-23 22:07:57 +00:00
bjh21 668b6cbaba We now have a rasops4 attribute to play with. It doesn't work, but then
neither do rasops1 and rasops2...
2001-01-23 00:27:44 +00:00
bjh21 55648b014b Use our own evcnt structure to count VSYNC interrupts.
Also disable interrupts while we're not using them.
2001-01-22 23:29:34 +00:00
bjh21 d0b6f0f1cd Changes to interrupt accounting:
NULL "name" argument to irq_establish indicates that the device will maintain
an evcnt structure for this interrupt.  In this case, irq_establish will still
maintain its own count (for DDB machine irqstat), but won't attach it to the
global list.

Change use of ev_group and ev_name to follow guidelines in evcnt(9).

Switch arckbd(4) over to the new arrangements.
2001-01-22 23:08:26 +00:00
bjh21 fe3273fbb4 Patch from PR kern/8001, submitted by Rafal Boni.
This adds support for EtherExpress/16 cards with 16k of RAM, and in the
process adds general support for PIO mode on these cards.  This entails
changing the way the i82586 driver handles bus barriers, since it doesn't
allow for strange cases like this.

This has been tested on the i386 port with the 'ix' driver in both
16KB (which was the source of the problem) and 32KB modes, as well
as with the 'ef' driver.  I've tested it (briefly) with 'ei' on arm26
as well.  In theory, drivers other than 'ix' should follow precisely the
same code paths as before.
2001-01-22 22:28:43 +00:00
bjh21 1178bf4219 Initial potentially sharable <arm/armreg.h>. Used by all arm26 code. 2001-01-22 22:10:39 +00:00
jdolecek 8b24036797 Require the machine-dependant DDB commands to be in db_machine_command_table[]
and link it directly to db_command_table[] so that it's not necessary
to do this at runtime. Make db_machine_command_table[] const on all ports.
g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()

Patch written by enami.
2001-01-22 13:56:55 +00:00
bjh21 8805bd8b56 Unify arm26 and arm32 trapframe structures. The unified trapframe is the same
shape as the old arm32 one, but there are a few #defines to keep arm26 code
happy.  Anything that depends on the precise shape of the trapframe,
and especially on being able to treat it as an array of registers, has been
updated.
2001-01-20 17:14:19 +00:00
bjh21 2c89ce7e74 Add <arm/frame.h>, for shared stack frame structures. Currently, only sigframes
are common.
2001-01-18 21:48:25 +00:00
tv e58532a4bf No-op commit to force update to a non-"-kk" revision. 2001-01-18 17:47:58 +00:00
bjh21 46b21bb8a8 Fix a couple of brackets in a comment. 2001-01-18 17:05:06 +00:00
jdolecek c1fc5392f5 adjust ddb variable access functions to have first arch 'const', make db_[e]regs[] const 2001-01-18 10:55:29 +00:00
fvdl c7f1462f3e Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
2001-01-17 00:07:18 +00:00
bjh21 f575270d81 Switch over to using the arm32 sigcontext structure.
Yes, this causes binary incompatibility.  Yes, it's Evil, Bad and Wrong.
Nonetheless, I think it's probably the least unpleasant way to get close to
binary compatibility with NetBSD/arm32, and a very much doubt there are any
arm26 binaries out there that depend on the old shape of struct sigcontext.
2001-01-16 00:29:45 +00:00
thorpej d74e432ed3 Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
2001-01-15 20:19:50 +00:00
thorpej 45de366b2e Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>.  This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.
2001-01-14 23:50:28 +00:00
thorpej 6f0dfa5049 splimp() -> splvm() 2001-01-14 03:32:20 +00:00
thorpej d85a75f583 Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
2001-01-14 02:00:37 +00:00
bjh21 78c0ba909e Separate out sigcode into its own file, since it's shared by arm26 and arm32. 2001-01-13 00:06:50 +00:00
bjh21 a5ef6e1f81 Move db_disasm.c into sys/arch/arm/arm. Use arm26 version, since it should
generate smaller compiled code.
2001-01-12 21:31:51 +00:00
bjh21 a4047bf10c Move the generic ARM disassembler from arm32/arm32 to arm/arm. 2001-01-12 13:43:11 +00:00
bjh21 6189064e69 More FPU-state-saving infrastructure. Not useful yet. 2001-01-12 13:23:49 +00:00
bjh21 d74ad44e33 Document format of various chunk types. 2001-01-12 00:13:26 +00:00
bjh21 0bb3b087a6 Document the VIDC audio format. 2001-01-12 00:12:38 +00:00
bjh21 531e3e2075 Fix up irq_string for a world without intrnames. 2001-01-12 00:11:42 +00:00
bjh21 6fa98146d5 Start merging actual code in arm32 and arm26:
arm32/arm32/in_cksum_arm32.c -> arm/arm/in_cksum_arm.c

Also move specification of other checksum stuff to files.arm, even though we
use the MI code for that.
2001-01-11 23:27:26 +00:00