Commit Graph

363 Commits

Author SHA1 Message Date
cegger df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
dsl 7cc9af7d64 ANSIfy functions with function-pointer arguments 2009-03-16 23:11:09 +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
dsl 02cdf4d2c8 Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
2009-03-14 14:45:51 +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
jym 92ae85d18e Changes to MEMORY_RBFLAGS option:
- renamed to MEMORY_DISK_RBFLAGS to better fit the rest of the
MEMORY_DISK options(4)
- change default value to RB_AUTOBOOT instead of RB_SINGLE, and adapt
the config(5) files accordingly
- document this option inside options(4)

See also http://mail-index.netbsd.org/tech-kern/2008/12/25/msg003924.html

Reviewed by abs@ in private mail.
2009-02-06 18:50:26 +00:00
pgoyette 0e3187ea05 Add support for i2c quick_{read,write} protocols.
OK'd by nisimura@
2009-02-04 13:53:19 +00:00
nisimura 0ec9d4427f Some fixes and a bit consistency.
- naming practice of reverse endian PCI register access macros.
- kse.c, errors in P1SR access and P1CR4 definition.
- nvt.c, redundant device ID check.
2009-01-25 03:39:28 +00:00
mrg c6a4afa995 add COMPAT_50 to all the configs with COMPAT_40. 2009-01-24 05:06:05 +00:00
tsutsui 69cf32a782 Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

satime_t (currently unsigned int):
 numbers in seconds returned by the machine dependent getsecs() function
 which are used to measure relative time

saseconds_t (currently int):
 numbers in seconds used to specify timeout to network drivers

Per discussion on current-users.
2009-01-12 11:32:43 +00:00
tsutsui 6945dc39ed Move declarations into a common header. 2009-01-12 09:41:58 +00:00
tsutsui 27d0a967bd Enable and fix prototype warnings. 2009-01-12 08:06:54 +00:00
martin 719a906ef5 As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
2008-11-30 18:21:31 +00:00
ad 6ba528b5bc Remove softdep, pass 1. We are focused on improving journalling.
Proposed on tech-kern@.
2008-11-24 11:41:07 +00:00
ad 5b57d1bcce LKM -> MODULAR 2008-11-13 10:51:23 +00:00
ad 0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
dyoung 94d985722a It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled.  So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks().  Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown().  No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown().  I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that.  Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.
2008-11-11 06:46:40 +00:00
tls fca9d633b9 Add accept filters to GENERIC kernels where they exist. 2008-08-10 15:31:20 +00:00
simonb 0751ba4bff Add "options WAPBL" to standard GENERIC/INSTALL type configs. 2008-07-31 07:40:59 +00:00
nisimura 53a4931ada - add two more PCI NICs to code heap; SMsC LAN9420 (sme.c) and
Micrel KSZ8841/8842 (kse.c).
2008-05-31 01:43:57 +00:00
ad 48ced055d4 pci_intr_setattr(), allows PCI interrupts to be marked MPSAFE on x86, and
other platforms if the code is added.

pci_intr_map(...)
pci_intr_setattr(pc, ih, PCI_INTR_MPSAFE, 1);
pci_intr_establish(...)
2008-05-30 19:26:35 +00:00
nisimura ad5b6b45cd - add brdsetup.c left uncomitted over half month.
- fixes on tlp.c; more cautious about TCH/TER/RCH/RER usage and
avoid self-pointing TER.
- stylize structs and #define order to highlight similarities and
differences.
2008-05-30 14:54:16 +00:00
nisimura a63b802fd7 - cut half main.c and have brdsetup.c for cpu/board specifics.
- introduce match() routine to stylise the way to pickup a PCI
  device driver.
- fix tlp.c error in the previous commit.
2008-05-14 23:14:11 +00:00
nisimura ba7dbc0c82 CAL cache alignment band-aid for BMR register. 2008-05-12 11:56:15 +00:00
nisimura 21ef04a5a6 sprincle volatile attribute for struct desc on memory to ease the
target HW dependency on cache characteristic and load-store
serialization, and GCC compile time optimization strength.
2008-05-12 09:58:36 +00:00
nisimura 3352c438fc Assign copyright notices. 2008-05-12 09:29:56 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
nisimura ada4901876 - make pci.c construct more canonical. PCI bus plumbing groveller
now take a ptr to a function and an opaque data to achieve the
  specific work.
