Commit Graph

66703 Commits

Author SHA1 Message Date
bouyer 28c8b4f872 Add atabus. 2003-10-08 11:13:02 +00:00
bouyer ce0aaad119 Adapt for wdcattach() prototype change, and deal with atabus in
device_register().
2003-10-08 11:12:36 +00:00
bouyer e1e231a488 Add atabus. 2003-10-08 11:11:33 +00:00
bouyer b758d4deb3 Adapt for wdcattach() prototype change. 2003-10-08 11:11:06 +00:00
bouyer 88809a6534 Add atabus. 2003-10-08 11:10:54 +00:00
bouyer 8f905677f4 Adapt for wdcattach() prototype change. 2003-10-08 11:10:18 +00:00
bouyer f003412676 Add atabus 2003-10-08 11:10:04 +00:00
bouyer 367dd334c1 Add atabus. 2003-10-08 11:09:26 +00:00
bouyer 9686725046 Add atabus 2003-10-08 11:09:09 +00:00
bouyer e9255b5ae1 Add atabus. 2003-10-08 11:08:07 +00:00
bouyer bcc3968da5 add atabus. 2003-10-08 11:07:50 +00:00
bouyer a690443244 Add atabus 2003-10-08 11:07:04 +00:00
bouyer 2e73ec1205 Add atabus. 2003-10-08 11:06:24 +00:00
bouyer d29ea7aa72 Adapt for wdcattach() prototype change. 2003-10-08 11:06:05 +00:00
bouyer 7a7a287e2c Regen: add atabus. 2003-10-08 11:05:52 +00:00
bouyer f14a2e4df2 Add atabus. 2003-10-08 11:04:56 +00:00
bouyer 8efe26b8cd Adapt for wdcattach() prototype change. 2003-10-08 11:04:32 +00:00
bouyer 102fb2528b Regen: add atabus 2003-10-08 11:03:55 +00:00
bouyer 0a88b9caa1 Add atabus 2003-10-08 11:02:45 +00:00
bouyer 54433c63d2 Add atabus. 2003-10-08 11:02:18 +00:00
bouyer 20b2eaeddb Add atabus 2003-10-08 11:01:38 +00:00
bouyer 923e187eb7 Adapt for wdcattach() prototype change. 2003-10-08 11:01:16 +00:00
bouyer adb3f1c3c5 Add atabus 2003-10-08 11:00:38 +00:00
bouyer b7d355a7b2 add atabus 2003-10-08 10:59:55 +00:00
bouyer 99d6009c2a Make the ATA mid-layer appears as atabus, as proposed in
http://mail-index.netbsd.org/tech-kern/2003/09/25/0006.html
This adds a device (atabus) between IDE controllers and wd or atapibus, to
have each ATA channel show up in the device tree. Later there will be atabus
devices in /dev, so that we can do IOCTL on them.
Each atabus has its own kernel thread, to handle operations that needs polling,
e.g. reset and others.

Device probing on each bus it defered to the atabus thread creation.
This allows to do the reset and basic device probes in parallel, which reduce
boot time on systems with several pciide controllers.
2003-10-08 10:58:12 +00:00
mycroft 32856df936 We really don't need to do 2 resets in wdc_channel_attach() -- the one done
by wdcprobe() is enough.
2003-10-08 08:47:58 +00:00
lukem 8ff09e8ecf Remove the unused "hardcode the blocks of /boot" versions /boot and
i386-MD installboot.
They haven't been enabled for a while, keeping them here is just
confusing, and they're still going to be in the CVS repo attic...
2003-10-08 04:43:28 +00:00
lukem 1c33b4e6a4 Overhaul MBR handling (part 1):
<sys/bootblock.h>:
    *	Added definitions for the Master Boot Record (MBR) used by
	a variety of systems (primarily i386), including the format
	of the BIOS Parameter Block (BPB).
	This information was cribbed from a variety of sources
	including <sys/disklabel_mbr.h> which this is a superset of.

	As part of this, some data structure elements and #defines
	were renamed to be more "namespace friendly" and consistent
	with other bootblocks and MBR documentation.
	Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
    *	Deprecated in favor of <sys/bootblock.h> (the latter is more
	"host tool" friendly).

