Commit Graph

1218 Commits

Author SHA1 Message Date
macallan
9924280d80 add some constants, clarify some hw limitations 2011-05-17 22:26:33 +00:00
dyoung
a6b2b8396b PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name.  Correct that.

Rename PCI_FLAGS_IO_ENABLED to PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_ENABLED to PCI_FLAGS_MEM_OKAY, thus making their names
consistent with the other PCI flags and poisoning 3rd-party driver
sources that use the flags in the old bad way.

This patch produces no binary changes in this set of PCI kernels when
they are compiled w/o 'options DIAGNOSTIC' and w/ -V MKREPRO=yes:

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
2011-05-17 17:34:47 +00:00
dyoung
3d7646747e Now that GENERIC32_IPX3x builds again, fix some pci_attach_args
constification that I'd missed.
2011-05-11 17:49:31 +00:00
joerg
e958063324 Remove IRIX emulation 2011-04-26 16:36:40 +00:00
rmind
2626d57668 Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency.  Remove some unnecessary malloc.h inclusions as well.
2011-04-24 16:26:51 +00:00
plunky
7ed121adfb use PRIx64 for printing 64-bit values 2011-04-13 16:22:09 +00:00
macallan
713b73c8c5 add mode setting support
If we find a monitor via DDC we switch to its preferred mode if it reports one,
otherwise stick with whatever the firmware set up.
2011-04-07 01:20:31 +00:00
macallan
0c7466a2ae defflag CRMFB_DEBUG 2011-04-07 01:07:31 +00:00
macallan
4ac5047fdd remove some old debug code 2011-04-04 22:50:36 +00:00
macallan
95c4a4389f crmfb needs edid and friends now 2011-04-04 22:15:13 +00:00
macallan
9b94525a54 add DDC2 support. Not too useful yet. 2011-03-31 00:01:08 +00:00
macallan
e313f620d9 device_t-ify, use aprint_*_dev() where appropriate 2011-03-30 19:16:35 +00:00
macallan
5bcfbbb873 add a bunch of GBE registers, no functional change (yet) 2011-03-30 18:25:31 +00:00
tsutsui
24157545c8 Include <mips/mips_param.h> after MACHINE is defined. 2011-03-18 16:33:41 +00:00
tsutsui
7567d86ea5 Set correct struct clockframe .intr value for hardclock(9). 2011-03-10 17:22:51 +00:00
he
ac93dee5bb Now that MACHINE is defined in user-land in either
mips/include/mips_param.h or powerpc/include/param.h, stop
trying to re-define it in the port-specific param.h files
when _KERNEL isn't defined.
2011-03-06 20:34:55 +00:00
bouyer
063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
joerg
f795a05e24 Disable COMPAT_IRIX and related code. The usefulness is under discussion
and code that dereferences pointer into userland without proper checking
needs a full audit.
2011-03-05 23:38:40 +00:00
macallan
5bf2d32443 use hardware to draw characters, while there use vcons_replay_msgbuf() 2011-03-01 21:47:13 +00:00
matt
953a720806 Make sure that sgimips64 can build the O32 bootloaders 2011-02-26 16:26:58 +00:00
matt
d42a19b052 Don't rely on having a mips64eb toolchain. 2011-02-25 23:37:32 +00:00
matt
23347d39ed Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework
Deal with arcbios calls being O32 and kernels being N32/N64.
Need to save/restore T8 across arcbios calls.
2011-02-20 07:59:49 +00:00
jmcneill
c5de7f33f9 validate cf_name in driver match method 2011-02-16 23:44:19 +00:00
macallan
afa90556a5 PMAP_NOCACHE -> PGC_NOCACHE where appropriate 2011-02-10 05:55:26 +00:00
rmind
9b6bd2d968 Remove clause 3 (UCB advertising clause) from the University of Utah
copyright.  Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
2011-02-08 20:20:06 +00:00
tsutsui
6e3a84f222 Use CFATTACH_DECL_NEW() (no softc). 2011-01-28 10:20:28 +00:00
tsutsui
8831804ffb Split device_t/softc. Tested on Indy. 2011-01-25 13:22:05 +00:00
tsutsui
fde2c776a7 KNF and misc cosmetics. 2011-01-25 13:12:39 +00:00
tsutsui
58b06e5f7b Split device_t/softc. Tested on Indy. 2011-01-25 12:43:30 +00:00
tsutsui
59f7d57c5c Some KNF and cosmetics. 2011-01-25 12:30:32 +00:00
tsutsui
f016e29297 u_intNN_t -> uintNN_t 2011-01-25 12:21:04 +00:00
tsutsui
984da15cb1 - MAXPHYS is enough for DMA xfer size (hpc->scsi_max_xfer seems too large)
- switch BUS_DMASYNC_*READ and BUS_DMASYNC_*WRITE properly in
  bus_dmamap_sync(9) ops per each xfer dir

