Commit Graph

50942 Commits

Author SHA1 Message Date
augustss
9a444aef81 Get rid of unused abort_handle. 2001-11-10 17:11:38 +00:00
augustss
21f0709fbe Abort any xfers on the control pipe before closing it on detach. 2001-11-10 17:10:42 +00:00
augustss
ff875692db Improve dump routines. 2001-11-10 17:09:28 +00:00
augustss
3d3d59f852 Fill the companion controller array. 2001-11-10 17:07:21 +00:00
augustss
1b0216af5c Add some register defines.
Print companion controllers.
2001-11-10 17:06:11 +00:00
augustss
3d963db4f2 Add some dump routines for debugging. 2001-11-10 16:54:56 +00:00
augustss
02186d8353 Small portability improvement. 2001-11-10 16:53:32 +00:00
augustss
c64847f048 If the RTC gives a time more than 1000 days before file system time then
use the file system time.  (My iMac seems to give 1904 as the year very
often (dead battery?), and setting the correct date with ntpdate doesn't
seem to work.)
2001-11-10 15:37:40 +00:00
lukem
e4b00f433c add RCSIDs 2001-11-10 13:33:40 +00:00
lukem
cd13721ca0 add RCSIDs 2001-11-10 13:22:20 +00:00
lukem
0ffad69384 add RCSIDs 2001-11-10 10:59:08 +00:00
lukem
b616d1ca1d add RCSIDs, and in some cases, slightly cleanup #include order 2001-11-10 07:36:59 +00:00
wdk
7f5269c58f NetBSD Disklabel and SGI Volume header support. Based on NetBSD/mipsco
due to its similarities.

Patch has been tested by many people on the sgimips list for some time with
no complaints.

Contributed by: Christopher SEKIYA <wileyc@rezrov.net>
2001-11-10 07:35:17 +00:00
wdk
de81761c50 Complete overhaul of WD33c93 SCSI driver
- Full support for SCSI-2 Tagged commands (enabled by default)
 - Implement save and restore datapointer messages
 - Formalize interface between MI and MD drivers.
 - decouple interface between MD driver and DMA routines
 - Use scsipi layer where appropriate (Tags, Sync Negotiations etc)
 - control blocks stored using kernel pool(9) functions
 - evcnt(9) compliant counters
 - Enable advanced features on later WD33c93 chips.
   (Identify message out phase is hardware assisted)
 - Improved timeout support (one per active control block)
 - Improved MESG_IN and MESG_OUT handling
 - Start to tidy up debugging output
 - Numerous bug fixes and cleanups throughout

Changes are based largely on the NCR53c9x MI driver for ideas on
how to DTRT.
2001-11-10 07:32:42 +00:00
chs
9f52e62b73 fix the previous change: use the correct test for a block number
referring to a direct block.
2001-11-10 07:11:00 +00:00
shin
82c810212c make this compile without DDB. 2001-11-10 06:56:35 +00:00
sato
c702430929 MCR-300/310/320/330/for Docomo have same PWCTL_LCDLIGHT, PWCTL_LCD port. 2001-11-10 04:53:47 +00:00
thorpej
615b7aff22 Delete an option that doesn't really exist. 2001-11-10 00:18:17 +00:00
thorpej
fa6ae96384 This file is not used. 2001-11-10 00:13:58 +00:00
thorpej
f03c5f5a7c Add VERBOSE_INIT_ARM and SYMTAB_SPACE options (commented out). Add
devices: iopxs (i80312 Companion I/O), pci, ppb, fxp, inphy, ukphy.
2001-11-10 00:11:11 +00:00
thorpej
8a0624f3a4 Add some missing backslashes. 2001-11-09 23:36:52 +00:00
thorpej
d1f4bf74ca Add support for PCI DMA on the i80312. We currently just do
DMA via the Secondary Inbound window, for now.  Will probably
need to revisit this at some point.