amd64 & i386:
    *	Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
	be consistent with the naming convention of the msdosfs tools.

    *	Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
	and it's confusing to have two functionally equivalent bootblocks,
	especially given that "ufs" has multiple meanings (it could be
	a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

    *	Rework pbr.S (the first sector of bootxx_*):
	    +	Ensure that BPB (bytes 11..89) and the partition table
		(bytes 446..509) do not contain code.
	    +	Add support for booting from FAT partitions if BOOT_FROM_FAT
		is defined.  (Only set for bootxx_msdos).
	    +	Remove "dummy" partition 3; if people want to installboot(8)
		these to the start of the disk they can use fdisk(8) to
		create a real MBR partition table...
	    +	Compile with TERSE_ERROR so it fits because of the above.
		Whilst this is less user friendly, I feel it's important
		to have a valid partition table and BPB in the MBR/PBR.

    *	Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
	with other platforms.

    *	Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
    	we can boot off FAT partitions.

    *	Crank version of /usr/mdec/boot to 3.1, and fix some of the other
	entries in the version file.

installboot(8) (i386):
    *	Read the existing MBR of the filesystem and retain the BIOS
    	Parameter Block (BPB) in bytes 11..89 and the MBR partition
	table in bytes 446..509.  (Previously installboot(8) would
	trash those two sections of the MBR.)

mbrlabel(8):
    *	Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
	to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
2003-10-08 04:25:43 +00:00
lukem 1ea85577bc sort entries, and add a couple 2003-10-08 04:13:13 +00:00
lukem 2d6acee111 add bpbReserved fields 2003-10-08 04:11:43 +00:00
enami 8c172fb0e0 Adapt to recent ksiginfo change. 2003-10-08 03:10:41 +00:00
simonb db3d16f0e2 Remove some unneeded include files. 2003-10-08 01:43:28 +00:00
simonb 9c38f23cdb Add -D_STANDALONE to CPPFLAGS. 2003-10-08 01:42:37 +00:00
simonb 970b12080e Define LIB{CRT0,C,CRTBEGIN,CRTEND} as nothing, we don't need to link
against them.
2003-10-08 01:40:22 +00:00
simonb fe200beac4 Use -ffreestanding.
Define LIB{CRT0,C,CRTBEGIN,CRTEND} as nothing, we don't need to link
against them.
2003-10-08 01:38:49 +00:00
simonb f25f172d64 Use -ffreestanding.
Define LIBC as nothing, we don't need to link against it.
2003-10-08 01:37:35 +00:00
simonb 8ca32cb009 Use -ffreestanding. 2003-10-08 01:36:19 +00:00
simonb 27fbee2ad2 Don't use multi-line strings (keeps gcc331 happy). 2003-10-08 01:35:49 +00:00
simonb 07704f0a5a Use consistent type qualifiers for CPU1_alive (keeps gcc331 happy). 2003-10-08 01:33:54 +00:00
simonb 605b20c064 Use <lib/libkern/libkern.h> for str*() prototypes instead of the userland
header <string.h>.
2003-10-08 01:30:40 +00:00
simonb b00f4b8b66 Remove tokens at the end of #undef. 2003-10-08 01:27:22 +00:00
thorpej 9ed3b44b84 Use ksi_signo and ksi_code accessor macros. 2003-10-08 00:40:54 +00:00
thorpej 8321b2554f Use ksi_signo accessor macro. 2003-10-08 00:39:57 +00:00
thorpej 68723a995b * Shuffle some data structures so, and add a flags word to ksiginfo_t.
Right now the only flag is used to indicate if a ksiginfo_t is a
  result of a trap.  Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap.  Expands to 0 if the ksiginfo_t was
  not the result of a trap.  This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
  Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
  the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern.  Reviewed and OK's by Christos.
2003-10-08 00:28:40 +00:00
fvdl a7a118bf66 Backout previous for now, it breaks second CPU spinup. It'll be back later. 2003-10-07 21:47:57 +00:00
mycroft f2fc15d4b5 There is also no reason to use arc4random() here. 2003-10-07 21:24:56 +00:00
mycroft bef90cbfa4 There is NO reason to use arc4random() here, and it needlessly slows down the
forwarding path, so goodbye.
2003-10-07 21:22:11 +00:00
fvdl f4f3bc1663 OR in ahc->sc_dmaflags when passed to bus_dmamap_create() in ahc_alloc_scbs(),
in order to pass _ISADMA_32BIT if needed. Should fix SCB allocation
failure for 2842 VL cards.
2003-10-07 19:11:13 +00:00
martin 9e16642238 Adapt to recent PRI changes. 2003-10-07 19:02:36 +00:00
fvdl 9771ccbb32 Changes from Christos to fall back to MPBIOS for interrupt probing
if MPACPI fails, so that MPACPI can be used to only probe CPUs
if needed.
2003-10-07 18:10:36 +00:00
skd 8d474d5a86 Siginfo changes for alpha kernel. Approved by thorpej@netbsd.org. 2003-10-07 17:04:18 +00:00
tsutsui 608b19ae28 Use proper mips_dcache_{wb,inv,wbinv}_range() ops in dmamap sync function
if possible. Tested on my O2 (with r5ksc patch).

XXX should we apply similar changes to mips/bus_dma.c and use it?
2003-10-07 16:03:09 +00:00
tsutsui fd316d7ac1 Use proper macros. 2003-10-07 14:37:06 +00:00
skd 6347eb786e Support for proper siginfo FP codes. Also, set si_trap to fp status word.
Approved by fvdl.
2003-10-07 14:35:37 +00:00
ragge 4728b0483f The last commit broke the boot code (memset may be larger than 64k).
Johnny Billquist fixed it and bugfixed some routines.
2003-10-07 12:01:27 +00:00
tron ebbe253d6d Add COMPAT_16. 2003-10-07 09:43:58 +00:00
dyoung c3139592cc Initial import of ath(4) from FreeBSD. 2003-10-07 05:27:17 +00:00
uwe 576576bafb Add definitions for IRR0 bits. 2003-10-07 01:24:32 +00:00
thorpej bcf389773b Whitespace nits. 2003-10-07 00:23:17 +00:00
thorpej 8655c7d7eb Add a MAP_WIRED flag to mmap(2), which causes the new mapping to be
wired as if by mlock(2).
2003-10-07 00:17:09 +00:00
fvdl b894e42a80 SIGINFO support.
Todo: 32bit compat support (COMPAT_NETBSD32 will not compile right now,
as it won't on other platforms).
2003-10-06 22:53:47 +00:00
tls 9355900ec9 Reversion of "netkey merge", part 2 (replacement of removed files in the
repository by christos was part 1).  netipsec should now be back as it
was on 2003-09-11, with some very minor changes:

1) Some residual platform-dependent code was moved from ipsec.h to
   ipsec_osdep.h; without this, IPSEC_ASSERT() was multiply defined.  ipsec.h
   now includes ipsec_osdep.h

2) itojun's renaming of netipsec/files.ipsec to netipsec/files.netipsec has
   been left in place (it's arguable which name is less confusing but the
   rename is pretty harmless).