Tested on R5000 Indy.
2011-01-25 12:14:02 +00:00
tsutsui
2f9d0dfc33 Small bus_dma(9) tweaks:
- call bus_dmamap_create(9) after bus_dmamem_alloc(9) and bus_dmamem_map(9)
  return successfully
- no need to use PAGE_SIZE for size of descriptor dmamap
- use bus_addr_t to store DMA address
- BUS_DMASYNC_PREWRITE is enough for host-to-device only descriptors

Tested on R5000 Indy.
2011-01-25 12:11:27 +00:00
joerg
5ed8b0e973 Define NOMAN earlier 2011-01-24 19:26:16 +00:00
joerg
98c78ad558 Define NOMAN earlier. 2011-01-23 13:18:02 +00:00
joerg
3c550524b5 Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh.  Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
2011-01-22 19:19:14 +00:00
tsutsui
3ce80fd791 Use ether_aton_r() in sys/net/if_ethersubr.c instead of home grown copies.
Hint from ryo@.  Tested on IP32 mec(4).
2011-01-10 13:29:29 +00:00
matt
6a66466f0c Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits.  Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
2010-12-20 00:25:23 +00:00
hannken
afdfce8e3b Remove unused count from pseudo-device md. 2010-11-23 11:13:52 +00:00
chs
63c9e60bb0 enable COMPAT_LINUX. 2010-07-07 01:32:51 +00:00
cegger
a63798ea7c Turn PMAP_NOCACHE into MI flag.
Add MI flags PMAP_WRITE_COMBINE, PMAP_WRITE_BACK, PMAP_NOCACHE_OVR.
Update pmap(9) manpage.

hppa: Remove MD PMAP_NOCACHE flag as it exists as MI flag
mips: Rename MD PMAP_NOCACHE to PGC_NOCACHE.

x86: Implement new MI flags using Page-Attribute Tables.
x86: Implement BUS_SPACE_MAP_PREFETCHABLE.

Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2010/06/30/msg008458.html

No comments on this last version.
2010-07-06 20:50:33 +00:00
dholland
5ef6a33bb9 Introduce .WAIT into the cleandir rule for blasting the libsa/libkern/etc.
trees, because it can race with the libsa/libkern/etc. makefiles' own
cleandir rules. I think I've found all of the uses of the offending idiom...
Closes PR 43360.
2010-05-27 06:58:12 +00:00
pooka
835e533be4 Remove unused count (invariably "4") from pseudo-device fss. 2010-04-16 13:48:27 +00:00
joerg
58e867556f Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
2010-04-05 07:19:28 +00:00
plunky
04e2ab6ae6 add uhso(4) device where appropriate
- follow the lead of other USB driver declarations wrt commented out
    - (cross-)build tested all these kernels