Require that the board-specific i80312 front-end slice off a
subregion for the memory controller before calling i80312_attach(),
and fix a bug in the IQ80310 front-end that caused the Secondary
Inbound window to be configured incorrectly.
2001-11-09 23:15:52 +00:00
thorpej
3797f5214d Fix typos in determing the ATU and PPB bus numbers. 2001-11-09 22:47:48 +00:00
thorpej
c3dc4c8c9e Add PCI_NETBSD_CONFIGURE. 2001-11-09 20:59:39 +00:00
thorpej
393b381a6d PCI interrupt mapping support for the IQ80310. 2001-11-09 20:58:57 +00:00
scw
45e7238a02 Bump the version numbers of all bootloaders which use loadfile_elfXX() now
that it tries hard to avoid backwards seeks.
2001-11-09 19:53:11 +00:00
thorpej
d32191e3da Add support for configuring the PCI bus (starting with the Secondary
bus only, for now).

XXX Some cleanup wrt. pci_conf_interrupt() needs to happen.
2001-11-09 19:48:35 +00:00
thorpej
b1ec255377 Add a "firstbus" argument to pci_configure_bus(), indicating the
first bus number to use, rather than always assuming that we should
start at bus #0.
2001-11-09 19:29:12 +00:00
christos
c89e803d30 Remove USB copyrights. The coff and elf loading code did not come with BSD4.4. 2001-11-09 19:27:25 +00:00
thorpej
716af300ee In query_bus(), use the parent pciconf_bus_t's PCI chipset tag,
not the new bus's (which is potentially uninitialized when some
calls are made).
2001-11-09 19:20:19 +00:00
thorpej
671a1b111f Print the fault PC for non-USR Prefetch Aborts. 2001-11-09 19:04:23 +00:00
scw
f1defc3543 To avoid backwards seeks on sequential devices (eq. QIC tapes), read all
the program headers in one operation into an internal buffer.
2001-11-09 18:31:08 +00:00
scw
439d3ea3cb G/C some debug printfs inadvertently left in the last commit. 2001-11-09 18:27:59 +00:00
scw
2f42a5932e Implement just enough of an lseek() to keep loadfile_elf32() happy.
While I'm here, bump RAWFS_BSIZE up to 8192 since the installation
instructions use "bs=8k oconv=sync". My Archive Viper now streams
nicely while booting.
2001-11-09 18:25:11 +00:00
scw
dca93f1b48 The success/failure status for some Bug syscalls is indicated by the Z
flag in the status register, not by a value on the stack.

How this ever worked for so long is beyond me...
2001-11-09 18:18:19 +00:00
thorpej
82c11eec1c Clear the Master Abort after reading config space for a non-existent
PCI device.  Disable debugging messages, as PCI config space works now.
2001-11-09 18:04:10 +00:00
thorpej
42a10f6cd4 Implement a badaddr_read() routine which performs a load of the
specified size for the caller, and returns true or false indicating
whether or not a Data Abort occurred (i.e. the address was "bad").
2001-11-09 17:58:00 +00:00
thorpej
d16c00cfb2 Disable the ATU interrupt sources (i.e. interrupts that occur when
we get Master or Target aborts).
2001-11-09 17:44:43 +00:00
thorpej
10392361f8 Make the DDB trace output a lot easier to look at. 2001-11-09 16:49:29 +00:00
augustss
495b9bd7d5 Fix a bug in xfer abort processing when the HC executes ahead of what
the driver aborts.
Don't block RHSC interrupts.
2001-11-09 15:01:57 +00:00
augustss
3dd8433864 Add a debug message. 2001-11-09 14:59:11 +00:00
thorpej
13aa19d0fc Eval boards usually don't have boot loaders. If we're lucky, we
have firmware that understands ELF.  We're usually stuck with S-Records.
To make life easier, attempt to stuff kernel symbols into the image
with dbsym(8).

