Commit Graph

462 Commits

Author SHA1 Message Date
bjh21 0368c93d47 Move the functionality of eca_init_rx_hard() into the tail end of
eca_fiqhandler_tx and eca_tx_downgrade.  This seems to reduce the
number of Rx overruns to zero on my current test case.
2001-09-22 17:19:27 +00:00
bjh21 35de4e1a4c Add fiq_downgrade_dont_disable, which does what fiq_downgrade does, but
doesn't disable FIQs in the process.
2001-09-22 17:16:18 +00:00
bjh21 ea073a0cd4 eca_init_rx_hard() shouldn't call eca_init_rx_soft(). That's the
whole point.
2001-09-22 15:33:53 +00:00
bjh21 cddb5108f8 More re-arrangements: Split eca_init_rx() into two parts, one of which
(eca_init_rx_soft()) just sets up software state, and the other of
which (eca_init_rx_hard()) actually puts the interface into receive
mode and sets up the FIQ handler etc.  Arrange that when we transmit a
frame, eca_init_rx_soft() has already been called, so we only need to
call eca_init_rx_hard() from the Tx downgrade handler.

The point of this is that I should be able to incorporate the
functionality of eca_init_rx_hard() into the Tx FIQ handler so that we
can switch from Tx to Rx with little enough delay that we don't drop
the first few bytes of the incoming frame.
2001-09-22 15:29:20 +00:00
bjh21 ffe2e2dfd3 Re-organize eca_gotframe to make the logic a little clearer (to me). 2001-09-22 14:42:51 +00:00
tv ab11c169b5 objcopy -> ${OBJCOPY}; remove redundant definitions of OBJCOPY?= (it is
now in bsd.own.mk).
2001-09-22 03:34:17 +00:00
bjh21 b959cd4c1f Re-organise eca(4)'s FIQ handlers. Now we have a single FIQ handler copied
to zero page, and it branches to either the rx or tx handler.  My intention
is that the tx handler should switch to the rx one the moment it finishes,
without needing a downgrade, which I hope will get rid of the start-of-frame
rx overruns I'm seeing.

While I'm here, move the constants describing the shape of the FIQ state
structures out of if_ecavar.h and into genassym.cf where they belong.
2001-09-20 21:54:11 +00:00
bjh21 5ddc1e1310 Add retry mechanisms for Econet, so that if a four-way handshake doesn't
complete for some reason, we defer it for a bit and then try again.  This
gets ping down to 0% packet loss.

Of course, ping _should_ have been at 0% packet loss anyway, and that's the
next thing to deal with.
2001-09-17 22:41:59 +00:00
bjh21 33d596bef8 Add support for incoming IP broadcast packets. The protocol for this is
worked out by observing RISC iX's behaviour, so it may be technically
wrong.  The only implementations of IP-over-Econet for which I've got
sources don't support broadcasts.

Tested using broadcast ping from RISC iX to NetBSD, and using rwhod.
2001-09-16 15:08:39 +00:00
bjh21 7763bd3d61 Crude hack to ensure that if a soft-interrupt handler schedules a soft
interrupt, the second handler gets called when the first returns.
2001-09-16 12:58:53 +00:00
bjh21 91dae8ca83 Add minimal IP-over-Econet support and a load of bug-fixes. I can ping,
unreliably, between my RISC iX and NetBSD boxes with this.  There's a lot
of work to go before it's solid, though.
2001-09-15 17:27:24 +00:00
bjh21 5321796010 Add a minimal bus_space_mmap which always fails. The MEMC can only map DRAM
into the user's address space -- I/O devices can only ever be got at by the
kernel.
2001-09-11 11:38:59 +00:00
bjh21 e416135347 Driver for the standard Archimedes Econet interface, based around the
Motorola 6854 ADLC.
2001-09-10 23:41:48 +00:00
bjh21 c30b958988 Add fiq_installhandler(), so the current FIQ owner can change what handler
they've got installed without relinquishing the FIQ.
2001-09-10 23:17:48 +00:00
chris 0e7661f023 Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
2001-09-10 21:19:08 +00:00
reinoud a425cc29ac Make it compile again if for some configuration there are no FIQ's ... It
complained about the unused label.
2001-09-10 02:21:42 +00:00
matt 7ce6450eac Add a merged <pcb.h> for arm26/arm32. 2001-09-03 19:20:27 +00:00
atatat 5f25c01eff Comment out bridge pseudo devices from ports that don't
__HAVE_GENERIC_SOFT_INTERRUPTS.  bridge(4) doesn't compile there.
2001-09-01 23:08:40 +00:00
atatat 97c67a9bae Add bridge pseudo devices to GENERIC configs 2001-09-01 21:52:23 +00:00
simonb 023bdd2bf2 Use comments around the token after a #endif. 2001-08-31 04:44:54 +00:00
bjh21 6825e7d5ea Garbage-collect pcb_onfault_lj, since it's unused and doesn't exist on
arm32 ports.
2001-08-26 14:15:07 +00:00
bjh21 66da5fecf2 KASSERT the presence of a FIQ downgrade handler before we try to call it. 2001-08-26 12:25:38 +00:00
bjh21 9c45cae8df Make cmos_read() and cmos_write() globally visible, and make the instance
they operate on implicit.  Also, stop abusing cf_unit, and remove a vast
swathe of unused code.
2001-08-26 12:24:24 +00:00
bjh21 0ff76b5187 Add fiq_off() and fiq_on(). 2001-08-26 12:20:59 +00:00
bjh21 3f9dc1b3e8 In ioc_attach(), use ioc_irq_setmask() and ioc_fiq_setmask() rather than
twiddling registers directly.  Also, remove an outdated comment.
2001-08-25 17:59:38 +00:00
bjh21 7da5d70599 Add fiq_on() and fiq_off(), to enable and disable FIQs at the CPU.
Call fiq_off() from start() and fiq_on() from cpu_configure(), so we're certain
not to get any FIQs during autoconfiguration.
2001-08-25 17:55:24 +00:00
bjh21 bf5b029d44 Make sure that soft interrupts are initialised in a "not pending" state. 2001-08-25 17:45:32 +00:00
bjh21 35228f775a Two related changes:
Make splhigh disable IRQs at the CPU rather than at the IOC.  This has the
potential to be faster, and more importantly ensures that splhigh() blocks
FIQ downgrades.