2010-03-07 09:39:42 +00:00
plunky
c269ebf72f use a MI major number for uhso(4) driver
(requested by mrg)
2010-03-06 23:45:38 +00:00
plunky
4677f8289f add major device for usho(4) driver 2010-03-06 21:31:50 +00:00
joerg
d621e29eca Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
2010-02-08 19:02:25 +00:00
pooka
10fe49d72c Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2010-01-19 22:06:18 +00:00
tsutsui
23e6770b50 Split device_t/softc, some KNF. 2010-01-12 15:20:29 +00:00
tsutsui
59bb42b6d5 Switch to using todr_[gs]ettime_ymdhms() format
which doesn't require struct timeval details.
2010-01-12 15:01:48 +00:00
macallan
12cd8f1e70 make this compile again by sprinkling PRIxWHATEVER 2009-12-17 03:59:31 +00:00
matt
7cce9d88af Fix various build with the 32bit mips ports after the mips64 merge. 2009-12-16 23:19:06 +00:00
matt
f7f663c15c Fix typo (missing -) 2009-12-16 19:00:48 +00:00
mrg
c9eb68e09e convert all mips cpu_intr() to have the standard
(uint32_t, uint32_t, vaddr_t, uint32_t) signature.
2009-12-15 06:01:43 +00:00
matt
290a34a065 Merge from matt-nb5-mips64
Merge mips-specific arch files.
2009-12-14 00:45:59 +00:00
tsutsui
e180a79423 Split device_t/softc, some KNF. 2009-12-13 11:10:50 +00:00
tsutsui
75b234b3c3 Use todr_[gs]ettime_ymdhms() format. 2009-12-13 11:03:33 +00:00
tsutsui
471e528b58 Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
2009-12-12 14:44:08 +00:00
pooka
70d4493c77 Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs.  User functionality remains the same.
2009-12-05 20:11:01 +00:00
tsutsui
48cc740097 Fix typo in comment. 2009-11-27 11:04:18 +00:00
rmind
3f18fe8123 - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places.  Reduce sys/user.h inclusions.
2009-11-27 03:23:03 +00:00
matt
11af2f9cfa Kill proc0paddr. Use lwp0.l_addr instead. 2009-11-26 00:19:11 +00:00
mbalmer
0ae57f90dd more s/the the/the/ 2009-11-22 19:09:15 +00:00
rmind
891259c1af Use lwp_getpcb() on mips, powerpc and sh3, clean from struct user usage. 2009-11-21 17:40:27 +00:00
tsutsui
5d2638c2b1 Replace shutdownhook_establish(9) (which was added by me)
with pmf_device_register1(9).
2009-09-24 14:09:18 +00:00
tsutsui
767b154f7a Use a proper local variable. 2009-09-02 17:22:53 +00:00
tsutsui
0f7a15058c Invert logic around nested pmf(9) registrations for readability. 2009-09-02 10:43:24 +00:00
tsutsui
943109cbb1 Check a return value of pmf_device_register1(9) and also call
pmf_class_network_register(9).
2009-09-01 17:10:42 +00:00
tsutsui
a2ff563552 Replace shutdownhook_establish(9) with pmf_device_register1(9). 2009-09-01 15:19:20 +00:00
he
46ac4b2e55 Remove BOOT_AOUT here as well, mips no longer deals with a.out. 2009-08-23 08:32:22 +00:00
thorpej
125abe92ed Use bus_dmamem_common. 2009-08-21 04:10:33 +00:00
matt
ab902ee68d Move MID_MACHINE to <mips/mips_param.h> and use local values so we don't
need to include exec_aout.h
2009-08-13 05:15:08 +00:00
matt
9b2fb10da6 Nuke a.out support for MIPS. 2009-08-12 23:29:18 +00:00
matt
b2a95bab1e Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)
2009-08-11 17:04:14 +00:00
macallan
f5a0fe39db add panel driver 2009-05-14 01:13:21 +00:00
macallan
2fbe60d5a7 add major number for sysmon 2009-05-14 01:12:58 +00:00
macallan
251df1a41e add a driver for the Indy's front panel buttons.
- power button presses are reported to sysmon
- volume control buttons are reported to PMF
TODO: add better key repeat code. The hardware keeps firing interrupts at us
whenever a button is down and not on - say - status change. If we don't clear
the interrupt we'll be fired on until someone clears it. We should probably
disable the entire interrupt and occasionally poll for button release.
2009-05-14 01:10:19 +00:00
macallan
9fc471919e set delta value for the mixer's master channel 2009-05-14 01:06:15 +00:00
macallan
e6c0357236 remove leftover debug code 2009-05-12 23:51:25 +00:00
tsutsui
a0a1d7acfb Use __func__ to print function names. 2009-05-09 18:31:46 +00:00
uebayasi
58141c8949 Include sys/device.h. Fix build. 2009-04-03 15:41:14 +00:00
uebayasi
8e4e2fe06d Include sys/evcnt.h for struct evcnt, not sys/device.h. 2009-04-03 14:47:48 +00:00
macallan
31e90ebd10 add a few more register definitions, needed by the latest crime_drv. 2009-03-26 04:11:58 +00:00
cegger
df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
tsutsui
31b444f9ae Add a dumb RX hardware TCPv4/UDPv4 checksum support. 2009-03-16 09:58:51 +00:00
tsutsui
312e117cb9 - use <bsd.klinks.mk> to create MD include dir symlinks
- make sure to remove lib subdirs on clean and distclean target
2009-03-15 15:20:12 +00:00
dsl
82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
msaitoh
f9ccf64b65 Fix typo(s/interupt/interrupt/) 2009-03-05 01:38:12 +00:00
macallan
fd92054616 No need to have two pre-defined screen types - just adapt to whatever video
mode we find. Also, redraw screen when X exits.
TODO: find out why characters are drawn upside down, for some bizarre reason
      this happens right after exiting X but the last line is normal.
