Commit Graph

297 Commits

Author SHA1 Message Date
ragge 69a66687f8 Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
2003-04-26 11:05:05 +00:00
ragge 766d04f56a Add ksyms device major. 2003-04-25 21:10:46 +00:00
bjh21 6a8eedfd87 KNF doesn't apply to Reinoud -- back out my last two changes. 2003-04-20 18:50:38 +00:00
bjh21 b196917760 KNF 2003-04-20 15:57:12 +00:00
bjh21 610cdc7b39 Create a symlink to sys/arch/arm/include alongside the one to
sys/arch/${MACHINE}/include.
2003-04-20 14:37:59 +00:00
bjh21 ef40902514 80 columns, dammit! 2003-04-20 14:21:13 +00:00
bjh21 6141355bbc Fix format string mismatch. 2003-04-19 19:55:07 +00:00
thorpej 0871fe346f Use PAGE_SIZE rather than NBPG. 2003-04-09 01:54:42 +00:00
thorpej cc2c493bc4 Use PAGE_SIZE rather than NBPG. 2003-04-02 07:35:54 +00:00
thorpej 720768a1f5 Use PAGE_SIZE rather than NBPG. 2003-04-01 23:47:01 +00:00
thorpej 89a25a097c Use PAGE_SIZE rather than NBPG. 2003-04-01 02:13:53 +00:00
perseant eab869e1c0 Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
2003-02-27 19:22:36 +00:00
thorpej 20c4b7b844 Change pcb32_pagedir to a paddr_t (after all, it's used as a paddr_t
everywhere in the code).
2003-02-23 23:40:01 +00:00
chris 343db78b58 Add NEVENT1 and 2 as interrupt lines. Simtec docs for their 7500 board
refer to them as such (as does the ARM 7500FE pdf)
2003-02-08 17:45:49 +00:00
perry 4c5a18c475 correct grammar and use use 2003-02-04 23:40:21 +00:00
thorpej c050d9efe1 Fix printf format from daddr_t changes. 2003-01-31 02:05:41 +00:00
bouyer 4bce909c04 bzero the part of the buffer used to pad the packet to
ETHER_MIN_LEN - ETHER_CRC_LEN.
2003-01-20 14:59:27 +00:00
thorpej 23bc250391 Merge the nathanw_sa branch. 2003-01-17 21:55:23 +00:00
reinoud e2dacd3f22 Small typo and add initialisation for the `bank' counter 2003-01-15 16:29:27 +00:00
reinoud 4a291c5614 Fixup serious loading problems (together with the former commit of start.S)
major code cleanup esp. types used. Also cleanup up a major BUG that for
some odd reason worked :-/ makes me puzzled. It signifies that there might
be copies around in physical space of the DRAM ??? and thus its function
was motherboard dependent? It must have been old cruft from before the
cleanup of the relocation engine.
2003-01-08 16:10:53 +00:00
reinoud 34ce26d1fc From the comment :
/*
 * The size of the code/data to be moved is not `end - rmbase' but
 * `__bss_start__ - rmbase' for the module is loaded into RISC OS
 * based on the filesize where as NetBSD doesn't have to include all
 * the bss space into the file itself. In some odd cases the
 * relocatable module area can be smaller than the module + bss and
 * thus bomb out.
 */
2003-01-08 15:29:09 +00:00
reinoud cb83efc9b8 Fix miscelanious small errors that arose from having non Mb aligned memory
for the videoscreen.
2003-01-06 22:46:36 +00:00
reinoud 7cffe83841 Small fixes that showed up during boot-testing of a Pace DSL4000 running
the RISC OS-STB 4.0.0 version of RISC OS.
2003-01-06 18:22:00 +00:00
lukem 4bb41ae2f2 Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile.  Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
2003-01-06 17:40:18 +00:00
reinoud 3630c2d8c4 Remove loadfile_machdep.h from being installed 2003-01-06 17:00:12 +00:00
reinoud 340ca7145e We have version 3.02 now : just a small fix for bootkernel name guessing. 2003-01-06 02:54:03 +00:00
thorpej 81c6d35e2b Remove obsolete MACHINE_ARCH -> arm32 2003-01-03 02:40:57 +00:00
reinoud c065f11230 Oeps... forgot the versions file 2003-01-02 01:05:35 +00:00
thorpej 5001cdaf1f Use aprint_normal() for cfprint routines. 2003-01-01 00:25:01 +00:00
reinoud 006384eaed In the case there is just one SIMM and one memory bank from the SIMM things
got wrong when no VRAM was there.

Placing the video DRAM in front of the kernel is OK when its 1Mb since the
kernel wants to be on a Mb boundary. Placing the video DRAM in the last
SIMM bank at the front is also OK unless there is just one SIMM and just one
bank; then it got in the way again!

Solution is to put the DRAM at the end of the SIMM instead of the beginning!
This however can result in the non 16 kb alignment of the top of physical
RAM where the temporary L1 page tables are situated. If its not 16 kb aligned
then move the L1 page table address down and down until it is 16 kb aligned.
This memory will be reused later on anyway.

What to do when we really support changing screensizes... see it as a max?
or use a different sceme alltogether? It might not even be a bootloader
problem then allthough its memory is not showing up in the DRAM/VRAM
block counts wich needs to be fixed one day.
2002-12-30 15:54:46 +00:00
reinoud 2f6fe363fa Since we dont support switching screenmodes (yet) we might as well claim
just enough for the screenmemory to be in instead of the maximum of 1Mb.
Small machines like my 8Mb NC get a 700 kb back and thats really noticeable.
2002-12-30 03:30:16 +00:00
reinoud 3e5225eafa If we don't have VRAM then at least account the screensize correctly :) it goes
pretty wierd if it is set wrongly.
2002-12-30 02:19:20 +00:00
reinoud 33ae7765a1 If we nick memory from the DRAM for video then please account it correctly! 2002-12-30 02:05:12 +00:00
reinoud f223d87792 Typo and comments 2002-12-29 22:41:08 +00:00
reinoud 24dac6bf26 The unique machine ID is used in some networking stuff to generate a
unique-ish number, so better add it again!
2002-12-29 00:30:40 +00:00
reinoud bf5fbfa164 Update the NetBSD part for the bootloader change. Mostly the changes in
bootconfig.h needs reflection
2002-12-29 00:02:20 +00:00
reinoud 46dbb0f225 Initial commit of the 3rd generation of bootloaders for the Acorn32
platform. It features far better support for newer architectures and is
fully rewritten in C and compile-able under NetBSD.

Since it shares code with `boot26' for Acorn26 merging the common parts is
likely to be next on the list.
2002-12-28 23:57:36 +00:00
reinoud ca70f10e3b Add the loadfile_machdep.h as needed for native bootloaders 2002-12-28 02:42:13 +00:00
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
wiz e78e668887 Fix typo (responsiness -> responsiveness). 2002-11-22 12:20:58 +00:00
mrg 603098b9b5 implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail.  however, the next time this is
change it will not fail again.

