Commit Graph

526 Commits

Author SHA1 Message Date
bjh21 67feec8608 Lose options GATEWAY. 2001-11-07 19:45:48 +00:00
bjh21 54edd2d848 Define BOOT_ELF32. Don't define ELFSIZE. 2001-10-31 17:59:38 +00:00
bjh21 82b2265851 Add loadfile_machdep.h, which has been missing since I committed boot26. 2001-10-31 17:58:54 +00:00
jmc 6d536163de Change defaults for kernel compiles. Default all to USETOOLS?=no and have
the etc Makefile override that by putting USETOOLS into $.MAKEOVERRIDES
This way the default for kernel compiles is still to use the installed
toolchain instead of depending on $TOOLDIR. $TOOLDIR can be used by
simply adding USETOOLS=yes to the command line as usual.

Adjust each ports template to set the default no setting and also pull in
bsd.own.mk if they weren't already to ensure they'll build correctly
with the new toolchain setup.
2001-10-26 06:45:33 +00:00
bjh21 a9c8e8ab15 We set MACHINE_ARCH to "arm" on arm26 now. 2001-10-24 13:53:24 +00:00
thorpej ba217c4196 Set MACHINE_ARCH explicitly in Makefiles for which it is constant.
Also, since config(8) now explcitly sets MACHINE, there is no need
to do it here in the Makefile.
2001-10-23 19:26:41 +00:00
thorpej a2bf3bc31b Pull in <bsd.own.mk> to get the correct toolchain definitions for
the USE_NEW_TOOLCHAIN case.
2001-10-23 17:32:35 +00:00
bjh21 9eca213216 Since arm26 uses ELF, set MACHINE_ARCH to "arm". 2001-10-21 14:19:34 +00:00
bjh21 fccfe9fb92 Don't call Debugger() unless the kernel has DDB. 2001-10-20 22:15:02 +00:00
bjh21 4cc9dbf11c When dumping debugging information on a fault, don't disassemble at the PC
if that was where the fault happened.  This should make it possible to
continue after prefetch aborts.
2001-10-18 22:53:39 +00:00
bjh21 5dcc1bbb2d Set the major number of swapdev correctly (it's 0, not 1). This
finally makes pageouts work.
2001-10-16 23:58:29 +00:00
bjh21 cc037046d6 Don't update referenced/modified bits if a page is entered using
pmap_kenter_pa.  pmap(9) says unmanage mappings don't get referenced/modified
tracking, and this seems to stop me getting a panic while starting up with
root on NFS.
2001-10-13 14:23:31 +00:00
bjh21 34666c7150 Set POOL_SUBPAGE to 4096, in a bid to improve memory efficiency. 2001-10-07 12:45:03 +00:00
bjh21 6b3d54743f Install <machine/pte.h>. 2001-10-06 20:30:02 +00:00
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
bjh21 6e82ab9796 Wrap boot26 in a minimal relocatable module. When *RMRun, it just copies the
existing boot26 code to 0x8000 and runs it.
2001-08-02 23:55:55 +00:00
bjh21 3e749936d6 Script to generate a help string for a RISC OS module from the same sources
as newvers_stand.sh uses.
2001-08-02 23:47:07 +00:00
bjh21 4eebbc71e2 Don't force booters to have srt0.S at the start if they don't want to.
Also allow them to override the filetype they end up with.
2001-08-02 23:38:04 +00:00
bjh21 a2ac0e50f5 Bump version number for loadfile changes. 2001-08-02 20:24:03 +00:00
bjh21 1ede42fe57 Add <machine/sysarch.h> to go with sysarch(). 2001-07-28 19:14:00 +00:00
bjh21 c5ae075e50 Add a very simple sysarch() implementation so that libarm32 will work.
This should go when arm26 uses cpufunc like everyone else.
2001-07-28 19:12:50 +00:00
bjh21 0847de74d2 Add copyright notices. Use MEMC_PHYS_BASE rather than 0x02000000. 2001-07-28 13:49:25 +00:00
bjh21 ddf906b00d Use ld -N (OMAGIC), since this saves the 32k of RAM (by not putting a gap
between text and data) and means that loadfile only needs one backward seek
to load the file rather than two (which is important for gzipped kernels).
2001-07-28 13:48:32 +00:00
bjh21 f3b9fa04ed Only declare kernel objects ifdef _KERNEL. 2001-07-28 12:53:06 +00:00
bjh21 ec79dd3942 Add installation glue. 2001-07-28 12:44:54 +00:00
bjh21 9139a37393 New arm26 bootloader. Mostly a translation of BBBB into C, using libsa so
we get goodies like gzipped kernels for free.
2001-07-27 23:13:49 +00:00
bjh21 0ad24007df Add assorted stuff that we need in order to shut RISC OS down cleanly. 2001-07-27 23:09:15 +00:00
bjh21 d8372315a2 Rudimentary OS_Byte support, and an extra VDU variable. 2001-07-27 21:10:04 +00:00
bjh21 d939fd1e55 Add support for OS_ReadVduVariables, with #defines for the variables that BBBB
uses.
2001-07-27 20:49:09 +00:00
bjh21 a24c2adedf Limit the heap so as to allow 4 KB of stack, which should be enough for most
purposes.
2001-07-27 20:48:20 +00:00
bjh21 ea2ae3689c Twiddle. 2001-07-27 01:03:34 +00:00
bjh21 f68048b4eb Fix bug in xosgbpb_read: Check the correct register when deciding whether to
store result.
2001-07-27 01:02:44 +00:00
bjh21 5080e94490 OS_Args only really has two cases (reading and setting values). Use a generic
assembler veneer for each of these, and implement the calls to read and set
specific values as macros.
2001-07-27 00:37:38 +00:00
bjh21 2256fe3c2a Clear the BSS at startup, since objdump --outputformat=binary seems not to
output the BSS.
2001-07-27 00:21:18 +00:00
bjh21 218ce892b1 Fix up a left-over SWINE in os_writec. 2001-07-27 00:00:25 +00:00
bjh21 7a181053ec Makefile for building standalone programs to run under RISC OS.
Not used yet, but it will be.
2001-07-26 22:16:26 +00:00
bjh21 9315195522 Simple library to interface stand-alone programs to RISC OS.
This comes in two parts:  riscoscalls.[Sh] provide definitions, and thin
wrappers around RISC OS SWIs (in the style of OsLib) for the use of both the
rest of the library and client code.  The rest of the library provides a
compatibility layer for libsa.
2001-07-26 22:11:08 +00:00
abs 01b024cd5b Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
2001-07-08 16:32:12 +00:00
bjh21 b8a09ee766 Add dummy "podloader" functions on arm32, and move their declarations to the MI
header file.  This should allow MI drivers to use the podloader functions,
though obviously they'll have to be able to cope if podulebus_initloader()
fails.
2001-07-04 13:58:04 +00:00
bjh21 0be64cc691 Move "podulebus" and "podloader" declarations up into files.podulebus. 2001-07-04 13:49:24 +00:00
bjh21 c6c9e5d915 Act as an entropy source for rnd(4). 2001-07-02 23:49:17 +00:00
bjh21 4397eef459 Make cpu_reboot do all the standard things. 2001-06-30 16:49:16 +00:00
bjh21 1b14f7d532 Also make it return something. See, Ben, you _do_ need to test every change. 2001-06-30 16:20:37 +00:00
bjh21 f7968131c1 Make arcvideo_show_screen() into a no-op, since it gets called on shutdown. 2001-06-30 16:19:12 +00:00
darcy ce0ec1e208 Add System V semaphore resource limits to each GENERIC file that has an
option for System V semaphores.  It appears that there are no overrides
in the code and each file has the following added.

 options    SYSVSEM     # System V semaphores
+#options   SEMMNI=10   # number of semaphore identifiers
+#options   SEMMNS=60   # number of semaphores in system
+#options   SEMUME=10   # max number of undo entries per process
+#options   SEMMNU=30   # number of undo structures in system
 options    SYSVSHM     # System V shared memory

If anyone thinks that this is incorrect for any of these files, please
correct it.

Note - the i386 port was not forgotten.  It was done separately.
2001-06-30 11:00:31 +00:00
bjh21 7a42a10e95 Gratuitous spelling corrections:
10base2  -> 10BASE2
10baseT  -> 10BASE-T
10baseFL -> 10BASE-FL
2001-06-28 23:01:55 +00:00
bjh21 e0e53bb8fe Change the DUBUG check on interrupt depth in do_fault() into a KASSERT, since
we're never allowed to call uvm_fault from an interrupt.
2001-06-26 19:37:18 +00:00
bjh21 ead93c630b Chomp out the old, unused undefined_handler(). 2001-06-26 19:22:02 +00:00
bjh21 7acb229356 Sync with GENERIC. 2001-06-24 10:36:09 +00:00
bjh21 ea6baf5775 Add dtide, hcide, oak and atapibus, since these all seem to work now. 2001-06-24 10:34:26 +00:00
wiz 3f9984fc90 `existent', not `existant' 2001-06-19 13:42:07 +00:00