3) Some #endif TOKEN has been replaced by #endif /* TOKEN */; #endif TOKEN
   is invalid and GCC 3 won't compile it.

An i386 kernel with "options FAST_IPSEC" and "options OPENCRYPTO" now
gets through "make depend" but fails to build with errors in ip_input.c.
But it's better than it was (thank heaven for small favors).
2003-10-06 22:05:15 +00:00
bouyer 3e1a342dd1 Revert to polling for ata_get_params() in wdc_channel_attach().
When probing a nonexistent slave, we may timeout waiting for an interrupt.
In __wdccommand_start(), for polled data in commands, abort quickly if
status still read 0 after 400ns (for a nonexistant slave, the
command will either be aborted, or the status register will report 0; for
a real device we should have BSY, DRQ or ERR).
Thanks to Alexander Yurchenko for reporting the problem and testing the
fix.
2003-10-06 21:51:31 +00:00
shige 244b994892 Use xrtc driver on generic I2C framework instead of original xrtc
driver at src/sys/arch/evbppc/obs405/dev/x1226.c.
Remove todclock service.
2003-10-06 18:20:54 +00:00
scw 4eea84b735 Gah. Pick up the MI i2c headers from the right place.
Pointed out by Shigeyuki Fukushima on port-powerpc@.
2003-10-06 18:19:24 +00:00
shige 0af4acb526 Add Real time clock support code. 2003-10-06 18:15:08 +00:00
shige cd5706bccd Add xrtc device for XICOR X1226 RTC. 2003-10-06 18:02:54 +00:00
shige a6e367af69 Add XICOR X1226 RTC driver. 2003-10-06 18:02:02 +00:00
jdolecek 87f9bd7267 change accidentaly left debug printf to dprintf() 2003-10-06 16:47:10 +00:00
scw 2ba7642346 MD i2c glue for the 405GP's onboard IIC controller.
Bit-bang only for now.
2003-10-06 16:15:46 +00:00
thorpej 2c0d381bd7 New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc.  Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
2003-10-06 16:11:19 +00:00
thorpej 2af80d899e New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc.  Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs add" was missed on this file during the initial checkin
of the new I2C code.)
2003-10-06 16:08:42 +00:00
thorpej d322684f55 Add support for the i80312 and i80321 I2C controllers. 2003-10-06 16:06:05 +00:00
scw bd61b1e9b3 Rename dsrtc to avoid clashing with the MI i2c ds1307 driver. 2003-10-06 16:04:15 +00:00
thorpej df011fda1d Make sure to pass mod/ref seeds with PMAP_WIRED. 2003-10-06 15:43:35 +00:00
he c50a79523e Include <string.h> for memset and memcmp prototypes. 2003-10-06 08:44:39 +00:00
pk 3de506eaf1 No need for SVR4/SunOS5 FPE_* codes as these are compatible with ours. 2003-10-06 07:10:41 +00:00
he 557593445b Include libkern.h to get definitions for strcpy, strlen, and memset. 2003-10-06 06:41:45 +00:00
matt 0c7bac0672 Change headers to comply with the new toolchain changes. 2003-10-06 05:27:19 +00:00
lukem 420f3b76ba Replace BP_* with I386_BP_FLAGS_*, for consistency with other stuff in
<sys/bootblock.h>
(CONSDEV_ should be converted as well, but that's more intrusive...)
2003-10-06 05:24:54 +00:00
matt 6aa94d2054 Don't use ';' as the separator. Use '\n' instead. 2003-10-06 04:55:37 +00:00
christos 07ceba4419 Catch up with chuck's stack changes. Don't map the linux stuff executable
and avoid mapping segments that have 0 size.
2003-10-06 03:45:40 +00:00
simonb ba957518fe Whitespace nits. 2003-10-06 02:53:33 +00:00
lukem 1ab040b9ee Consistently use "bsBPB" as the struct member for the BIOS parameter block. 2003-10-06 02:21:47 +00:00
thorpej 388386eef7 Make sure to pass mod/ref seeds with PMAP_WIRED. 2003-10-06 00:40:36 +00:00
he a665876c87 Remove argument list from #undef of divrnd macro; fall-out from gcc3? 2003-10-06 00:04:55 +00:00
mycroft a0ca611f94 Minor tweaks to the color framebuffer code -- still don't know what the deal
with the interrupt is.
2003-10-05 22:00:25 +00:00
pk a9b14e04b8 sparc kernel support for SA_SIGINFO. 2003-10-05 21:13:23 +00:00
matt 73ca535921 Add SA_SIGINFO support for ARM (from Chris Gilbert). 2003-10-05 19:44:58 +00:00
bouyer 7b066791c8 Remove references to University of California from my copyright notices. 2003-10-05 17:48:49 +00:00
tsutsui 61b40c3946 Update comment to follow the previous R4000 ID addtion. 2003-10-05 17:31:09 +00:00
tsutsui 779268c4cf Define ELF2ECOFF here for native build.
(BTW, objcopy with OMAGIC kernel won't work on old pmax and sgimips machines?)
2003-10-05 16:53:15 +00:00
tsutsui d1a36ee086 Include opt_mips_cache.h for options MIPS3_L2CACHE_ABSENT and
MIPS3_NO_PV_UNCACHED.
2003-10-05 16:38:03 +00:00
tsutsui 800933ed42 No need to include opt_mips_cache.h here. 2003-10-05 16:34:51 +00:00
tsutsui 086016d756 Add pcn at pci, tl at pci and tlphy, which I've confirmed working on O2. 2003-10-05 15:44:36 +00:00
tsutsui b0cd3c8093 Apply a bunch of patches written by Christopher SEKIYA
(with several cosmetic changes by me) which fixes O2 (IP32) support.

Now my R5000 O2 works fine in multiuser with on-board AIC7880 SCSIs
and several PCI network cards (but only on serial console yet).
L2 cache on R5000/Rm5200 is still disabled for now, but it will be
fixed later, hopefully.

See recent discussion on port-sgimips for details.
2003-10-05 15:38:08 +00:00
tsutsui 9869f97b24 Increase number of transmit/receive buffers from 10 to 32 to avoid
RX buffer overrun.
2003-10-05 14:57:14 +00:00
tsutsui d008eb86c9 Pass proper dma mapsize of TX/RX mbufs to bus_dmamap_sync().
Now tl(4) works on sgimips.
2003-10-05 14:50:09 +00:00
tsutsui cf2571bd30 Oops, more white space nit. 2003-10-05 14:44:55 +00:00
tsutsui e7b57317b8 TAB/space nits. 2003-10-05 14:42:45 +00:00