Have a variable which indicates that a FIQ downgrade is required, and ensure
that the IOC "force IRQ" bit is turned on in this case.  This ensures that
FIQ downgrades don't get lost if something happens to be fiddling with the
interrupt mask at the wrong moment.
2001-08-21 22:47:17 +00:00
bjh21 8a979a066f Change various return sequences to the APCS-32 versions. 2001-08-21 22:42:17 +00:00
bjh21 1def612c66 Correctly restore the spl if we fail to claim the FIQ. 2001-08-21 22:40:39 +00:00
bjh21 1d4ae5d285 Use int_off_save and int_restore rather than int_off and int_on. 2001-08-20 23:28:05 +00:00
bjh21 45b5bdc5e5 Split off the pm_entries array from the rest of struct pmap. This makes
memory allocation for it more efficient (since pm_entries is 4096 bytes long),
and will allow pm_entries to be freed for swapped processes.
2001-08-20 23:12:54 +00:00
bjh21 8ec27f2ebe Implementation of fiq_{get,set}regs.
Also, don't leave space for a FIQ handler in kernels with no FIQing devices.
2001-08-20 23:10:51 +00:00
bjh21 13f36f67c6 Don't initialise a podule's loader multiple times. 2001-08-20 23:09:12 +00:00
bjh21 9aa4896361 More FIQ support. This gives me enough to handle FIQs, and to downgrade them
to IRQs as necessary.  All these interfaces are subject to change in the light
of experience.
2001-08-20 23:08:10 +00:00
bjh21 1061e51a8a One from the vaults: Add lint stubs. 2001-08-20 22:56:10 +00:00
wiz c52d355d71 "wierd" is weird. 2001-08-20 12:20:01 +00:00
chs 316cd176c8 in vunmapbuf(), call pmap_*remove() explicitly since uvm_km_free_wakeup()
will soon no longer do it for us.
2001-08-19 17:43:44 +00:00
bjh21 8b7128e398 Changes in aid of FIQ support:
Add ioc_fiq_setmask().
  Change ioc_irq_status_full() to use the request registers rather than the
  status registers.  This is brings it into line with the Unix baclplane, and
  makes detecting downgraded FIQs possible.
2001-08-19 15:27:44 +00:00
bjh21 63011ec08f Add lint stubs. Not actually tested or anything. 2001-08-13 23:16:11 +00:00
bjh21 9d345bfc35 New header file for FIQ-related definitions.
Currently just contains the FIQ numbers, until I decide on an API.
2001-08-13 22:59:40 +00:00
bjh21 a3119c10de Report link status correctly for 10BASE-T. 2001-08-11 20:42:45 +00:00
bjh21 12a3da3896 Add RASOPS_SMALL. 2001-08-10 20:14:17 +00:00
bjh21 beb2e3fe5d Cast size_t argument appropriately for printf format. 2001-08-10 18:51:06 +00:00
bjh21 b5560b60b9 No need to mention procfs_machdep.c here -- it's in files.arm anyway. 2001-08-10 18:24:20 +00:00
bjh21 bd6d4d6b77 Use <arm/param.h> to get shared definitions. 2001-08-07 22:26:56 +00:00
chris 9522cf08d4 Share procfs_machdep.c across arm. 2001-08-05 13:09:45 +00:00
bjh21 8c3ac05de9 Bump version for * command addition. 2001-08-03 00:41:12 +00:00
bjh21 33452511ed Add a single * command, *boot26, so that the module can be manually invoked
after it's loaded.
2001-08-03 00:40:23 +00:00
bjh21 b471d90032 Add OS_Module. 2001-08-03 00:32:30 +00:00