this is just the kernel portion.
2002-11-01 11:31:50 +00:00
jdolecek c82ab2eb79 now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
2002-10-26 13:50:17 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
bsh 7b6639153c make atomic_{set,clear}_bit() inline for arm32 ports, and
add <machine/atomic.h> for them.
2002-10-19 12:22:33 +00:00
junyoung 7e4d58b1b8 Move NEW_BUFQ_STRATEGY to misc options section. 2002-10-19 05:55:09 +00:00
junyoung e4b7588c28 Add NEW_BUFQ_STRATEGY (disabled by default). 2002-10-18 15:11:08 +00:00
bjh21 a9b87645e0 ANSIfy. Un-__P(). 2002-10-15 20:50:01 +00:00
bjh21 7ee3ff8794 KNF -- this file was making my eyes hurt.
No functional change.
2002-10-15 20:46:12 +00:00
elric 5ab71e20b0 Added commented out cgd(4)s to GENERIC configs. 2002-10-14 18:39:22 +00:00
bjh21 75248cc7a1 It appears that MI code requires ci_cpuid to be the CPU number of the CPU
in question, whereas the ARM code was using it to hold the model
identification.  To fix this, rename:

ci_cpuid -> ci_arm_cpuid
ci_cputype -> ci_arm_cputype (for consistency)
ci_cpurev -> ci_arm_cpurev (ditto)
ci_cpunum -> ci_cpuid