- this file is going to become a general form when brd specific
  params are encapsulated in an instance as struct.
2008-04-19 04:57:55 +00:00
nisimura 0571a09251 porting explanation take 2 after an accidental quit from CVS editor.
- target differences are considered minor and adaptable by heuristics
  in pci/pci_machdep.c and machdep.c.
- kernel expects sane runtime HW settings when it gains control.
  All tweaks should have been completed by bootloader.
- consults stand/ for reference. The implementation will change
  from time to time.

communications to power control satelite processor is to be done by
a kernel thread and sysctl knobs with help of possible user agent
deamon.
2008-04-19 02:01:03 +00:00
nisimura ce3843236c bootinfo usage and porting guide.
- Kernel expects a ptr to bootinfo structure in arg3.
- The bootinfo definition is in include/bootinfo.h
- CLOCK and CONSOLE designations are important during initial bringup
  efforts.  machdep.c consults memory controller parameters when no
  MEMORY was specified.
- autoconf.c determines ROOTDEVICE and BOOTPATH.
- target differences
2008-04-19 01:22:35 +00:00
nisimura e11b7f14dc - fix an indentation error in atawd.c
- use partition 'e' for a disk with no NetBSD slice.
- add Linux ATAG to feature ELF Linux kernel booting. Commented out for now.
- fix errors to retrieve iospace BARs.
2008-04-09 16:26:29 +00:00
nisimura 2553846738 - bind wd_softc to f->f_devdata.
- allow to have BSDFFS, EXT2FS and DOSFS on disk drive.
- the bootloader name is becoming unappropriate.
2008-04-09 06:07:57 +00:00
nisimura 1e77327a1b - abandon to maintain disksubr.c in favour of kern/subr_disk_mbr.c. 2008-04-09 01:56:19 +00:00
nisimura 6d7713a9a1 - use a hardwired value for ISA/PCI iospace until the right solution
to find.
- use const [] construct for register location lookup.
2008-04-09 01:08:39 +00:00
nisimura 8ec93217ac - typo in MBR offset.
- redo the previous change in main.c and wm.c
2008-04-09 00:20:35 +00:00
nisimura 7c716f683a - note a comment about a discovery of viaide BAR read value weirdness.
- have RAID and SATA PCI storage subclass.
- cosmetics around NIC drivers.
2008-04-08 23:59:03 +00:00
nisimura a6da47bdf3 - Synology DS407 is a MPC8349E product.
- quick comparison between 8349E-mITXE eval and DS407.
2008-04-07 16:36:50 +00:00
nisimura 03449cb522 - accomodation for the case when TICK_PER_SEC is other than 100MHz. 2008-04-07 15:46:25 +00:00
nisimura 60c7b05675 - honour CONSPEED to determine EMUB console UDMB/UDLB register values.
- remove stray lines from siisata.c
2008-04-07 15:20:19 +00:00
nisimura b06d491b48 - refer to how to use 57600bps console on the 2nd EUMB serial case. 2008-04-07 14:55:24 +00:00
nisimura 7aad948b25 - assign console on at 0x4600 for GENERIC.NAS configuration. 2008-04-07 14:40:46 +00:00
nisimura ac96fb2beb - add siisata.c in Makefile.
- use DEVTOV() to highlight vtophys() issue.
- VIA NICs do not stretch less than 60 octet frames.
2008-04-07 13:25:31 +00:00
nisimura a904272206 - add siisata.c which should cover SiI 3112, 3512 and 3114.
- include IDE/SATA definitions in globals.h.
2008-04-07 12:33:57 +00:00
nisimura bc0567728b add PCIIDE functionality which should cover cmdide, iteide, viaide and
slide.  Still not in working order.
2008-04-07 11:13:14 +00:00
nisimura a0f6082331 - add MII bitbang op modelled after sip.c 2008-04-07 02:02:39 +00:00
tsutsui 19a464fa71 - fix build with OBJDIR
- clean more generated files
2008-04-05 07:33:00 +00:00
tsutsui 9252161713 Use htole32() on preparing setup packet. 2008-04-05 06:46:39 +00:00
nisimura a59dc1792e - add COMPAT_40
- add #options WAPBL for journalled BSDFFS for GENERIC.NAS
2008-04-05 04:13:48 +00:00
nisimura 1976aeb78e add rootfs on disk bootinfo case. 2008-04-05 04:05:06 +00:00