2009-03-04 01:23:28 +00:00
macallan
74c35b5de8 Comment out some register initialization which the firmware should have taken
care of anyway. Apparently doing this here disrupts newport's blitter
operations and causes a deadlock.
2009-03-03 19:45:55 +00:00
sekiya
223c75c0bc Un-hardcode IP32 serial console bus tags. Fixes regression introduced in revision 1.28. 2009-02-25 09:37:22 +00:00
sekiya
b73781ae2c Pull in Atheros HAL. 2009-02-20 12:57:06 +00:00
he
aa2d981102 The attribute for if_le_oioc.c should apparently be le24, not le,
so that this file is not pulled into the GENERIC32_IP3x kernel,
where am7990.c isn't built.
2009-02-13 23:55:33 +00:00
apb
0cc72e51ac Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
2009-02-13 22:41:00 +00:00
macallan
50f7b2a157 Don't bother drawing a cursor until wsdisplay attaches. This works around
the deadlock I've seen with the previous version.
While there do some KNF policing.
2009-02-13 17:50:36 +00:00
rumble
85716c44d5 Enable Personal IRIS 4D/20 and 4D/25 support:
- Adapt int(4) to handle the INT1 chip
  - Move generic rtc clocks out of hpc/ and into dev/
  - Handle the very strangely wired eeprom and other bits in arcemu
  - Sprinkle MACH_SGI_IP6 as necessary
  - Enable IP6/IP10 devices in GENERIC32_IP12. Yes, the naming is poor but
    there's no winning with kernel/hw compatibility on sgimips...

Tested on my 4D/25. Doesn't (appear to) break macallan@'s IP22.
2009-02-12 06:33:56 +00:00
rumble
0e95582ed1 WD33C93 has only two registers, which often times aren't mapped to adjacent
bus space locations. Map them individually, instead.
2009-02-12 06:24:45 +00:00
macallan
d6232854b7 Become a good vcons citizen.
Also, don't use the cursor sprite as text cursor - it's not worth the pain and
the sprite doesn't have an invert-background plane either so the cursor wasn't
transparent.
Instead blit the cursor using the appropriate ROPs. This way we get rid of the
cursor misplacement problem as well.
While there also use device_t.
TODO: arbitrary font sizes, cleanup, support for mapping all blitter registers
so we can use them from X.
2009-02-12 02:29:58 +00:00