This makes top(1) give correct CPU numbers in its "STATE" column (all 0 for
now).
2002-10-13 12:24:57 +00:00
bjh21 d8fd346734 Remember the location of each CPU's idle PCB in struct cpu_info.
Move allocation of the idle PCB from hydra.c to cpu.c and add some
extra initialisation from cpu_fork().
2002-10-12 21:06:46 +00:00
bjh21 a7385c575f Move curpcb into struct cpu_info in MULTIPROCESSOR kernels. 2002-10-12 12:20:08 +00:00
bjh21 8bd749851d Special locking primitives for use in Hydra kernels. These include a cache
invalidation after every lock to ensure that changes made by other CPUs are
visible.  This has nasty performance implications, but it does allow my
Hydrated Risc PC to run printf() on all its CPUs at once without corrupting
the message buffer.
2002-10-07 23:23:53 +00:00
bjh21 c62984115f Turn curcpu() into a macro.
Rename cpu_info_array to cpu_info and make it public.
Add CPU_FOREACH() and friends.
2002-10-06 18:28:48 +00:00
bjh21 1f17ac8831 Remove footbridge and isadma glue -- these no longer seem to be necessary. 2002-10-06 13:05:39 +00:00
bjh21 682415134d Call cpu_setup() and cpu_attach() from cpu_hydra_hatch().
Also simplify cpu_hydra_attach() somewhat.
2002-10-06 12:37:59 +00:00
bjh21 c775c3e73c Give each CPU a struct cpu_info, and have curcpu() return the right one.
Also have cpu_boot_secondary_processors() un-halt all the slave CPUs, and
have them do something visible when that happens.
2002-10-06 11:34:12 +00:00
bjh21 8e25492f64 Make cpu_number() work. 2002-10-06 10:21:50 +00:00
bjh21 f68de9a752 Use HYDRA_ID_SLAVE_MASK rather than 3.
No need for an infinite loop after we jump out of hydra_hatchcode.
2002-10-06 10:21:10 +00:00
provos 2f7a0aaac8 add SYSTRACE; approved perry. 2002-10-06 02:11:54 +00:00
bjh21 bb6b27b143 Second phase of Hydra attachment: All CPUs are now set up sufficiently that
they can call printf(), which they do before halting.
2002-10-05 23:30:03 +00:00
bjh21 389f612a10 Remove spurious comment. 2002-10-05 23:26:48 +00:00
chs ecdf1b4084 add missing protos, clean up includes. 2002-10-05 17:16:33 +00:00
bjh21 3832819227 Minimal changes to allow a kernel with "options MULTIPROCESSOR" to compile
and boot multi-user on a single-processor machine.  Many of these changes
are wildly inappropriate for actual multi-processor operation, and correcting
this will be my next task.
2002-10-05 13:46:57 +00:00
bjh21 7e6e75483b Don't define DEBUG if it's already defined. 2002-10-04 22:46:29 +00:00
elric d19d268a95 assign majors for raw and cooked cgd's. 2002-10-04 18:28:24 +00:00
chris 5dded94793 Fixup IPL_LEVELS to be correct. This matches the change I did to footbridge
based systems.  Untested on shark, but is the right thing to do.  I suspect
the original arm32 intr.h had the bug, and when the ports split we just took
the bug.
2002-10-04 10:21:33 +00:00
thorpej 7c0e5bcc4b Fix script-o's in previous. 2002-10-02 03:31:58 +00:00
thorpej 5a9ddc1422 Use CFATTACH_DECL(). 2002-10-02 02:21:20 +00:00
bjh21 92c36acca6 Report the hardware version in case anyone's interested (I was). 2002-10-01 22:52:22 +00:00
bjh21 cef90c2dc7 Constify ide_versions. 2002-10-01 22:38:56 +00:00
bjh21 7e08b73e47 Use CFATTACH_DECL(). 2002-10-01 22:23:52 +00:00
bjh21 8b39ec99a9 Add a shutdown hook which puts the Hydra back into its post-reset state,
largely to ensure that we don't leave the slave CPUs running when we go
back to RISC OS.
2002-10-01 22:18:00 +00:00
bjh21 b59e2e1320 Beginnings of support for the Simtec Hydra multiprocessor board.
So far, the Hydra is detected and initialised, and each slave CPU is
spun up briefly to check that it works.
2002-09-30 23:22:05 +00:00
thorpej 9a711d6985 Declare all cfattach structures const. 2002-09-27 20:29:02 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
lukem 3ea2e21f82 enable USERCONF by default; it's small and extremely useful to have available. 2002-09-18 02:43:53 +00:00
bjh21 325b2641c5 Cleanup: Remove no-longer-accurate comment, un-__P, ANSIfy, __KERNEL_RCSID,
other light KNF.
2002-09-15 11:27:47 +00:00
bjh21 166f9fdf01 Allocate channel structures as part of the softc rather than malloc'ing them
at run time.  This simplifies the code and avoids problems with uninitialised
variables, and if it's good enough for pciide(4), it's good enough for me.

