Commit Graph

1398 Commits

Author SHA1 Message Date
briggs 52af8374ec Minor (old) patch from me to correct CPU ID of 604e vs. 604ev.
Tested by Tim Kelly.
Also patched from Tim to
 - Delay longer for second CPU spinup.
 - Only attempt to print CPU speed and cache configuration on certain
   CPU types.
2004-12-06 04:15:03 +00:00
thorpej 7a60e77293 bus_dmamap_load_mbuf(): Skip zero-length mbufs.
kern/24811
2004-11-28 17:34:45 +00:00
manu 6dfb732236 For and from bouyer@: call wdc_init_shadow_reg(chp) only after chp has
been initialized. Cause the hard disk to be detected again on the iBook G4,
and probably other machines.

Weee, I can run -current again!
2004-11-25 15:24:14 +00:00
bouyer fe4d81db48 pdcsata(4), a driver for the Promise SATA150 (aka PDC203xx) serie of
controllers. Tested with a PDC20375 (2 SATA, one PATA) controller on sparc64.
Added to all kernel config file which had pdcide(4).
2004-11-24 20:49:17 +00:00
jklos befeef393b Add comments for OFB_ENABLE_CACHE (doesn't work on iMacs) and awacs
(causes lockups). OK'd by Tsubai Masanari (port maintainer).
2004-11-12 02:23:09 +00:00
christos 30fc143afa Add COMPAT_BSDPTY to the rest of the config files. 2004-11-10 17:54:02 +00:00
mbw 57baf75956 Reverting.
Apparently these patches cause problems.
2004-11-08 17:36:07 +00:00
mbw 7f3392aa22 Add disklabel recognition for another Apple file type
"BZB_ROOTFS_NEW        0xc000"
Also closes PR 10046
2004-11-07 04:24:33 +00:00
thorpej e9818f5b5e When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 18:08:34 +00:00
yamt 18f717bb90 constify audio_hw_if, midi_hw_if, and radio_hw_if. 2004-10-29 12:57:15 +00:00
thorpej dc2f2fbe74 Centralize the declaration of booted_device and booted_partition. 2004-10-23 17:07:37 +00:00
augustss 0c21c79cc5 s/uax/axe/ 2004-10-23 14:00:50 +00:00
wrstuden 6f8b7762c6 Now that we have ofwboot load at 0xe00000, it doesn't make sense for
this kernel to load at 0x800000 - move back to the default and we
have around 13 MB of space for the kernel.
2004-10-21 21:53:58 +00:00
wrstuden df1f02ad54 Now that we have ofwboot load at 0xe00000, it doesn't make sense
for this kernel to load at 0x800000.
2004-10-21 21:52:51 +00:00
manu 6e3c639957 IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
2004-09-04 23:29:44 +00:00
drochner 46289e1fef Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
2004-08-30 15:05:15 +00:00
aymeric a225650d5c postpone the calling of wdc_init_shadow_regs(), to follow MI changes.
Thanks to Jukka Andberg for finding that bug.
2004-08-23 08:54:39 +00:00
thorpej 9cc521a148 Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
2004-08-20 06:39:37 +00:00
thorpej 4b51cecfc2 - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
  to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
  ata_channel.  Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
  maximum number of drives that can be present on the channel.  For now,
  this is always 2.  Add an ATA_MAXDRIVES constant that places an upper
  limit on this value, also currently 2.
2004-08-14 15:08:04 +00:00
thorpej ab20886f7b Don't bother with bits that tell of the presence of optional callbacks;
just check the function pointers for NULL.
2004-08-13 03:12:59 +00:00
mycroft 5e289bdf22 Don't pass in a MAC address -- yet. 2004-08-07 17:27:30 +00:00
drochner a5a5473c25 remove now unnecessary "pci_enumerate_bus" definitions 2004-07-29 16:55:25 +00:00
atatat f68a9f1ff2 Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
2004-07-15 03:53:44 +00:00
manu e317692907 When the keyboard type is unknwon, don't attach both ADB and USB, as the
kernel will panic if an USB keyboard is plugged later.

Of course there will be a problem on a desktop machine with an USB attached
keyboard, but that cannot be fixed without access to such a machine..
2004-07-03 16:24:57 +00:00
bouyer 21e9a36edc Add options P1003_1B_SEMAPHORE
to all GENERIC-like kernel config files where SYSV* options were already
present (commented out if the SYSV* options are commented out).
Fix lib/25897 and lib/25898.
2004-06-28 21:07:47 +00:00
abs bd8eb3b5ed Add (commented out) ALTQ options to all GENERIC-like files 2004-06-26 07:32:05 +00:00
mrg b83f6fa528 Add re; Realtek GbE. 2004-06-22 16:28:28 +00:00
itojun 596aec9a47 have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
2004-06-22 14:09:49 +00:00
jmc 84fafa3db5 Ignore errors on some rm -rf's for platforms that aren't quite
POSIX compliant
and return errors on r/o source (FreeBSD) for -rf. Fixes PR#25022
2004-06-21 18:20:08 +00:00
manu a7a2220651 We used to look in psuedo-hid (with a typo) device for the keyboard. On
newer machines (iBook G4), it is in pseudo-hid (without typo), and there
are no `adb-kbd-ihandle or `usb-kbd-ihandles methods. In that situation,
just try to attach anything we can.

This patch fixes spurious inputs on iBook G4.
2004-06-20 21:02:07 +00:00
manu 72f86bef61 We used to look for the interrupt controller through the "interrupt-controller"
property of "/chosen" node in OF tree. On newer machines (e.g: iBook G4),
this property does not exist. We look for the node "mpic" as a second attempt
after a failure in /chosen.

This makes the iBook G4 keyboard almost usable (there are still some spurious
inputs on system startupi)
2004-06-20 20:50:13 +00:00
christos c22e4ed8cd ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM 2004-06-18 15:02:29 +00:00
christos 0399e839cf Add pseudo-device ptm on all the generic flavored kernels. 2004-06-16 15:07:39 +00:00
schmonz 5f5633de40 Support userconf(4) ("boot -c"). Reviewed by Bill Studenmund. 2004-05-31 03:22:45 +00:00
thorpej 2ecdd552dc Add the notion of "shadow registers" to the wdc driver. These shadow
registers are registers that overlap with others on many controllers, but
which may actually be distinct on some controllers.  Right now, the two
shadows are:

- wd_status (usually overlaps wd_command)
- wd_features (usually overlaps wd_error)

Add a new helper function, wdc_init_shadow_regs(), used to initialize
the shadow register handles on controllers where they do actually overlap.

Partially from Jordan Rhody @ Wasabi Systems, Inc.
2004-05-25 20:42:40 +00:00
wiz b83c30c098 Remove UCB ad clause from tsubai's license.
Ok'd by tsubai and board.
2004-05-12 00:34:25 +00:00
kleink 7b3b647647 Factor out W{CHAR,INT}_{MAX,MIN} into their own header file. 2004-05-08 21:51:47 +00:00
fair 75bfa594cb Protect against multiple inclusion (kdump, ktruss, etc., make
procedures are not smart enough to spot this file as being the same
when it appears in both include/{macppc,machine}/grfioctl.h
2004-04-25 21:57:51 +00:00
kleink 0e5d242328 Update for new pci_devinfo(9) signature. 2004-04-24 15:49:00 +00:00
itojun 6123043789 pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
2004-04-23 21:13:05 +00:00
matt 62fc149c0b Make this compile with XNS enabled 2004-04-18 23:32:21 +00:00
aymeric 8f2774036c . add a missing call to lockinit() in apmattach()
. while here, explicitly initialize three softc variables to 0
2004-04-15 11:03:15 +00:00
matt a9903fcc11 When linking, use ${_MKTARGET_LINK} so that MAKEVERBOSE=1 looks right. 2004-04-09 04:01:42 +00:00
matt 2ce2389229 Deal with OFW trees that have interrupt nodes without an #address-cells
property.  Treat them as if they had such a property but its value was 0.
2004-04-08 23:58:24 +00:00
mrg f87752ad3b enable "INSECURE" kernel option so that GENERIC kernels are capable of
running XF4 servers.  while this isn't the best solution, it is the only
one we have for the forseeable future, and there is long-standing precedent
in the i386 port.
2004-04-02 14:06:23 +00:00
matt 7a72576c33 Move to softintr__init to cpu_startup. 2004-04-01 16:57:45 +00:00
aymeric 83d29714cc delay(): use =&r instead of =r for a temporary register as suggested in
PR #24830. The bad reuse of the register was actually triggered by using
no optimization at all.
pmap_subr.c is the only file that still requires at least -O to compile
into working code (the proper fix would be to write almost all of
pmap_zero_page() in assembly). The rest of a macppc kernel requires only
-finline now.
2004-03-29 08:06:12 +00:00
matt a1d9764403 Add SMBFS/nsmb 2004-03-29 07:47:57 +00:00
kristerw a53ff5c8f3 Add the wsmux pseudo-device. This will make the adb keyboard work
even if the heuristics in the console attachment code fail to
identify the keyboard type.

This should fix PR 22317 and part of PR 24778.
2004-03-29 01:46:03 +00:00
kristerw a5892fecd3 Add "wdc* at pci? dev ? function ?". 2004-03-29 01:36:49 +00:00
matt 27b002601f Enable generic software interrupts on macppc. 2004-03-25 18:52:25 +00:00
matt 6fbc543513 Don't call hardclock until cpu_initclocks has been called. 2004-03-25 18:44:57 +00:00
matt 653cfe6dbc Add latent generic soft interrupt support. 2004-03-24 19:42:04 +00:00
wrstuden 58472c3385 Have Locore zero out the bss (which includes our stack) BEFORE
we start calling into C code. Previously we called memset() in our
C code. Unfortunately the compiler would sometimes store local variables
on the statck, which got killed by the memset(). Oops!
2004-03-17 23:32:22 +00:00
wrstuden 86948e4bf1 Bump version to help track down issues with kernel loading. 2004-03-17 20:41:17 +00:00
dyoung 4ccb1f5236 Add a 'tags' target to macppc. 2004-03-13 05:55:40 +00:00
wrstuden 74fec3bc40 Fix ofwboot to deal with larger kernels. Rather than loading at
0x6?0000, load at 0xe00000. This gives us room for around 13 MB of
kernel, as opposed to the current 5 MB (0x600000 - 0x100000).

No changes to load-base or real-base are needed due to this change,
though machines that needed specific OFW settings before (OF 1.x
and 2.x) this change still need those settings.

Partially revert revision 1.25 -> 1.26 of ofwboot/Makefile & friends.
We do not need to distinguish between where ofwboot and ofwboot.{elf,xcf}
load; they are both fine loading somewhere other than load-base.
2004-03-12 19:13:37 +00:00
kleink 9ff09d5dff Pull in SPRs via <powerpc/spr.h> in this single instance, and dispose of
<machine/spr.h> again.
2004-03-02 00:35:54 +00:00
wiz 85746c6759 Spell interrupt with two rs. From Peter Postma. 2004-02-24 15:16:04 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
jdolecek 6c14651ea0 cleanup old lpt(4) attachment, and glue ppbus in so that they can coexist:
* lpt device is defined in MI place (dev/ppbus/files.ppbus), dev/ic/lpt.c
  is included there too; dev/ic/lpt.c is not included if ppbus is
  configured or if there is alternative platform lpt (like for pc532)
* g/c MD lpt definitions and custom puc/upc attachments,
  glue moved to conf/files and dev/pci/files.pci respectively; remove
  device lpt definition from dev/isa/files.isa
* add ppbus parport attribute, atppc device attachments, adjust plip and lpt
  glue
2004-01-20 19:58:00 +00:00
jonathan abb59e6f0c Add support for opencrypto, PCI accelerators to sys/arch/*/conf/GENERIC
files for machines I know to have genuine PCI slots.  As sent to tech-kern
for feedback in December 2003. Based on feedback, opencrypto is commented
out in the macppc GENERIC (due to absense of GENERIC_SOFTINT support),
and added to the sparc64 config (sys/arch/sparc64/conf/GENERIC32).
2004-01-14 22:29:03 +00:00
tsutsui ca7e52eb4f Preserve kernel symbol table not only #if defined(DDB) but
also #if NKSYMS > 0 || defined(LKM).
Should fix port-macppc/21742.
2004-01-14 14:08:40 +00:00
dbj e3b3654ebb attempt to make these compile again after recent wdc changes. 2004-01-04 07:08:13 +00:00
thorpej a963286f8d More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc
2004-01-03 22:56:52 +00:00
thorpej 5bd80d8373 Rename "struct channel_softc" to "struct wdc_channel". 2004-01-03 01:50:52 +00:00
thorpej 527c829fa0 Rename:
- wdc_xfer to ata_xfer
- channel_queue to ata_queue
and move them to <dev/ata/atavar.h> so they can be used by non-wdc ATA
controllers.  Clean up the member names of these structures while at it.
2004-01-01 17:18:53 +00:00
thorpej 0beb075071 Simplify allocation of the channel queue. 2003-12-31 02:50:34 +00:00
manu fe7a5ddf22 Fix PowerPC ports build with KGDB. 2003-12-30 11:23:20 +00:00
mjl 054d8c4946 Initialize some auto vars to appaise gcc3. 2003-12-27 13:34:36 +00:00
grant 9427a0c717 add support for the Keywest I2C and snapper audio device, as found on
some iBook and PowerBook models.

this driver was written by Tsubai Masanari and further hacked on by
Jared D. McNeill to work on his iBook.

the driver is limited (master volume control only, and I haven't
tested recording) but has been functioning perfectly on my PowerBook
g4 DVI (ivory) for some time.

ok'd by matt.
2003-12-27 02:19:34 +00:00
aymeric 341f54debe revert previous. -fwritable-strings is not needed now that the ld script
does TRT.
2003-12-26 20:01:15 +00:00
aymeric 3c91265513 merge any section that starts in ".rodata." into the text section.
This matches sections generated by newer versions of gcc to handle the sharing
of constant strings.
2003-12-26 19:59:31 +00:00
aymeric 652090f272 ANSIfy and clean up prototypes.
This has been lying around in my tree for too long now.
2003-12-26 13:43:29 +00:00
aymeric 86b6db2f13 add -fwritable-strings to DBG, so that gcc doesn't generate a ".rodata" section.
I believe this fixes PR port-macppc/23206 and the "ofwboot.xcf issues" reported
on the lists since november.
2003-12-26 13:25:00 +00:00
dyoung 66e744eb8b Fix typo: atw(4) was listed as an Aironet card instead of ADMtek. 2003-12-22 10:10:41 +00:00
thorpej 08227d36cb No need to include wdvar.h anymore. 2003-12-14 05:15:53 +00:00
thorpej 2f2ca9e66b Split the Intel i31244 SATA controller ("Artisea") driver out of piixide
into its own driver (artsata).
2003-12-14 01:32:01 +00:00
thorpej 98f7d12017 Split out the Silicon Image SATALink support into its own driver,
"satalink".
2003-12-13 23:13:40 +00:00
matt 98c902b471 Convert fixcoff into a true host tool by making it under tools. 2003-12-11 00:27:42 +00:00
matt cd3cb31917 Make sure to pick up nbcompat definitions 2003-12-10 23:45:25 +00:00
matt b1865b274e Use be16toh/htobe16 instead of ntohs/htons. 2003-12-10 23:36:07 +00:00
matt 104c58abbf s/u_int16_t/uint16_t/ for more portability 2003-12-10 23:08:14 +00:00
jmc 695a2a2f9f Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
2003-12-10 02:04:00 +00:00
dyoung 609617af90 Enable RSSI-based rate-adaptation for wi(4). This enables wi(4)-based
APs to run at "full speed" where before they ran at just 1 or 2Mb/s.
The AP will adapt the data rate for each client based on packet
losses and the received signal strength.

I have also enabled rate adaptation for STA mode and for IBSS mode,
but the hardware gives us less control over the data rate in those
modes.
2003-12-07 05:44:49 +00:00
keihan 29c72c57f0 netbsd.org -> NetBSD.org
All "netbsd.org" is now gone from src/sys/arch.
2003-12-04 13:05:15 +00:00
bouyer 6db04f6724 Adapt for new wdc regiosters array. Should fix port-macppc/23604. 2003-12-03 12:09:32 +00:00
matt 2a5baf8a0e Add missing lpt entries. 2003-11-19 02:54:50 +00:00
dyoung 23d8f48692 Add data-link type DLT_IEEE802_11_RADIO to wi and atw. DLT_IEEE802_11_RADIO
lets you monitor radio stats like received signal strength, which
diversity antenna was used, channel/frequency, modulation, and data
rate.
2003-11-16 09:02:42 +00:00
christos 6dfe125b9c we could have lpt at puc. 2003-11-13 14:39:38 +00:00
chs e07f0b9362 eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed.  however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors.  most of
the callers of uvm_useracc() make the above incorrect assumption.  the
rest are all misguided optimizations, which optimize for the case
where an operation will fail.  we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors.  since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
2003-11-13 03:09:28 +00:00
manu a2bed85761 Implement mach_thread_get_state.
While we are here, try to tag machine dependent functions in header files.
also transformed darwin_ppc_*_state into mach_ppc_*_state, as this is
what they really are (COMPAT_DARWIN is on the top of COMPAT_MACH, not the
other way around)
2003-11-11 17:31:59 +00:00
aymeric a60cfa8cd7 . ANSIfy, make compile
. get rid of kbd_intr() and low-level keyboard handling
2003-11-04 19:18:05 +00:00
thorpej dec320ebc1 Squish some recent compiler warnings. 2003-11-02 00:23:38 +00:00
jdolecek 3abecdb88d avoid stong words in comments 2003-11-01 17:35:42 +00:00
dyoung 9a73ec4e1e Stop false uninitialized variable warning. 2003-10-27 22:48:20 +00:00
mycroft 1d19abe12e Remove optimization hack. 2003-10-26 16:34:07 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
jdolecek 694c204404 add major for 'ses' for archs which have the other scsi devices 2003-10-24 08:09:53 +00:00
matt 421dd6cc28 Reorganize the way powerpc port install machine specific headers.
Use <powerpc/oea/bat.h> exclusively and remove <machine/bat.h> and
<powerpc/bat.h>.  Remove unneeded <machine/cpufunc.h>.  To insure
1:1 correspondence of <powerpc/FOO.h> to <machine/FOO.h> include
"../../powerpc/include/Makefile" in "arch/FOO/include/Makefile".
Incororpate <byte_swap.h> into <bswap.h> and then byte_swap.h
2003-10-20 00:12:09 +00:00
lukem 7d84b90c92 Use one 'atabus* at ata?' instead of multiple 'atabus* at FOOide? channel ?'
Use  'atapibus* at atapi?'  instead of  'atapibus* at atabus?'
2003-10-18 08:30:12 +00:00
dyoung ef743c64b6 Switch wi(4) to the new 802.11 layer. 2003-10-13 08:07:21 +00:00
dyoung 075c766e9b Add atw(4), ADMtek ADM8211 802.11, at PCI bus and Cardbus. 2003-10-13 05:20:52 +00:00
jdolecek ef5bb330f5 reassing majors for crypto and pf to use the newly defined MI major
range
2003-10-10 22:42:39 +00:00
jdolecek 4e915c9ccd update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
2003-10-10 21:21:25 +00:00
bouyer f5a6a0a843 Add new per-chip pciide drivers. 2003-10-08 11:55:43 +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
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
jdolecek e6286b949a Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
2003-10-05 08:04:24 +00:00
mycroft eefae40298 Hide the use of config_interrupts() in one place. 2003-09-25 19:29:48 +00:00
matt 85a83bcb92 Add COMPAT_16 2003-09-25 18:56:17 +00:00
mycroft d40837608f 1) Use config_interrupts() to attach IDE and ATAPI drives. This eliminates
most polling.
2) Clean up some goofiness in pciide -- get rid of the whole "candisable" path
   (it's gratuitous) and simplify the code by calling pciide_map_compat_intr(),
   *_set_modes() and wdc_print_modes() from central locations.
3) Add a register writability and register ghost test to eliminate phantom
   drives more quickly.
2003-09-19 21:35:56 +00:00
grant dc97144230 add gem and brgphy so we have ethernet on the PowerBook G4 DVI. 2003-09-10 18:06:26 +00:00
itojun fc918f8713 add rnd(4) device to installation media.
necessary for many purposes, including password seeding, tcp sequence number,
and more.  see tech-security
2003-09-06 03:25:23 +00:00
matt cec9cb32df Move CLKF_BASEPRI to machine specific <intr.h> file since it depends on
the encoding of the spl for the port.
2003-09-03 21:33:31 +00:00
chs 2ab420f918 recognize the latest version of the GMAC. 2003-08-24 18:02:00 +00:00
he b372f2beaa Adapt to const-ification of first arg of open function in fs_ops. 2003-08-22 08:06:19 +00:00
itojun 8ebd15f8cd add udav* 2003-08-22 07:52:48 +00:00
itojun 4440262659 create /dev/crypto 2003-08-22 05:06:22 +00:00
matt a1bba8f344 Relax things so that OFW implementations that don't conform to the OFW PCI
bindings will work.
2003-08-20 14:41:56 +00:00
matt 93b63570a0 Properly walk the OF tree to map a PCI node's interrupt property into the
proper settings for the interrupt-controller.
2003-08-18 07:08:11 +00:00
hannken d56baf4735 Add a placeholder for lpt, char 20.
Requested by: Matt Thomas
2003-08-17 19:15:50 +00:00
chs f96eebf908 use the value of the "soft-reset" property (if it exists) to locate
the reset vector (needed on my shiny new G4).  from tsubai.
2003-08-17 18:12:34 +00:00
chs 86bd9c4a5e recognize the product ID used on the latest G4s. 2003-08-17 18:10:09 +00:00
matt a3a18840be Remove SPILLSTK leftovers. 2003-08-12 05:15:41 +00:00
matt ff2ea365c3 Nuke spillstk. Use INTSTK instead of hardcoded value. 2003-08-08 07:15:20 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
matt cef74eb810 Add #define _NOREGNAMES (to suppress asm.h from #define r1 1 ...) 2003-07-31 07:50:02 +00:00
nathanw c021860e53 Correct comment in FORCE_FUNCTION_KEYS code; the 0x0b (eject) button is
on the f12 key, not f7 (the keycode value was correct for f12 already).
2003-07-28 13:21:29 +00:00
itojun 3f14c71f75 reserve cdev major # for PF. ok'ed by technical-exec 2003-07-27 14:17:57 +00:00
nathanw 3dae8d28d6 Add commented-out options CAPS_IS_CONTROL and FORCE_FUNCTION_KEYS, with
descriptions.
XXX the descriptive text should probably be in options(4), but none of the
*other* mac-specific options are there, either...
2003-07-24 21:03:05 +00:00
nathanw 3945b95a8d Add an option, enabled with the FORCE_FUNCTION_KEYS macro, that converts
"hotkey" abtn events into the function-key akbd events for the keys
that they're actually on (though the eject/f12 mapping is probably wrong for
the 12" PowerBook G4).
2003-07-24 21:01:39 +00:00
nathanw 6ff570e258 Make kbd_passup() an exposed function. 2003-07-24 20:56:24 +00:00
lukem 4b2744bf35 __KERNEL_RCSID() 2003-07-15 02:43:09 +00:00
aymeric f0696ba4ba strategy() should really have an ANSI prototype. Otherwise its daddr_t
argument gets passed wrongly.
This should fix a bug reported by Martin J. Laubach on port-macppc, and
was fixed two weeks ago in NetBSD/ofppc.
2003-07-11 23:38:08 +00:00
he db2df0cdd4 After the recent changes to if_ieee80211.h, we need to include
if_media.h earlier.
2003-07-09 14:30:29 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 257443876f 'struct proc *' -> 'struct lwp *' as required to get GENERIC for macppc built 2003-06-29 11:02:21 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
dyoung eb4a83a039 Bracket the opt_multiprocessor.h #include with #ifdef _KERNEL_OPT.
It won't compile, otherwise. I figure this is right because it's
done everywhere else.
2003-06-25 00:03:13 +00:00
martin d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
hamajima b3120a356c Fix wdc_obio_dma_init() confused WDC_DMA_LBA48 with WDC_DMA_READ.
This was tested by jtb@netbsd.org.
2003-06-19 22:36:06 +00:00
thorpej 452a8fdae2 Rename IPL_IMP -> IPL_VM. 2003-06-16 20:00:56 +00:00
fvdl 7dd7f8baa2 Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
2003-06-15 23:08:53 +00:00
manu e4fbe87208 Add COMPAT_DARWIN, and comment out anything related to it. It is too
much experimental to be included into GENERIC kernels.
2003-06-11 16:24:13 +00:00
hamajima 0659c2f915 Support the PowerBook G4 12-inch (and maybe 17-inch).
Kauai ATA, new obio chip, and Japanese keymap for WSDISPLAY_COMPAT_RAWKBD

I tested only 12-inch Japanese model.
2003-06-11 07:35:39 +00:00
bjh21 6a5af969d4 In mcstop(), don't clear IFF_UP. Other drivers don't mess with IFF_UP
internally, other than to set it when they gain their first address.
Every caller of mcstop() bar one was either preserving the state of IFF_UP
itself or was conditional on its already being clear, so the only effect of
this is to simplify the code and to change that one case, thereby curing
PR port-macppc/12088 (underflows on "mc" cause it to be taken down).
2003-06-04 21:30:06 +00:00
lukem cd46c56ae6 missing rcsid 2003-05-18 06:45:14 +00:00
thorpej e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
thorpej 2a90e2a9c9 Remove redundant bounds_check_with_label() prototype. 2003-05-10 16:12:02 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
dsl d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +00:00
ragge d8c8fa8111 Add pseudo-device ksyms. 2003-04-26 14:10:04 +00:00
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
bouyer aec10dd80c Nake return values from bounds_check_with_label() conform to the man
page: -1 for error, 0 for EOF, 1 otherwise. Inspired by an OpenBSD commit
message, pointed out by Miod Vallat in private mail.
vax/mba/hp.c: check return value <= 0, not < 0 to be concistent with how
other places handle return values from bounds_check_with_label().
2003-04-16 15:00:59 +00:00
christos b9f9db3ca2 Bye Bye UCONSOLE 2003-04-10 22:06:51 +00:00
thorpej a9caf2cae5 G/c the traceq; nothing uses it. 2003-04-09 01:55:14 +00:00
thorpej 0871fe346f Use PAGE_SIZE rather than NBPG. 2003-04-09 01:54:42 +00:00
thorpej ecd9fdcc76 Oops, didn't mean to commit this. 2003-04-02 03:16:39 +00:00
thorpej d470cda51b Use PAGE_SIZE rather than NBPG. 2003-04-02 02:56:40 +00:00
mjacob 3b3cb97b5b Attach esiop to a scsibus. 2003-03-14 17:29:05 +00:00
matt 8344279675 Synchronize macppc and evbppc majors when possible. Add a lot of missing
devices to evbppc.
2003-03-13 17:02:52 +00:00
drochner a15dcfdce7 Avoid conflict with sockets[] definition in net.h
and add some typecasts.
Thanks to Juergen Hannken-Illjes for compile-checking.
2003-03-13 14:05:53 +00:00
drochner 47fe380b4c make netif_close() return value void
fix prototype
2003-03-13 12:15:31 +00:00
drochner e5cc00b939 Remove remaining uses of libsa/netif -- the "netif" structure was only
used to lookup a "struct of_dev", everything else was ballast.
Do it straightforward now and assign the ofdev directly to io_netif.
2003-03-13 11:35:54 +00:00
he 1565f9401d Remove remnants of support for console on ite, since the ite device
driver is no more.
2003-03-09 13:59:56 +00:00
mrg 60b9080da3 don't depend on "../../../../../gnu/dist/toolchain/include/coff/rs6000.h". 2003-03-09 00:39:10 +00:00
soren ea477f4ba7 Forgot dummy printf. 2003-03-05 16:52:16 +00:00
soren 1f3cd4f95f Be more verbose about unsupported keys. 2003-03-05 16:18:24 +00:00
matt 92d0498c3d Remove port-specific procfs_machdep.c (since they are all identical and
a better one resides in powerpc/powerpc/).
2003-03-05 05:43:42 +00:00
soren e0395ed0f1 G/c old macppc grf entries. 2003-03-04 13:29:12 +00:00
soren 889bcccc72 Attach on recent TiBooks.
XXX The mixer doesn't work yet.
2003-03-04 13:28:20 +00:00
matt a391bf2e06 Make this play with gcc 3.3. Add -ffreestanding. Cleanup bootxx. 2003-02-28 05:24:56 +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
manu b09955adaf Merged mac68k and macppc keayboards, since they are the same. The file
could move to <arch/mac> if one day we create it.

Fixed french keymap: option was not mapped correctly, thus making
impossible to use |{}[] (tested).
Added jp keymap from PR/15438, and sf, sv, de and uk keymaps from OpenBSD.
(all untested).
2003-02-23 18:09:25 +00:00
soren e9d72b5b52 Make ALLOC_TRACE work again. 2003-02-17 08:21:39 +00:00
augustss 519f8f3d30 Add uax(4) (and url(4) in some cases). 2003-02-16 17:35:13 +00:00
briggs 0ba0225830 Initialize the framebuffer BAT with BAT_G, too. This marks the region
as (G)uarded, protecting it from the processor being too aggressive in
reordering and prefetching.  This allows OFB_ENABLE_CACHE to work on my
Powerbook G4.

Thanks to matt@ for suggesting this fix.  "It's the right thing to do."
2003-02-15 05:07:57 +00:00
tsutsui 9dc8f99b73 Add prototypes for ZS_TXDMA functions.
XXX Maybe we should have DMA hooks in MI z8530tty.
2003-02-15 02:28:22 +00:00
matt 6d7550dbc7 Initialize cpu_timebase so sysctl can report it. 2003-02-12 17:49:56 +00:00
christos b58fbe4ff7 remove extra paren 2003-02-12 13:15:49 +00:00
christos afb2c9d098 PR/15825: Monroe Williams: Machines booting from third-party SCSI cards
can't find root device. This is because the code blindly kills everything
after a comma in the boot path string, instead of being careful and doing
so only for the last component.
2003-02-11 17:29:23 +00:00
nakayama e3e4805068 Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
2003-02-05 13:57:50 +00:00
matt eef22c368e opt_l2cr_config.h is now opt_ppcparam.h 2003-02-04 03:15:40 +00:00
matt a0ade92f9c Add -DPPC_OEA to CPPFLAGS 2003-02-03 23:35:39 +00:00
matt 2b0e97a561 Rename PPC_MPC6XX to PPC_OEA (and any mpc6xx reference to oea). 2003-02-03 17:09:53 +00:00
matt 3e793a03a1 More cleanup for OLDPMAP. 2003-02-03 05:15:51 +00:00
matt 193a5761aa Remove OLDPMAP support. 2003-02-02 21:22:11 +00:00
matt 7c1e50a21a Perform a rototill of the powerpc code. Mandate use of SPRG0 to store
a pointer to current cpu's cpu_info structure.  Use cpu_info for
intstk,intr_depth,still_stk,idle_pcb,curpcb,curlwp,etal even on
non-MULTIPROCESSOR machines.  Add common macros GET_CPUINFO and
INIT_CPUINFO to get and initialize the cpu_info struct on startup.  Make
ibm4xx use the standard <powerpc/frame.h>.  Use IFRAME_xx in ibm4xx
trap_subr.S instead of explicit magic offsets.  Move INTSTK and SPILLSTK
to std.<platform>.  Change faultbuf to a struct instead of an array.

On MPC6XX cpus, stop using the vector page for temporary space and use
reserved space in cpu_info.
2003-02-02 20:43:17 +00:00
pk be1188e00d Provide locking required by the interrupt handlers running at IPL_SERIAL. 2003-01-28 12:35:31 +00:00
kent cd7d9faeaf Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it. 2003-01-28 01:07:51 +00:00
kleink 2ee2952854 G/c the pmap_bootstrap() segtab interface again. Silly me. 2003-01-22 21:55:14 +00:00
thorpej a50e3bc1cb Merge the nathanw_sa branch. 2003-01-17 22:58:53 +00:00
fair 7b889057b4 Add bktr*, udsbr* and radio* at each;
allocate a major number for radio*
2003-01-14 08:40:53 +00:00
matt 12a9bdbb4f Add missing ethernets and phys. Update FireWire to current reality. 2003-01-12 00:50:29 +00:00
mjl d5afd1c04f Add major for bktr. 2003-01-10 01:32:55 +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
briggs 6e51b83bf3 Add mlx. Pointed out by Daniel Eggert in PR 18487. 2003-01-05 19:21:44 +00:00
thorpej dbb0f0ebed Use aprint_normal() for cfprint routines. 2003-01-01 01:47:30 +00:00
thorpej 703e7687a9 Use aprint_normal() in cfprint routines. 2003-01-01 00:16:46 +00:00
thorpej 0ad39e91ea Fix sysmon entry. 2002-12-31 22:43:38 +00:00
thorpej 78ea2dd367 Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
2002-12-10 05:14:24 +00:00
thorpej 2c75f5b061 No need to depend on userland libraries here. 2002-12-09 16:30:40 +00:00
manu 9f6565f2bd A working fork/vfork implementation. Darwin fork differs from our fork by
two ways:
- the child gets its pid as retval[0] (userland stub will turn it into a 0),
retval[1] is 1 and it is 0 in the parent.
- in the child, the fork syscall is successful, hence we must skip the next
instruction.
2002-12-08 21:53:10 +00:00
haya 805040f592 New Feature: add pseudo device for IEEE 1394 isochronous stream and
isochronous reception routine for IEEE 1394 OHCI (fwohci).  The
transmission part is under construction.

The minimum configuration options for this feature are:

# IEEE 1394 (i.LINK)
fwohci*	at pci? dev ? function ?
pseudo-device	fwiso		1
2002-12-04 00:28:39 +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
christos 729ccbc9cd si_ -> sel_ 2002-11-26 19:49:00 +00:00
thorpej 5b009a398e Avoid strict-alias warnings. 2002-11-25 02:14:30 +00:00
thorpej 0aa1f82268 Remove an unnecessary cast in an asm statement. 2002-11-25 02:13:59 +00:00
wiz e78e668887 Fix typo (responsiness -> responsiveness). 2002-11-22 12:20:58 +00:00
matt 8b4993db5d Convert to register prefixes. Use ANSI string concatenation for
multiline asm strings.
2002-10-31 21:31:08 +00:00
matt c9699a165e Add missing file. 2002-10-30 18:31:39 +00:00
manu 28aec4f521 Added COMPAT_MACH and EXEC_MACHO 2002-10-30 06:45:17 +00:00
manu fe4e91080d Moved binary compatibility options from arch directory to cpu directory 2002-10-30 06:26:42 +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
wrstuden 0ce4a385a5 Should have done this sooner. Bump to version 1.7 to indicate good
alloc.c.
2002-10-18 21:22:40 +00:00
junyoung e4b7588c28 Add NEW_BUFQ_STRATEGY (disabled by default). 2002-10-18 15:11:08 +00:00
elric 5ab71e20b0 Added commented out cgd(4)s to GENERIC configs. 2002-10-14 18:39:22 +00:00
wiz 65cd27e43e Support 48kHz by using aurateconv.
Based on a patch by TAMURA Kent -- thanks!
2002-10-13 14:43:19 +00:00
provos 2f7a0aaac8 add SYSTRACE; approved perry. 2002-10-06 02:11:54 +00:00
elric d19d268a95 assign majors for raw and cooked cgd's. 2002-10-04 18:28:24 +00:00
jdolecek a38b5eed0e adapt to latest dev/ic/wi* changes 2002-10-02 20:13:48 +00:00
thorpej c5e91d447d Use CFATTACH_DECL(). 2002-10-02 04:55:47 +00:00
dbj 3aef72ec67 add options APPLE_UFS
This enables Apple UFS support added by PR #17345
2002-09-28 20:22:33 +00:00
dbj 82e9fcf2f3 add options APPLE_UFS, from PR #17345
add uninorth pci controller, from PR #18427
2002-09-28 20:22:32 +00:00
dbj 6bf135b907 add options APPLE_UFS
This enables Apple UFS support added by PR #17345
2002-09-28 20:22:32 +00:00
dbj 818445e944 recognize FS_APPLEUFS partitions
part of PR #17345
2002-09-28 01:17:09 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
wrstuden 470e4ff3ac Remove vestiges of the syncicache() call originally in powerpc/ofwboot
before rev 1.4. This change makes OF 2.4 machines actually boot, and
it works fine on my OF 2.01 machine. No reports of failures on other
archs.

I expect this change is fine as the original code flushed the just-loaded
ofwboot out of the cache, conditionalized on FIRMWORKSBUGS. In rev.
1.4, the code got in-lined, and changed to actually flush low memory
out of the cache. Since machines kept booting, I expect the firmware
was really flushing the binary out of the cache, so we're fine.
2002-09-27 00:32:17 +00:00
thorpej 71404bb533 Don't include <sys/map.h>. 2002-09-25 22:21:01 +00:00
martti 81e8d78cd4 Add one space between "#option" and "<tab>IPFILTER_DEFAULT_BLOCK" 2002-09-25 11:49:48 +00:00
dbj 53ce9bee47 explicitly set booted_partition to 0, rather than
rely on default value.  It should actually be extracted
from the bootpath instead, but that involves translating
from apple partition map entries to netbsd disklabel entries.
2002-09-22 03:21:44 +00:00
dbj ca0ad7da63 undo an accidentally committed change that was
included in move of bootpath alias expansion
2002-09-22 03:10:14 +00:00
dbj 9343810eed move bootpath alias expansion from initppc() into canonicalize_bootpath() 2002-09-22 03:04:31 +00:00
martti 3b553bac54 Added (commented out) IPFILTER_DEFAULT_BLOCK. 2002-09-20 10:39:48 +00:00
wrstuden 4f7aaad83c Re-add own alloc(). Recent issues with kernels randomly dying on boot
are related to using libsa's alloc(). Problems go away with this alloc().

The problem is that the libsa alloc() assumes we can grab memory off
the end of the program. That assumption doesn't work for us. It's
much better to use the alloc() we were using as it calls OF_claim()
to get memory.
2002-09-20 03:20:24 +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
briggs b3fa829f51 Get rs6000.h from gnu/dist/toolchain/include instead of gnu/dist/include. 2002-09-17 03:55:40 +00:00
dbj c1005e24ba reorganized code slightly that converts a partition map to a disklabel.
No functional change intended by this commit.
2002-09-10 11:31:10 +00:00
dbj 1771e13a7e added defines for new partition types found in the wild:
"Apple_UFS"
  "Apple_Boot"
  "Apple_Loader"
  "Linux"
  "Linux_swap"
removed duplicate define for "Apple_Patches"
2002-09-10 11:28:56 +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
jdolecek 7403e3d736 put back NetBSD RCS Id removed in rev 1.6 2002-09-05 19:23:11 +00:00
wrstuden e85eb3093d Enable memory for cards with 64-bit memory mappings in addition to
32-bit memory mappings. Makes Intel GigE card work in my Beige G3.

Patch from thorpej
2002-08-22 22:47:35 +00:00
aymeric c8bc51526f Remove the key repeating feature.
It is asking for trouble and is useless for the X server.
We can add it back later if need be.
2002-08-14 13:02:58 +00:00
aymeric bb022a80b7 add (commented out) option WSDISPLAY_COMPAT_RAWKBD 2002-08-13 15:03:30 +00:00
aymeric 9e10bd8738 akbd's now have a raw mode, and implement the WSKBDIO_SETMODE ioctl.
Adapted from OpenBSD.
2002-08-13 15:00:42 +00:00
manu 5bd5c7bca2 Guard a variable declaration by #if so that it is not declared if it is not
used.
2002-08-13 09:46:21 +00:00
chs c86bd63e8e for ofb_enable_cache, turn on the BAT_M bit as well to prevent
the framebuffer from getting scrambled on MP systems.
2002-08-07 05:46:13 +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
chs d3c3fef89b add code from tsubai to handle the second CPU on openpic machines.
the second CPU on dual G4 boxes works now.
while I'm here, use mfmsr() and mtmsr() instead of inline asms.
2002-08-06 06:26:19 +00:00
chs ef0d8145a7 avoid races in mp_save_{fpu,vec}_proc() where the other CPU
dumps the state out from under us.
2002-08-06 06:16:04 +00:00
chs 301f1ebf31 move more inlines to cpu.h: mftb(), mftbl() and mfpvr().
(the mftb() in pmap.c only wanted the lower 32 bits, so that's now mftbl()).
2002-08-06 06:14:33 +00:00
chs 23ec03fb27 add a config for GENERIC + MP. 2002-07-28 07:40:13 +00:00
chs fccc379b30 restructure the FPU and AltiVEC code so that it works for MP. 2002-07-28 07:07:44 +00:00
chs f1953a9667 terminate the MP idle stack for the boot CPU. 2002-07-28 07:07:00 +00:00
chs b06c12694c clean up secondary CPU startup.
use atomic operators for IPIs.
restructure the FPU and AltiVEC code so that it works for MP.
2002-07-28 07:06:45 +00:00
chs 1fab9d5375 remove a spurious printf. 2002-07-28 07:00:58 +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
bouyer cd3752a0a3 Wrap debug printf in #ifdef DEBUG/#endif 2002-07-18 13:31:58 +00:00
chs ef1115901f put the OF buffer page in the BSS rather than allocate it at runtime.
from PR 14497.
2002-07-14 20:56:12 +00:00
matt bbab86c27b Enable COMPAT_LINUX 2002-07-12 05:30:24 +00:00
matt 2df1a9cfb4 Add more host-bridges. 2002-07-09 23:51:15 +00:00
matt 4f983e2982 Common OFW code has been moved to powerpc/mpc6xx/ofw_subr.S. Now use it. 2002-07-09 19:21:03 +00:00
hamajima b99ebea79a comment out "options OFB_ENABLE_CACHE" again,
because this makes PowerMac 8500 + Millennium II broken.
OKed by tsubai.
2002-07-09 10:14:18 +00:00
matt 0d4f94281d Change OFB_ENABLE_CACHE to be enabled. 2002-07-07 19:40:05 +00:00
matt 1a8d29efcb Make the gem driver the default now, not the macppc specific gm. 2002-07-07 19:36:47 +00:00
matt 902fd38614 Update OFB_ENABLE_CACHE to search for a empty bat that does not
conflict the USER_SR or one of the kernel SRs.
2002-07-07 18:35:10 +00:00
matt 685778b53b Peform a rototill over the powerpc-based ports.
Move the trap/vector initialization for MPC6xx ports to mpc6xx_machdep.c
Also move softnet, install_extintr, mapiodev, kvtop.  Add common BAT
initialization code.

Add user Altivec support.

Fix calls to OF_call_method in macppc/macppc/machdep.c.

Use ci_fpuproc in cpu_info instead of separate fpuproc.

Add separate syscall.c and defined __HAVE_SYSCALL_INTERN.
2002-07-05 18:45:15 +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
junyoung 3d826105dc alloc_attr -> allocattr
Approved by Matthias Drochner.
2002-07-04 14:37:10 +00:00
matt 76c24da31d Add kttcp device. 2002-06-29 19:04:45 +00:00
itojun 4aac356c0e fwnode* has idhi/idlo locator 2002-06-25 00:32:24 +00:00
itojun 92f9b53eea sync firewire scsi config to the latest reality 2002-06-25 00:29:20 +00:00
nathanw 4ce40595e2 Pass through the PCI configuration ioctls, like vga_pci.c does. 2002-06-24 21:08:37 +00:00
wrstuden 2eb3dc82d8 Fix recent bugs seen on Performa 4400 macppc's by
Makoto Fujiwara <makoto@ki.nu> and Manuel Bouyer <bouyer@netbsd.org>.
Help from Allen Briggs, Jason Thorpe, and Matt Thomas.

We need to call cpu_cache_probe() early in boot (machdep.c).
Add 603 info for completeness, and use NBPG not PAGESIZE, as the
latter relies on uvm being setup (cpu_subr.c).
Let uvm_page_recolor() be called before uvm has been set up; just
note the page coloring value (uvm_page.c).
2002-06-19 17:01:18 +00:00
itojun 4c1feea9d8 correct writedisklabel() on MBR-partitioned disk.
while here, correct labelsector/offset mismatch in writedisklabel,
when readdisklabel() have found the label at nonstandard location
(due to magic number search).  a lot of other ports have the same problem.
2002-06-19 03:10:56 +00:00
itojun 463d764d56 write/readdisklabel are not consistent in MBR-partitioned case;
forbid writes for now (real fix should follow).
2002-06-18 17:25:21 +00:00
wiz a266aad8d4 Fix typo in comment. 2002-06-18 12:35:09 +00:00
itojun 524e044ee5 apm emulation, from openbsd 2002-06-18 05:22:50 +00:00
itojun ddd8d90dc2 KNF (whitespace) 2002-06-18 04:35:02 +00:00
itojun b00d5fb87a extern decl for adbHardware 2002-06-18 04:33:36 +00:00
itojun 0c74b798cb make macppc install floppy IPv6 ready
(we have two floppies anyways, and there's plenty of space in 2nd floppy)
2002-06-18 02:02:20 +00:00
itojun 73941c5096 avoid hardcoding MBR_MAGICOFF and MBR_MAGIC. 2002-06-18 00:37:25 +00:00
itojun 980d7c811b LABELSECTOR is redefined to be 0 on macppc, so it is not usable for MBR
disk label offset.  use hardcoded "1" for now, i guess we need a new #define
in sys/disklabel_mbr.h.  fixes ofwboot to boot kernel off from MBR-formatted
disk.
2002-06-17 23:59:01 +00:00
christos 3b50728cf4 MD systrace gluons. 2002-06-17 16:32:57 +00:00
itojun 9e1c373ba9 make it possible to handle/mount FDISK-partitioned disk.
extended FDISK partitions are not supported yet.
openbsd code was used as reference.
2002-06-17 15:07:06 +00:00
lukem fde6ae6f04 Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
2002-06-17 05:14:02 +00:00
itojun 43397e000b whitespace 2002-06-14 22:43:38 +00:00
itojun a7ec566073 #define CAPS_IS_CONTROL will make caps key a control key (with weird
LCD indicator).  From: "Nathan J. Williams" <nathanw@wasabisystems.com>
(#define name taken from arch/i386/isa/pccons.c)
2002-06-14 22:43:05 +00:00
briggs 8f360b5c1e Disable awacs because on some systems--e.g., a 350MHz G4 GigE--it can
generate interrupt storms which render the machine essentially unusable.
2002-06-07 20:27:14 +00:00
augustss 5d1d917cb8 Make it possible not to have akbd. 2002-06-05 06:33:18 +00:00
drochner d2b9876081 move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
2002-06-02 14:44:35 +00:00
haya de6fbd495c Bugfix: add character device #62 in chrtoblktbl[]. 2002-05-28 10:01:23 +00:00
lukem 633e8d9515 minor cosmetic tweaks:
- put \r\n before OF_open message
- use  '0' + i % 10  instead of  'A' + i  to print the read block number
2002-05-18 04:24:22 +00:00
lukem 4fa13b2be7 nuke MD installboot, now that it doesn't understand the macppc
bootblocks anymore and /usr/sbin/installboot does
2002-05-18 04:06:12 +00:00
lukem 7f3c3f9b76 Fixes from Bill Studenmund and Allen Briggs:
- setup a 32KB (+32byte) stack, instead of 4KB stack
- cache flush: use _start instead of 0x4000, and flush 2k instead of 1k

Features (by me):
- implement:
	OF_write() (and grab "stdout" from "/chosen")
	putstrn(s,n) using OF_write(); write string s of n bytes long
	putstr(s); write fixed-sized string s
	putc(c); write char c
- add some useful messages which output the status of loading the
  stage 2 bootstrap (which is usually ofwboot)

This code now works on Bill's Beige G3!
2002-05-17 18:45:55 +00:00