If the kernel doesn't have SYMTAB_SPACE, or if the SYMTAB_SPACE is too
small, the kernel build continues as normal; this is just a convenience
measure.
2001-11-09 07:39:25 +00:00
thorpej
147b1bdc1c Add some rudimentary support for ELF symbols in DDB on the ARM ports.
On platforms which load the kernel sans symbols directly from firmware
(possibly in e.g. S-Record format), call ddb_init() with empty arguments,
so that it will search any compiled in SYMTAB_SPACE.  On all other platforms,
if __ELF__, also call ddb_init() with empty arguments until ELF bootloaders
which pass symbol information are ready.
2001-11-09 07:21:37 +00:00
thorpej
47514a31be Remove unneeded declarations of the db_machine_init() function. The
ARM ports are the only ones that actually have one, and it is about
to change.
2001-11-09 06:52:23 +00:00
augustss
1315ed7da5 Regen. 2001-11-09 05:49:53 +00:00
augustss
1018a07d67 Add a device (from OpenBSD). 2001-11-09 05:49:09 +00:00
matt
e85e9a59a1 Make this compile under ELF. 2001-11-09 05:31:44 +00:00
thorpej
b72e770a8a IQ80310-specific setup for the i80312 Companion I/O chip driver. 2001-11-09 03:31:37 +00:00
thorpej
660b98b7dc Snapshot of work-in-progress for Intel i80312 Companion I/O chip;
just basic Inbound and Outbound window setup is done, PCI configuration
space access (not quite working yet), and I/O and Memory space routines
so far.
2001-11-09 03:27:51 +00:00
simonb
0000c94242 Delete "break"s and "return"s after the math_abort() macro, which itself
finishes with a "return".
2001-11-09 00:38:57 +00:00
thorpej
3130a93ac8 Remove unnecessary prototypes for zero_page_read{only,write}(). 2001-11-09 00:34:34 +00:00
eeh
d0f2652711 Overhaul the interrupt system to use hardware interrupts directly. 2001-11-08 23:28:13 +00:00
scw
61fd713a11 Commit a change I've had lying around for a while: Initialise wired
PTEs with `PG_U' to avoid them being needlessly updated when first
accessed.
2001-11-08 21:53:44 +00:00
scw
05c8b8d35b Fix a couple of uninitialised variable warnings with New Toolchain. 2001-11-08 21:41:42 +00:00
scw
a1cf047679 Fix a couple of uninitialised variable warning with New Toolchain. 2001-11-08 21:40:25 +00:00
bouyer
f7bc541779 Fix a memory leak when we change pl_corename several times. 2001-11-08 21:24:47 +00:00
christos
64a6ea2e08 Regen. 2001-11-08 17:05:58 +00:00
christos
c7a7458e1e PR/14503: Cesar Crusius: Add Xircom XE2000. 2001-11-08 17:05:42 +00:00
reinoud
a822070813 Note the addition of arch/acorn32 as Acorn's line of ARM 6,7,SA machines. 2001-11-08 16:47:51 +00:00
christos
e415081a60 PR/14498: Wesley Chen: Identify loaded modules vs. kernel, because we don't
load the elf header with them.
2001-11-08 15:01:35 +00:00
christos
500d44e36c PR/14498: Wesley Chen: Print a return after enumerating the matching symbols. 2001-11-08 15:00:17 +00:00
haya
fd0fac251e Regen w/ devlist2h.awk ver 1.4. 2001-11-08 09:08:41 +00:00
haya
ba93570e3c Bugfix; to create compilable pcmciadevs_data.h. kern/11659 2001-11-08 09:02:17 +00:00
gmcgarry
2cd41580a7 Make install observe ${INSTPRIV} 2001-11-08 07:45:25 +00:00
gmcgarry
12b20b6dde Use crufty old clock-handling code for now. 2001-11-08 07:01:33 +00:00
gmcgarry
f410d2f08f Implement bus_space_vaddr() 2001-11-08 06:32:02 +00:00
gmcgarry
3fe33b077f Reserve for wscons. 2001-11-08 06:27:45 +00:00
lukem
27cc5a5d37 add RCSID 2001-11-08 05:59:31 +00:00
chs
81625d675b the previous fix (in rev. 1.26) for hangs when the filesystem is full
was wrong, so fix it right this time.  undo the previous change and
instead, replace the troublesome VOP_FSYNC()s with code that just flushes
the particular indirect blocks that we allocated.  this resolves the
softdeps for those blocks.  then we can change the pointer for
the first indirect block we allocated to zero, write that, and finally
invalidate all the indirect blocks we've touched.  also, wait until
after we finish all this before freeing any blocks we allocated.
fixes PRs 14413 and 14423.
2001-11-08 05:27:25 +00:00
chs
df71d3fadc in both paths that can cause fragments to be expanded (write and truncate-up),
deal with the fragment expansion separately before the rest of the operation.
this allows us to simplify ufs_balloc_range() by not worrying about implicit
fragment expansion.

call VOP_PUTPAGES() directly for vnodes instead of
going through the UVM pager "put" vector.
2001-11-08 05:24:52 +00:00
chs
0de5f1ba39 only call ufs_getlbns() for blocks which involve indirects, and assert
that this is so.  use a shift instead of a multiply in one place.
2001-11-08 05:00:51 +00:00
chs
f57fce8e9e call VOP_PUTPAGES() directly for vnodes instead of
going through the UVM pager "put" vector.
2001-11-08 04:51:05 +00:00
thorpej
64d042b3b3 Correct a comment. 2001-11-08 04:18:46 +00:00
thorpej
05dfd6cada * Define fixed virtual addresses for the Primary and Secondary
PCI I/O spaces, as well as the i80312 PMMRs.  Map these regions
  in early bootstrap along with the on-board device address space.
* Adjust call to i80312_sdram_bounds() for the new way the PMMRs
  are defined in i80312reg.h
* Word around some serious braindamage in RedBoot -- RedBoot uses
  the on-board Ethernet to TFTP the kernel image.  However, it does
  not stop the Ethernet before transferring control to the loaded
  program.  This means that if it happens to receive another packet
  (broadcast/multicast/unicast), it will happily scribble over the
  memory of the new running program.  Work around this problem by
  performing a secondary-bus-reset on the i80312's PPB.  XXX This
  could be problematic if we ever encounter an application where
  the i80312's PPB is actually used as a passthrough PPB.
2001-11-08 03:28:53 +00:00
thorpej
64f23a2423 Adjust the way the PMMRs are defined -- offsets from a base, not
absolutes.  Also, add PPB and more ATU registers.
2001-11-08 03:20:36 +00:00
thorpej
4cd18f3872 Fix the Bridge Control Register bit definitions, add ones that
appeared in PCI 2.2.
2001-11-08 03:18:12 +00:00
lukem
6ff2f2f438 add RCSID. (note; this file gets #included) 2001-11-08 02:42:31 +00:00
lukem
ec6245465a add RCSID 2001-11-08 02:39:06 +00:00
thorpej
f30c8426f2 Fix delay(). 2001-11-08 02:12:05 +00:00
christos
c7be54ce17 increase the size up to the max for the floppy. 2001-11-08 02:11:38 +00:00
aymeric
77dd4deaa6 introduce an interrupt_depth variable which counts how nested we are into
interrupts.
This allows hardclock() to account for the time spent in interrrupts, and
as a side-effect, top(1), systat(1) and others will no more report 0% of
interrupt activity.

mvme68k does that already.
2001-11-07 23:25:03 +00:00
thorpej
ea1dce5b44 Regen; correct i80312 description. 2001-11-07 21:13:26 +00:00
thorpej
4fd2586143 Correct i80312 description. 2001-11-07 21:12:49 +00:00
bjh21
ec2fc79a18 Diagnostic panics should be enabled when DIAGNOSTIC is defined, not undefined. 2001-11-07 20:04:52 +00:00
bjh21
479d71be35 Add support for feeding entropy to rnd(4). 2001-11-07 20:01:58 +00:00
bjh21
a2d0fc8a64 Small debugging improvements. 2001-11-07 19:53:19 +00:00
bjh21
c11b878473 Detect overruns before reading any data. This makes overruns easier to
understand.
2001-11-07 19:52:59 +00:00
bjh21
67feec8608 Lose options GATEWAY. 2001-11-07 19:45:48 +00:00
thorpej
a3c15f8aaf Regen; add Cyclone PCI-700 (IQ80310). 2001-11-07 18:55:29 +00:00
thorpej
bbc76f7954 Add product ID for the Cyclone PCI-700 (IQ80310). 2001-11-07 18:53:51 +00:00
augustss
a7fd78b8b5 Fix a bug in the DIAGNOSTIC version of the detach. 2001-11-07 14:13:35 +00:00
chs
1d7213c91a only acquire the lock for swpgonly if we actually need to adjust it. 2001-11-07 14:07:23 +00:00
augustss
4cfba4290a Ad a debug message. (With { } this time.) 2001-11-07 13:36:43 +00:00
enami
58a47f4ae2 Have necessary braces. 2001-11-07 12:57:33 +00:00
bjh21
54407dd7d8 Sync with IANA. This finally gets us IFT_ECONET. 2001-11-07 12:14:17 +00:00
yamt
4475186a1d correct comment. 2001-11-07 10:52:08 +00:00
yamt
5fa0dfa754 use biosdelay instead of adhoc loop. 2001-11-07 08:46:24 +00:00
chs
ac48df1681 only acquire the lock for swpgonly if we actually need to adjust it. 2001-11-07 08:43:32 +00:00
itojun
e2df911079 do not grab packet to joined multicast group, when ip6_dst and in6p_laddr
mismatches.  it makes the behavior more closer to 4.4BSD IPv4 code.
sync with kame
2001-11-07 06:30:50 +00:00
enami
7b7e3f6b7e Wrap long line and remove name of argument from function prototype. 2001-11-07 04:56:09 +00:00
enami
8e5afc2cbe Make the size of null node hash table to desiredvnodes instead of 16. 2001-11-07 04:55:26 +00:00
enami
888e968e4d Call hashdone where appropriate. 2001-11-07 04:21:26 +00:00
enami
579ece8405 Cosmetic changes. 2001-11-07 04:15:41 +00:00
enami
9af6d646c2 Fix typo in comment. 2001-11-07 04:04:10 +00:00
augustss
2158da33e3 Improve diagniostic message. 2001-11-07 03:26:06 +00:00
thorpej
9cc2517cfe When we read the interrupt status bits, mask it with the shadow copy
of the "currently enabled interrupts" -- the CPLD appears to light
up the status bit even if it doesn't cause the CPU IRQ line to be
asserted.
2001-11-07 02:56:18 +00:00
augustss
14e5f669c2 Improve some debug messages. 2001-11-07 02:55:04 +00:00
augustss
6e85b5b6c5 Add a workaround for broken ports (e.g. macppc) that do not call
cnpollc before cngetc in DDB.  DDB now works with USB console on Macs.

Don't frob the LEDs if nothing changes.
2001-11-07 02:52:47 +00:00
thorpej
0ea59754f1 We were already cheating w/ CPLD register access, so cheat all the
way and use pointer derefs rather than bus_space to access them.
2001-11-07 02:24:18 +00:00
thorpej
4a2c5fd66d * Pass the IRQ number to stray_irqhandler() and display it in
the panic message.
* Mask off undefined bits from the XINT3 and XINT0 registers in the CPLD.
2001-11-07 02:06:37 +00:00
thorpej
acf9a688a0 Rework and fleshing out of Intel IQ80310 XScale eval board support.
More work to do -- this is a snapshot of work-in-progress.
2001-11-07 00:33:22 +00:00
thorpej
492b42cff8 Garbage collection. 2001-11-07 00:19:13 +00:00
thorpej
b9364bb468 First cut at XScale setup code. Needs more work. 2001-11-07 00:17:36 +00:00
thorpej
46309d6bc6 Const poisoning of cpu/class names. 2001-11-06 20:39:13 +00:00
thorpej
5b3f78d953 "i80200", not "80200". 2001-11-06 20:02:13 +00:00
thorpej
f12c8ee306 "XScale", not "Xscale". 2001-11-06 19:59:43 +00:00
thorpej
daae0ad947 If BOARDTYPE == iq80310, make an S-records version of the kernel
as well.
2001-11-06 19:53:22 +00:00
thorpej
e8982cb969 Make it possible for Makefile.${MACHINE}.inc to provide extra
stuff at the end of SYSTEM_LD_TAIL.
2001-11-06 19:52:21 +00:00
augustss
a1ba73d6c3 Add a quirk for a USB CD/RW. 2001-11-06 13:31:20 +00:00
augustss
80c2d1c262 Regen. 2001-11-06 12:59:45 +00:00
augustss
0c8d23832b Add DMI CD/RW drive (my first USB 2.0 device!). 2001-11-06 12:59:17 +00:00
augustss
4469f30685 Add some USB 2 related definitions. 2001-11-06 12:29:48 +00:00
itojun
087b694325 too many curly brace. 2001-11-06 08:14:27 +00:00
chs
2ed88fe090 several changes prompted by loaning problems:
- fix the loaned case in uvm_pagefree().
 - redo uvmexp.swpgonly accounting to work with page loaning.
   add an assertion before each place we adjust uvmexp.swpgonly.
 - fix uvm_km_pgremove() to always free any swap space associated with
   the range being removed.
 - get rid of UVM_LOAN_WIRED flag.  instead, we just make sure that
   pages loaned to the kernel are never on the page queues.
   this allows us to assert that pages are not loaned and wired
   at the same time.
 - add yet more assertions.
2001-11-06 08:07:49 +00:00
chs
6fbca7d0fc use pmap_kenter_pa() instead of pmap_enter(), this is required for
pages loaned to the kernel.  this implies that we also need to
call pmap_kremove() before uvm_km_free().

other general cleanup:  remove argument names from prototypes,
rename some variables, etc.
2001-11-06 07:30:14 +00:00
simonb
cf63a6b052 Remove some variables that are set but never used. 2001-11-06 07:20:37 +00:00
simonb
86c9e7e6d2 In procfs_domem() the addr variable is only needed if PMAP_NEED_PROCWR is
defined.
2001-11-06 07:20:08 +00:00
simonb
9b90ed2100 Remove some variables that are set but never used. 2001-11-06 07:18:14 +00:00
simonb
fa50959ec6 Remove a variable that is set but never used. 2001-11-06 07:15:34 +00:00
simonb
c56d879335 Remove some variables that are set but never used. 2001-11-06 07:11:29 +00:00
simonb
915441c64b Use the sector size from the partition info, not a hard-coded value. 2001-11-06 07:09:39 +00:00
simonb
ecf09baab6 Remove a variable that is set but never used. 2001-11-06 07:08:09 +00:00
simonb
bb57e2c53c Remove some bogus checks for unsigned variables < 0. 2001-11-06 06:59:05 +00:00
simonb
6129c87d2e Remove superfluous semicolon. 2001-11-06 06:40:44 +00:00
simonb
82649768b7 Change some unsigned int variables and parameters to plain ints so
that all usages of those agree on unsigned vs. signed.
2001-11-06 06:31:06 +00:00
simonb
819bb532e6 Remove some variables that are set but never used. 2001-11-06 06:28:22 +00:00
matt
b26f63f404 Fix pr#14481 2001-11-06 06:26:34 +00:00
matt
1f09ca6e53 Fix a small buglet in syncicache (if the area to sync crosses the
segment 0 boundary).
2001-11-06 06:25:28 +00:00
chs
6e1dd2fa31 add an assert and rename some variables. 2001-11-06 05:44:25 +00:00
chs
d8cbdbb0da in uvm_exit(), don't bother to unwire the uarea before we free it,
the pages will be freed anyway.
2001-11-06 05:34:42 +00:00
chs
07d2ec83fe don't call pmap_copy() from uvmspace_fork().
a new process is very likely to call execve() immediately after fork(),
so most of the time copying the pmap mappings is wasted effort.
2001-11-06 05:27:17 +00:00
simonb
15a42388c0 In pmap_enter(), sync the instruction cache if VM_PROT_EXECUTE. Fixes
problems when executing programs where text is copied to a page without
a dma sync (like NFS data bcopy'd to a buffer cache page).

From discussion with Jason Thorpe and Eduardo Horvath.
2001-11-06 04:49:49 +00:00
augustss
cd86b27aad ehci can attach to cardbus too. 2001-11-06 03:18:53 +00:00
augustss
58de8e2de6 Add ca_bus field. 2001-11-06 03:18:18 +00:00
augustss
7ae1e6394f Add some data structures to keep enable finding companion controllers
for EHCI.
2001-11-06 03:17:36 +00:00
augustss
c342a3beab Add some useful macros. 2001-11-06 03:16:17 +00:00
augustss
d8cebea1fc Make some messages only appear with bootverbose.
Add bus number to attach args.
2001-11-06 03:11:10 +00:00
enami
03b4b0dfdd Use options<SPC><TAB> consistently (except for GENERIC_ISDN since it is
indented rather differently).
2001-11-06 01:57:06 +00:00
simonb
e716956a0e Calculate the hardware interrupt to irq mapping array and irq mask from
the irq to hardware interrupt mask map instead of using two different
interrelated arrays and a bit mask that I've got wrong more than once
when updating by hand (including when I recently added the keyboard/mouse
interrupt mappings).  Now only the galaxy_intr_map[] array needs to
be updated when adding extra interrupts.
2001-11-06 01:26:47 +00:00
thorpej
af0d2bf570 Config info for the i80312 XScale companion I/O chip. 2001-11-05 23:38:55 +00:00