Also normalise the prefix for channel-specific messages.
2002-09-15 11:00:11 +00:00
bjh21 9da7134dd1 On ARCIN v6 cards, clear the EPROM page latch on shutdown. This seems to be
necessary to allow the card to be detected afterwards.  In theory, this
shouldn't be necessary, since we don't touch the page latch yet, but I'm not
going to argue.
2002-09-14 18:12:16 +00:00
thorpej c0691fd89d Back out previous; it breaks binary compatibility between platforms
in the same MACHINE_ARCH.
2002-09-14 15:54:00 +00:00
mycroft e9a1e15d7e Move some #defines out of _KERNEL. 2002-09-14 12:58:37 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
chris a4e86e6cd5 Found the issue with the kinetic bootloader.
Seems that we assume that the dram blocks are sorted, and that the first/lowest address is also where the kernel is.

If the above is not true, then we're on a kinetic (probably should make a better way to indicate this)  So search for all dram blocks < with starting addr lower than the first block and remove them.

Currently there's minimal performance gain (which is odd as the SDRAM is meant to be faster, I'm wondering if we need to prod some hidden registers to set timing information.

Note that I still get 16MB/s compared with 7MB/s on RiscStation and 93MB/s on my cats.  I'm thinking that something else is seriously nasty on acorn32.
2002-09-03 23:00:40 +00:00
thorpej 77a6866508 Enable caching on kernel and user page tables. This saves having
to do uncached memory access during VM operations (which can be
quite expensive on some CPUs).

We currently write-back PTEs as soon as they're modified; there is
some room for optimization (to write them back in larger chunks).
For PTEs in the APTE space (i.e. PTEs for pmaps that describe another
process's address space), PTEs must also be evicted from the cache
complete (PTEs in PTE space will be evicted durint a context switch).
2002-08-24 02:16:30 +00:00
thorpej 6cc7c1c1ff * Add PTE_SYNC() and PTE_SYNC_RANGE() macros. These don't actually do
anything yet.
* Use PTE_SYNC() and PTE_SYNC_RANGE() in some obvious places, i.e.
  where vtopte() is used.
2002-08-22 01:13:53 +00:00
thorpej 5fddbbe3d5 Do cached memory access to L1 tables, making sure to write-back the
cache after any L1 table modifications.
2002-08-21 18:34:31 +00:00
bjh21 a0549f1aba Remove comment claiming that csc(4) doesn't work. 2002-08-07 14:42:42 +00:00
bjh21 d057306739 Enable csc(4), since it seems to be working now. 2002-08-07 13:40:26 +00:00
briggs 0b956d0b8b Implement pmc(9) -- An interface to hardware performance monitoring
counters.  These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface.  Initially, the Intel XScale
counters are the only ones supported.
2002-08-07 05:14:47 +00:00
bjh21 a69295fb3b Enable csc(4), since it's reported as working. 2002-08-05 23:30:44 +00:00
bjh21 ed8346a525 Rather than forcing on XS_POLL in SCSI transfers ourselves, set
SCSIPI_ADAPT_POLL_ONLY to tell the MI scsipi layer to do it for us.  This,
plus G/Cing some debugging code, removes the card-specific scsi_request
wrappers.
2002-08-05 23:30:04 +00:00
thorpej 79af00bddb Move the calls to uvm_page_physload() out of pmap_bootstrap() and
into platform-specific initialization code, giving platform-specific
code control over which free list a given chunk of memory gets put
onto.

Changes are essentially mechanical.  Test compiled for all ARM
platforms, test booted on Intel IQ80321 and Shark.

Discussed some time ago on port-arm.
2002-07-31 00:20:51 +00:00
thorpej d3aa5664b7 Move the uvm_setpagesize() call to platform-dependent code in preparation
for other changes to pmap_bootstrap().
2002-07-30 16:16:38 +00:00
hannken ba3784ca91 Convert to new device buffer queue interface.
Approved by: Reinoud Zandijk <reinoud@netbsd.org>
2002-07-27 11:09:35 +00:00
thorpej 3912e469dd Rename cdev_systrace_init() to cdev_clonemisc_init(), so it can
be properly used by any misc. cloning device.  While here, correct
a comment to indicate that "open" is the only entry point and that
everything else is handled with fileops.
2002-07-19 16:38:14 +00:00
abs eb73becae2 Ensure all INSTALL config files consistantly include PIPE_SOCKETPAIR,
MALLOC_NOINLINE, and VNODE_OP_NOINLINE. The exceptions are when they
include another config files that already defines the options, or if
they are for an embedded board, just define a few extra options, and
do not already define PIPE_SOCKETPAIR.
2002-07-05 13:40:10 +00:00
bjh21 06eecc6ca0 $Id$ -> $NetBSD$ (oops). 2002-06-19 23:27:48 +00:00
christos 3b50728cf4 MD systrace gluons. 2002-06-17 16:32:57 +00:00