Commit Graph

2117 Commits

Author SHA1 Message Date
roy 594ee076bc Convert to terminfo so we compile. 2010-02-10 14:48:26 +00:00
wiz 8e35c759e7 Fix typo in comment. 2010-02-09 23:05:16 +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
roy 98eb889579 Userland now builds and uses terminfo instead of termcap.
OK: core@, jdc@
2010-02-03 15:34:37 +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
mbalmer a72f71643d Fix typo in comments, no code change. 2009-12-23 09:17:40 +00:00
tsutsui 789c74706a Use appropriate macro during pmap initialization:
- use SYSMAP_VA, SEGSHIFT for Sysmap address and table entries
- use TIA_SIZE, TIB_SIZE for sizes of table entries

Now page size dependent numbers are almost replaced with proper macro.

Tested on atari, hp300, and news68k.
2009-12-11 22:23:08 +00:00
tsutsui 465857f028 Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSEG, and SEGOFSET from <machine/param.h>
  to <m68k/pmap_motorola.h> where they should belong
- also simplify NBSEG macro for both 020/030 and 040/060 cases
- also move m68k_trunc_seg(), m68k_round_seg(), and m68k_seg_offset()
  (that use SEGOFSET) from <m68k/param.h> to <m68k/pmap_motorola.h>
- add comments about each segment size value used on pmap_motorola
  implementation
- add TIA_SIZE, TIA_SHIFT, TIB_SIZE, and TIB_SHIFT macro which can be
  used for ste/pte index sizes
- use proper vaddr_t cast instead of unsigned for SEGOFSET/PGOFSET macro

Tested on atari, hp300, and news68k.
2009-12-11 17:53:22 +00:00
matt 6a9e4e8eeb Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.
2009-12-10 14:13:48 +00:00
rmind e9f7af26e6 Rename L_ADDR to L_PCB and amend some comments accordingly. 2009-12-10 05:10:00 +00:00
tsutsui d7debedc42 Fix wrong NBSEG values for all hp300 pmap derived m68k ports.
They were incorrect since 1997 on amiga and atari, and since 2002
on other ports, but fortunately they don't look so fatal.

Anyway, these values will be moved into <m68k/pmap_motorola.h> soon
since they are quite pmap implementation dependent.
2009-12-09 12:21:58 +00:00
tsutsui 7a77e181aa Use PGSHIFT from <machine/param.h> for PAGE_SHIFT.
We can assume PGSHIFT is always constant on current
m68k pmap_motorola implementation.
Also fix some leftover HP300 comments on some ports.
2009-12-08 13:47:26 +00:00
tsutsui 88e9ae94fe Remove old MD pmap.c files for amiga and atari.
They no longer work due to reorganization of common pmap_motorola.c.
2009-12-06 06:46:25 +00:00
tsutsui 31af389001 Move initialization of protection_codes[] and kernel_pmap()
from MD pmap bootstrap sources to common pmap_bootstrap_finalize().

Tested on atari, hp300, mac68k, and news68k.

XXX: Why is protection_codes[] array initialized at run time?
2009-12-06 06:41:28 +00:00
tsutsui a1e417bc5e pm_stfree in struct pmap is a bitmap value so make it unsigned. 2009-12-06 00:33:58 +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 4dfd269061 Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc.
Tested on TT030.
2009-12-02 15:53:34 +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
abs 2e92448c47 Fix a missed proc -> lwp change, only compiled if NWSKBD 2009-11-25 20:40:41 +00:00
abs 02e99d3d5c Do not include FPU_EMULATE in ATARITT only config 2009-11-23 00:18:37 +00:00
rmind 3dc24f5a91 Use lwp_getpcb() on m68k ports, clean from struct user usage. 2009-11-23 00:11:42 +00:00
cegger 9480c51b04 Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
2009-11-07 07:27:40 +00:00
snj 0c15144ae1 Drop 3rd and 4th clauses. Approved by thomas@ (copyright holder). 2009-10-21 21:57:39 +00:00
snj 7f108050aa Drop 3rd and 4th clause. Approved by leo@ and thomas@ (copyright holders). 2009-10-21 21:50:14 +00:00
rmind 40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
snj 4988388746 Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@. 2009-10-20 19:10:09 +00:00
tsutsui 437ae37c1d Switch the atari port to the common m68k/m68k/pmap_motorola.c, at last. 2009-10-19 13:40:28 +00:00
thorpej b5fd5d5727 Minor tweak to the pv_table management in the Hibler-derived m68k pmaps:
The head of the list is now a pv_header, which contains the first pv_entry
as well as a 16-bit attributes field (replaces the pmap_attributes array
plus the pv_entry::pv_flags field) as a 16-bit count of caller-specified
cache-inhibited mappings.

Tested on hp300 (shared pmap_motorola.c), changes to atari and amiga copies
are purely mechanical.
2009-08-26 00:30:01 +00:00
tsutsui 360f84f6f4 KNF, ANSIfy etc. 2009-08-24 13:04:37 +00:00
tsutsui eb60dd4479 Use __arraycount(). 2009-08-24 13:03:43 +00:00
tsutsui 8c2e6a929c Use proper pointer types and names rather than casts for readability. 2009-08-23 13:46:48 +00:00
mrg 5401d28313 fix atari builds in two ways:
- isa_detach_hook() was missing a parameter name (hi dyoung!)
- PCI_CONF_SIZE -> PCI_CONFIG_SIZE; pcivar.h has a PCI_CONF_SIZE now (hi jak!)
2009-08-23 01:27:12 +00:00
tsutsui 8c3b6bd439 wrap long lines, fix indent. 2009-08-22 18:26:42 +00:00
tsutsui 0228fe92d4 Rewrite binpatch(8) utility to add support for ELF binaries,
using implementation of old src/usr.sbin/mdsetimage sources
which supports misc executable formats without LGPL'ed libbfd.

No particular comments on port-atari@.

XXX1: amiga also has the similar utility in amiga/stand/binpatch
      but it has slightly different options.
XXX2: Is it worth to put this utility into MI src/usr.sbin to patch
      rtc_offset etc. in GENERIC kernel binaries in distribution?
2009-08-20 15:14:49 +00:00
he a52ef0cc60 Another needing <sys/exec_aout.h>. 2009-08-19 23:46:52 +00:00
he 250f9cc973 One more file needing <sys/exec_aout.h>. 2009-08-19 19:39:05 +00:00
dyoung 5619bf1cbb isa_detach_hook() needs two arguments, the first an isa_chipset_tag_t. 2009-08-19 15:14:59 +00:00
dyoung ab367b5fb7 (Re-)define isa_detach_hook(), and define isa_dmadestroy(). Update
some isa_chipset_tag_t->ic_detach_hook() definitions.
2009-08-19 15:09:56 +00:00
thorpej 97a2657a66 Add a real API for testing if a page is a managed page, and adjust callers
to stop relying on vm_physseg_find() for this purpose.
2009-08-18 18:06:53 +00:00
dyoung 47b66b70d9 These are stragglers from my last commit ("Let us safely detach
the ISA bus and devices attaching to the ISA bus").  Define
isa_detach_hook() in MD ISA implementations.  Define isa_dmadestroy().
2009-08-18 17:02:00 +00:00
tsutsui 6e74d97975 Read AD_CFG_SWITCH via volatile pointer so that
the default density is detected correctly.
2009-07-31 15:55:10 +00:00
tsutsui 3685aebdb6 Replace one missed bcopy(9) with memcpy(9). 2009-07-19 05:46:15 +00:00
tsutsui 95b880f361 Remove extra whitespace added by a dumb tool which replaced bcopy with memcpy. 2009-07-19 05:43:22 +00:00
tsutsui 0a36a9ab42 Merge local <atari/atari/intr.h> into common <machine/intr.h>. 2009-07-08 12:23:09 +00:00
tsutsui 2d065ae111 KNF, ANSIfy, etc. 2009-07-07 16:16:18 +00:00
tsutsui d41c06b17d Explicitly initialize the MFP Timer-B for delay(9) from atari_hwinit()
rather than using if(!atari_realconfig) in clockmatch().
(I doubt the latter one has actually been called..)
2009-07-07 15:37:02 +00:00
tsutsui 0745bac2ee Some KNF and cosmetics. 2009-07-07 15:15:35 +00:00
tsutsui 77d3988d38 Add a workaround for annoying
"WARNING: negative runtime; monotonic clock has gone backwards"
message. Partially taken from hp300.
2009-07-07 15:15:08 +00:00
tsutsui 804d5cbf1a Fix a botch in RELOC_PA() macro introduced in rev 1.80
inside #if defind(M68040) || defined(68060)/#endif block.
Noticed by he@.
2009-07-06 12:55:24 +00:00
tsutsui a97d19521c Replace traditional MD si_callback() with MI softint(9). 2009-07-03 17:05:54 +00:00
tsutsui e5de2deeb2 Replace one traditional MD si_callback() with MI softint(9). 2009-07-03 14:00:41 +00:00
tsutsui e8940e0b5d Use more uint8_t, and constify. 2009-07-03 13:49:39 +00:00
tsutsui 21d83b6b0f KNF, use uint8_t, and misc cosmetics. 2009-07-03 13:36:09 +00:00
tsutsui fc984c2617 Define and use macro to calculate kernel physical addresses
after relocation to TT RAM. No binary changes.
2009-07-01 13:44:32 +00:00
cegger 1d89a182fb change pmap flags argument from int to u_int.
discussed with christos@ on source-changes-d@
2009-04-21 21:29:58 +00:00
tsutsui e90ec2adcc Remove extra whitespace added by a dumb tool. 2009-03-31 11:48:15 +00:00
tsutsui d008724eb5 Switch atari standalone bootloaders to using MI libsa and libkern.
Tested by David Ross on port-atari@. Thanks!
2009-03-31 11:42:07 +00:00
tsutsui 18014b1a99 Remove bcmp() from MD libsa.
XXX: These ports should be rewritten to use MI libsa for maintainability.
2009-03-19 10:19:33 +00:00
cegger e2cb85904d bcopy -> memcpy 2009-03-18 17:06:41 +00:00
cegger c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
cegger 35fb64746b bcmp -> memcmp 2009-03-18 15:14:29 +00:00
cegger df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
he 62db563030 Re-balance parenthesis in a couple of places. 2009-03-17 10:16:55 +00:00
he 62f5486c1b Make a couple of functions conform to the prototype, restoring buildability. 2009-03-17 00:18:40 +00:00
dsl 7cc9af7d64 ANSIfy functions with function-pointer arguments 2009-03-16 23:11:09 +00:00
tsutsui b8675b75eb Use <bsd.klinks.mk> to create MD include dir symlinks. 2009-03-15 11:45:30 +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
abs 072d8cc491 Use separate free lists for TT and ST ram, and give TT a lower id
so all TT ram will be used before any ST ram. (free_list param to
uvm_page_physload())
Tested on a TT with and without TT ram.
2009-03-13 19:08:20 +00:00
tsutsui 981d751aa3 ANSIfy, some KNF, misc cosmetics. 2009-03-08 05:25:30 +00:00
abs 84c870d611 Regenerate after shrinking kernels to fit on floppies 2009-03-06 23:38:41 +00:00
abs 1c76e24a27 Shuffle some things around and comment out some options to try to ensure
we can fit a gzipped SMALL030 on a 720K floppy and FALCON / ATARITT on
1.44MB ones
2009-03-06 23:38:07 +00:00
joerg f5b0fec0e0 Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
2009-03-06 20:31:46 +00:00
tsutsui 50dbef0dcb Some KNF. 2009-03-05 13:42:59 +00:00
tsutsui 30b8022325 Remove __P(). 2009-03-05 13:21:44 +00:00
tsutsui 4a10dc6ecc Remove __P(). 2009-03-05 13:00:45 +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
tjam 7ffdc72669 Use 8KB buffer for ZLRB_RING_SIZE to prevent overruns 2009-01-28 19:57:37 +00:00
tjam 99752e43b2 Remove sicallback to use the MI softint(9) APIs directly - from Tsutsui 2009-01-28 19:55:51 +00:00
martin f055e18205 Centralize fpu exception to siginfo code encoding for all m68k archs,
fixes a failure in the lib/libc/ieeefp/except regression test.
2009-01-27 20:30:12 +00:00
abs a192b2c217 Abstract out setting of '-m680X0' based on -DM68020, -DM68030,
-DM68040, and -DM68060 into sys/arch/m68k/Makefile.cmachflags and
include from both atari and amiga. Other m68k ports which build
kernels that support multiple CPU types can also switch across to
this.
2009-01-25 22:25:08 +00:00
mrg c6a4afa995 add COMPAT_50 to all the configs with COMPAT_40. 2009-01-24 05:06:05 +00:00
tsutsui 1e5c3b25c8 Replace multi-statement macro using GCC extension `({})' with
static inline functions to avoid possible side effects or confusion.

Tested on TT030 by David Ross and on Falcon by Tuomo Makinen on port-atari.
2009-01-24 02:02:38 +00:00
tsutsui 6d3b1b1ecd Use pmap_kenter_pa(9) to map msgbufpa as other m68k ports.
Tested on TT030 by David Ross and on Falcon by Tuomo Makinen on port-atari.
2009-01-24 02:01:01 +00:00
abs 548de22a7a - Rename BOOT to SMALL030 and trim some more fat
- Drop BOOTX
- Regenerate everything else - only changes in comments
2009-01-24 00:22:12 +00:00
abs 3a821eebde - Merge ATARITT.in and FALCON.in into GENERIC.in so we can generate
a sane kernel config which defines both of them
- Cleanup all the #if defined(FOO) entries to be consistent and have
  a matching /* FOO */ on the #endif line
- No change to generated ATARITT/FALCON/HADES/MILAN-ISAIDE/MILAN-PCIIDE
- Rename BOOT to SMALL030 and trim a little more to save space.
- Drop BOOTX
2009-01-24 00:19:47 +00:00
he d4b1297c8f Re-adapt to the changed return types for major() and minor(). 2009-01-21 16:24:33 +00:00
tsutsui 00ae5151a8 Move extern decls for Sysseg, Sysptmap, Sysptsize, mem_size, virtual_avail,
virtual_end, and protection_codes[] to common <m68k/pmap_motorola.h>,
and also make protection_codes[] unsigned.

XXX: avail_start and avail_end should also be moved, but it causes
XXX: -Wshadow warnings in uvm/uvm_page.c:uvm_page_physload() and
XXX: I don't have a good idea of alternative names for now.
2009-01-17 07:17:35 +00:00
tsutsui 77938e8d54 Use firm_gettime() to retain compatibility with old firm_event. From amiga. 2009-01-17 05:23:28 +00:00
tsutsui b5ead86432 Use PRIu64 to print 64 bit dev_t (for now). 2009-01-17 05:22:00 +00:00
tsutsui 145f39b7b6 Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.

Problem on default installation with sysinst was reported by David Ross.
2009-01-13 13:44:01 +00:00
yamt 70de973662 g/c BUFQ_FOO() macros and use bufq_foo() directly. 2009-01-13 13:33:58 +00:00
tsutsui fe5a481b54 Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
 because modern aggressive gcc4 may reorder functions in the same source
 and the first function in a C source won't always appear at the beginning
 in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
  explicitly include it from each Makefile because the stand
  directory contains non standalone programs like installboot and
  Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
  all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
  - create machine and m68k symlinks in ${.OBJDIR} in all boot programs
  - set appropriate make environments to suppress errors and warnings
  - <string.h> isn't there in _STANDALONE case
  - put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
    to some files in stand/tostools
  - use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
  and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
  in all boot programs
  (XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
  support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
2009-01-06 13:35:30 +00:00
tsutsui 636ff16d48 Use howmany(x, y) rather than roundup(x, y)/y. No binary change. 2009-01-04 04:18:35 +00:00
tsutsui cff68ad349 Sync with an update on amiga:
Rewrite a weird calculation marked "XXX fix calculations XXX"
for an index value of lev2 segment table for the kernel Sysptmap
with more meaningful expressions and PAGE_SIZE independent macro.
Also use "~0" rather than "-1" for an unsigned bitmap value.

Should produce the same results and no functional change.

Tested on Falcon with 68060 by Tuomo Makinen.
2009-01-03 07:11:02 +00:00
tsutsui c61c988be5 Raise IPL to splsoftnet() before calling callback functions registered
via (atari specific) add_sicallback(), as a workaround hack.

Many drivers which use the MD sicallback depend on BASEPRI() macro
defined in <machine/cpu.h> to check nested interrupts,
but functions invoked from MI softint(9) won't run at IPL_SOFT
any longer and the BASEPRI() macro doesn't return expected value
as the past.

Fixes lost interrupt problem on Falcon wdc(4) reported by
Tuomo Makinen on port-atari, and also confirmed by him.

Should be pulled up to netbsd-5.
2009-01-03 06:36:58 +00:00
tsutsui cf6816d68a Update one more comment which was missed in previous. 2009-01-02 04:38:09 +00:00
tsutsui 21ac960f24 Remove declarations of CADDR1, CADDR2, and vmmap.
These variables have been moved into pmap_bootstrap.c
and <m68k/pmap_motorola.h> has extern decls for them.
2009-01-01 08:11:45 +00:00
tsutsui 8e2bef0189 Pull the following amiga's pmap changes to atari:
arch/amiga/amiga/amiga_init.c		1.95-1.97, 1.100-1.102
arch/amiga/amiga/pmap.c			1.123, 1.126-1.131, 1.142, 1.145
arch/amiga/amiga/pmap_bootstrap.c	1.1, 1.2, 1.3, 1.4
arch/amiga/conf/files.amiga		1.137
arch/amiga/include/pcb.h		1.16
arch/amiga/include/pmap.h		1.44
arch/amiga/include/pte.h		1.19
arch/amiga/include/vmparam.h		1.35

- change kernel address space layout (i.e. move Sysmap to the end of KVA)
  to match other m68k ports, which should be done on yamt-km merge
- rework pmap_zero_page(), pmap_copy_page() and some more other functions
  to make them compatible with m68k/pmap_motorola.c
- move pmap_bootstrap() into a separate file to allow using either
  the atari pmap.c or the m68k common pmap_motorola.c
- use common m68k include files, pcb.h, pmap_motorola.h, and pte_motorola.h
- misc style and cosmetic changes

Most merge work is done by Tuomo Makinen, and
miscellaneous fixes and cleanups are done by me.

Tested on Falcon with both 68030 and 68060 by Tuomo, and
also tested on TT030 by David Ross on port-atari.

Should be pulled up to netbsd-4 (it requires at least Sysmap changes)
and netbsd-5.
2009-01-01 04:10:25 +00:00
tsutsui d38ce2ebbc Pull a change from amiga/pmap.c rev 1.124 for yamt-idlelwp merge. 2009-01-01 03:43:30 +00:00
tsutsui baffe80103 Remove quite obsolete pcb_cmap2. 2008-12-31 11:11:05 +00:00
tsutsui 7d8d4998c1 Fix broken RCS Id. 2008-12-28 23:00:39 +00:00
tsutsui fd6ad22aed Clear bp->b_oflags (introduced on vmlocking2 merge) before read
rather than calling brelse(9) after read.
Tested by Tuomo Makinen on port-atari.

Should fix pool panics during installation reported by David Ross
on port-atari:
http://mail-index.NetBSD.org/port-atari/2008/11/13/msg000113.html
and actually close PR port-atari/39850.
2008-12-28 03:13:59 +00:00
tsutsui 8a0754e5d7 Account idepth in all interrupt handlers in locore.s. 2008-12-27 16:17:24 +00:00
tsutsui d79dc17147 Sprinkle volatile to bus_space(9) access functions. 2008-12-27 16:14:12 +00:00
cegger dcf705893e use M_ZERO on malloc() and remove subsequent bzero(). 2008-12-19 18:49:37 +00:00
he 1c6fe739fe Correct two typos and remove a now-unused variable to make this
build again.
2008-12-18 10:58:17 +00:00
christos 9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +00:00
pooka ee352f3d33 Make kernel_pmap_ptr a const. Requested by steve_martin. 2008-12-10 11:10:17 +00:00
pooka 29d439f898 Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module.  pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
2008-12-09 20:45:44 +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 93ea4650a6 dumpsys: don't spew numbers into the log. 2008-11-25 15:51:34 +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
abs b53939be13 To be safe, do not use DMA for Falcon - from Tuomo 2008-11-15 21:35:31 +00:00
abs 5dd888f5c3 Since dl.d_type is always "unknown" now, pick the type of bootblock to
install based on the device name: eg /dev/fd0c would be floppy
2008-11-15 21:33:12 +00:00
abs 58051692c8 Remove bogus DEBUG uvm_map() calls - (sync with amiga pmap). From Tuomo 2008-11-15 21:30:50 +00:00
abs 85609809d6 Regenerate: Increase min ST_POOL_SIZE from 22 to 24 to avoid out of ST memory issues. Tested by Tuomo 2008-11-15 21:22:03 +00:00
abs 53aa0265b2 Increase min ST_POOL_SIZE from 22 to 24 to avoid out of ST memory issues. Tested by Tuomo 2008-11-15 21:21: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
abs 66b0aa634e Regenerate from GENERIC.in 1.75
Enable 68060 support in FALCON & BOOTX kernels for CT60/63 upgrades
Drop KERNFS from INSTALL kernels
Drop 68040 support from ATARITT kernels
2008-11-09 07:50:39 +00:00
abs 0282f5b26e Enable 68060 support in FALCON & BOOTX kernels for CT60/63 upgrades
Drop KERNFS from INSTALL kernels
Drop 68040 support from ATARITT kernels
2008-11-09 07:49:59 +00:00
abs 96dc40fee6 Add the following note to README:
Please commit changes to 'GENERIC.in' and other source files *first*, then
 run 'makeconf' and commit the generated files to ensure the 'Created from:'
 tags are correct.

Then follow it. Noted by tsutsui@
2008-11-06 17:12:20 +00:00
abs 09149f66a7 Add a note that SERCONSOLE breaks on the Falcon, and remove from
FALCON config.
2008-11-05 23:55:06 +00:00
abs d36d67412b Another fix from Tuomo Makinen - Use brelse() to unbusy bp buffer
to allow user to swap floppy disks when prompted.
2008-11-04 17:08:45 +00:00
abs 7bb734ab12 Move tc_init(&clk_timecounter); to stop the "timecounter:" message
appearing in the middle of the clock0 attach message. Tested by
Tuomo Makinen
2008-11-04 16:43:47 +00:00
abs 87d661967a Cleanup spelling and syntax in a comment 2008-10-29 14:31:01 +00:00
abs eb89868e67 Remove unwanted 'xs->xs_status |= XS_STS_DONE' which caused scsipi_done()
to bail out early.
Found by T. Makinen, and additional confirmation by David Ross
2008-10-28 11:44:14 +00:00
apb f46c1de7cb Use ${TOOL_SED} instead if plain sed in Makefiles. 2008-10-25 22:27:34 +00:00
apb 96230fab84 Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
2008-10-19 22:05:19 +00:00
wrstuden fc7511b00e Merge wrstuden-revivesa into HEAD. 2008-10-15 06:51:17 +00:00
simonb dc9029a896 Regen for "options WAPBL". 2008-07-31 07:48:37 +00:00
simonb ef38d7e5a7 Move "options WAPBL" so that it also gets added to INSTALL kernels. 2008-07-31 07:47:43 +00:00
simonb 0751ba4bff Add "options WAPBL" to standard GENERIC/INSTALL type configs. 2008-07-31 07:40:59 +00:00
tsutsui 1a160ac866 Specify volatile to some pointers to access DMA registers. 2008-07-20 16:35:27 +00:00
tsutsui 471f4d63c3 No need to specify '&' to get array's address.
No binary changes.
2008-07-20 16:28:24 +00:00
tsutsui b55114eae7 Fix pointer arithmetic botch in rev 1.37. 2008-07-20 16:23:38 +00:00
ad b94f79f0e8 Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@. 2008-07-02 17:28:54 +00:00
tsutsui 2c77262457 Sync with arch/m68k/m68k/pmap_motorola.c rev 1.38:
> Remove ({ }) gcc extensions and use static inline functions instead.
2008-06-29 09:03:47 +00:00
isaki 3e6d14da34 Unify splraiseipl(9) implementation among m68k ports,
discussed with tsutsui@ on port-m68k. OK'ed by jdc@.

For atari:
- export ipl2psl_table[] and make it uint16_t
- make makeiplcookie(9) inline
- put PSL_S bit into ipl2psl_table[] rather than adding it in makeiplcookie(9)
- vme/if_le_vme.c: fix a wrong usage of IPL_NET
2008-06-28 05:26:33 +00:00
cegger 947c9ab610 use device_lookup_private to get softc 2008-06-13 08:49:15 +00:00
tsutsui cb09de1924 Use device_private() and device_lookup_privat() to get softc. 2008-06-11 14:35:53 +00:00
ad 06c343ac94 vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both. 2008-06-04 12:41:40 +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
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin 3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
tsutsui 285b0f56d9 Fix warnings #ifdef DEBUG case. 2008-04-27 14:44:25 +00:00
tsutsui c070e2d90e - use mutex(9) for uvm_kernel_object
- fix warnings in #ifdef DEBUG
2008-04-27 14:44:04 +00:00
ad 284c2b9aef Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
2008-04-24 18:39:20 +00:00
tsutsui d9941582bf Split device_t/softc for le(4) and variants and misc cosmetic changes. 2008-04-04 12:25:06 +00:00
cube a27f79f69e Use M_TEMP for allocations instead of the now deceased M_IOCTLOPS. 2008-03-23 15:50:51 +00:00
cube 7aa6248cdf Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
2008-03-18 20:46:35 +00:00
yamt b09761a4bb arint_normal -> aprint_normal 2008-03-17 00:00:55 +00:00
cube bb192d4cfd Split device_t and softc for the ... wait for it ... [air quotes] MI
variant of fdc(4)/fd(4).  Other cosmetic changes as appropriate.
2008-03-16 00:58:56 +00:00
cube 8ecf8999bf Split the softc from the device_t for all lpt(4) variants and attachments
except the ppbus stuff (which doesn't compile) and ulpt(4) which is
unrelated and can be dealt with separately.

As usual, it comes with related cosmetic changes.
2008-03-07 17:15:51 +00:00
rmind c6186face4 Welcome to 4.99.55:
- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
2008-03-01 14:16:49 +00:00
xtraeme f402cadf9a Remove CTL_MACHDEP_NAMES, it's not used anywhere.
Ok by martin@.
2008-02-27 18:26:15 +00:00
drochner bb33f35f20 Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
2008-02-20 21:43:33 +00:00
joerg d28597deae Add some assym.h dependencies. 2008-01-25 20:02:06 +00:00
joerg 3615cf7715 Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
2008-01-20 18:09:03 +00:00
he 4b2e779458 Include <sys/simplelock.h> to pull in appropriate definitions. 2008-01-11 14:03:47 +00:00
joerg 732cd3c8a0 Convert Atari to generic TODR and timecounter. 2008-01-08 18:04:15 +00:00
he 75fc209bcf Fix a cv_timedwait() usage after the vmlocking2 merge, and remove
a now-no-longer-used local variable.
2008-01-03 16:06:24 +00:00
joerg c8ad2035a8 Simplify delay based on x86 version. 2008-01-03 01:02:04 +00:00
joerg 62fcc14f1c ANSIfy. 2008-01-03 00:31:28 +00:00
ad 4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
ad 2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
tsutsui b7b9eda05d - add a missing brace in the previous
- print error message on failure to map aux register
2007-12-04 16:36:54 +00:00
tsutsui 704f93353b Apply missed following MI wdc changes to atari's mainbus wdc backend:
- make bus space handles an array for each command register
  http://mail-index.netbsd.org/source-changes/2003/11/27/0036.html
  (note we no longer have to specify stride for wdc after this change)
- add the notion of "shadow register"
  http://mail-index.netbsd.org/source-changes/2004/05/25/0048.html

Problem reported by Alan Hourihane in PR port-amiga/37464.
2007-12-04 15:28:58 +00:00
ad 4b293a84e1 Interrupt handling changes, in discussion since February:
- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
2007-12-03 15:33:00 +00:00
ad dc26833bb6 - Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
2007-11-19 18:51:36 +00:00
ad bd6663fc4d Don't set l_usrpri / spc_curpriority here. mi_userret() does it. 2007-11-05 20:37:48 +00:00
xtraeme 4ba09b41c3 Remove System V semaphores and share memory options to set the limits:
SEMMNI, SEMMNS, SEMUME and SHMMAXPGS.

They can be tweaked via sysctl now. Ports that were setting values on
them weren't touched, I only removed the ones that were commented out.
2007-11-04 14:34:19 +00:00
joerg d238692c3e Initialise the callbacks for tty.t_rstrt_ch in ttymalloc
as all drivers but Sun/SPARC's kd.c use the same arguments.
Separate callout_reset into callout_schedule and the initial
callout_setfunc using that.
2007-10-18 18:54:56 +00:00
garbled d974db0ada Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
2007-10-17 19:52:51 +00:00
he 663275b41c Fix typo: in disk_init() call: fd -> sc. 2007-10-17 17:58:56 +00:00
ad 9f56dfa520 Merge brelse() changes from the vmlocking branch. 2007-10-08 18:02:53 +00:00
ad 2af68666da Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
2007-10-08 16:41:05 +00:00
mhitch 9b0f085da1 68030 and 68040 processors consider the read portion of a read-modify-write
transfer as a write to ensure the memory is writable before starting any
transfer.  The fault status information does not reflect this in the 'read'
status bit (i.e. it shows up as a read access), so faults with a RMW access
to non-writable memory was not getting the correct protection.  The page would
be read-only and the instruction would fault over and over.

A specific example is when a process forks, and the child process attempts
to execute a RMW access to a data page, which is read-only because it's CoP
Copy-On-Write.

When checking if the page needs to be writablek, also check the locked transfer
and treat any locked transfer as a write.

68060 already handled this correctly, since it has separate read and write
fault bits, and both are set on a RMW access and the trap code was checking
the write status bit.

Fixes PR#36848.
2007-09-01 21:31:55 +00:00
adrianp 475217d719 Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
2007-08-06 21:26:53 +00:00
ad 9c6535a6de Add ci_cpuid where it's missing. 2007-08-04 09:49:51 +00:00
ad 66fefd117b It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 12:15:35 +00:00
he a4d164aaef Same change as -r1.133 of src/sys/arch/amiga/amiga/pmap.c:
As per hint from ad@, change uvm.kernel_object to uvm_kernel_object,
  to adapt to the recent uvm changes.
2007-07-23 23:13:04 +00:00
macallan a1457f5905 change pmap_phys_address()s parameter to paddr_t since that's what it gets
fed from mmap*() anyway
approved by gimpy
2007-07-16 23:48:03 +00:00
he 3bb4d9ddb8 Regenerate configurations after adding COMPAT_40 to GENERIC.in. 2007-07-16 06:35:53 +00:00
he 13a06ef4a8 The COMPAT_AOUT_M68K option now requies COMPAT_40 after the changes
to mount(), so define COMPAT_40 too.
2007-07-16 06:26:54 +00:00
ad 63811f5275 Generic soft interrupts are mandatory. 2007-07-14 21:48:17 +00:00
he 150caa6d8c Adapt to new signature for callout_init(). 2007-07-11 19:13:23 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
mhitch d2eac2f631 Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc).  Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise.  Fixes the getcwd regression
test on most m68k ports.
2007-06-12 03:34:28 +00:00
martin 7003cf1903 regen 2007-06-06 08:21:08 +00:00
martin 400bdf5863 Add pseudo-device agr 2007-06-06 08:20:26 +00:00
mhitch 719ec3a2b9 From pmap_motorols,c:
Allow pmap_enter_ptpage to fail, sometimes. Pass WAIT/NOWAIT flags and
fix some obvious locking problems. This allows us to run a LOCKDEBUG
ernel now.
2007-05-22 05:05:32 +00:00
tsutsui 32b0b73c06 Move declarations of m68k common functions
from <machine/cpu.h> to <m68k/m68k.h>.
While here, remove some obsolete function decls.
2007-05-21 16:37:03 +00:00
tsutsui c6262d2d8d Remove obsolete decralations of switch_exit() and switch_lwp_ext(). 2007-05-21 15:34:22 +00:00
tsutsui f06d68f845 curlwp can't be NULL so no need to check it. 2007-05-21 15:22:21 +00:00
mhitch 9385473585 Add missing call to lwp_startup() in lwp_trampoline() (which was renamed
from proc_trampoline to match the other ports).

A DIAGNOSTIC kernel will now boot and run.  LOCKDEBUG still doesn't work yet.
Also, my amiga no longer loses time.
2007-05-20 04:29:47 +00:00
isaki 8bd92b6261 indent fix. 2007-05-20 02:54:11 +00:00
he 57451082bc Adapt to the merge of the yamt-idlelwp branch.
curcpu()->ci_want_resched is now required, so get rid of the
want_resched global.  Also, cpu_need_resched() now takes two arguments.
The l_next and l_back fields in struct lwp no longer exists, so delete
references to it from genassym.cf.
Also, m68k/m68k/proc_subr.s is no longer used, says mhitch, so remove its use.

This brings the atari BOOT kernel back to a buildable state.
2007-05-18 22:58:51 +00:00
msaitoh 8ce1f4fff2 fix typos 2007-04-29 20:23:34 +00:00
macallan d4ddadbf9d include files.wsfb 2007-04-10 02:19:03 +00:00
tsutsui 298a18f6e7 Apply MI softintr(9) patch before it becomes rotten. Untested.
See also:
http://mail-index.netbsd.org/port-atari/2007/03/07/0000.html
2007-03-21 10:56:26 +00:00
thorpej 32a8b62d33 - Shrink ipl_cookie_t from 32-bits to 16-bits (large enough to hold
an SR value or an IPL_* constant).
- Take advange of the smaller ipl_cookie_t to shrink kmutex_t from
  16 bytes to 8 bytes by overlapping storage where possible.
- Implement a RAS-based _lock_cas() for mc68010 systems (Sun2).  See
  sun68k/sun68k/isr.c.

Tested on various m68k platforms, but NOT Sun2.  In any case, at least
Sun2 compiles now.
2007-03-11 05:22:24 +00:00
tsutsui f343bfa8eb Treat bus_space_handle_t as opaque, and use bus_space_vaddr(9) to
get device address.

XXX: This driver should be rewritten to use bus_space(9) more properly.
2007-03-06 14:45:31 +00:00
tsutsui d5aef94bf1 Change bus_space_handle_t from void * (formerly caddr_t) to u_long
to make things easier.
2007-03-06 14:42:44 +00:00
tsutsui 35788e9981 - remove volatile from *regkva member in struct grfabs_et_priv
and use temporary variables on register accesses
- also remove volatile from *memkva member in struct grfabs_et_priv
  because it isn't used to refer memory
XXX: I'm not sure if bm->plane should be volatile or not
     but I don't think previous code treats it as volatile anyway.
     (though I'm not sure how compiler handled "volatile caddr_t")
2007-03-06 14:40:25 +00:00
tsutsui 7bad4d945e - change pointers which actually required caddr_t to calculate address
from (void *) to (char *)
- add (char *) cast to appease -Wpointer-arith
2007-03-06 14:15:13 +00:00
tsutsui 46cc919e1f Make TX buffer (uint8_t *) and remove an unnecessary cast. 2007-03-06 14:13:02 +00:00
tsutsui a977b2956f Pass (char *) to mtod(9) on pointer arith. 2007-03-06 14:12:10 +00:00
tsutsui 1f79355c9b Add (char *) cast to appease -Wpointer-arith. 2007-03-06 14:10:07 +00:00
tsutsui bc4a41fd8b Make req_addr (char *) rather than adding an extra cast
since it's used only in this function to calculate buffer address.
2007-03-06 14:07:15 +00:00
tsutsui d319901154 Make io_data (char *) rather than adding an extra cast
since it's used only in this file to calculate buffer address.
2007-03-06 14:03:07 +00:00
he 582dc91458 More fixes after the caddr_t removal.
Mostly cast to char* for pointer arithmetic,
but also one missing indirection, and one "void *v, x;" fix.
2007-03-06 13:54:44 +00:00
tsutsui 7474a23441 Add a missed '*'. 2007-03-06 13:53:59 +00:00
tsutsui 57eb9123e8 Remove an unnecessary cast. 2007-03-06 13:53:32 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
thorpej ab87c6666d TRUE -> true, FALSE -> false 2007-02-22 05:14:04 +00:00
thorpej 712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
mrg 4410329b87 add a pair of new bus_dma(9) functions:
int _bus_dmatag_subregion(bus_dma_tag_t tag,
				  bus_addr_t min_addr,
				  bus_addr_t max_addr,
				  bus_dma_tag_t *newtag,
				  int flags)
	void _bus_dmatag_destroy(bus_dma_tag_t tag)

that allow a (normally broken/limited) device to restrict the bus address
range it can talk to.  this is used by bce(4) to limit DMA addresses to
1GB range, the maximum the chip can address.

all this is from Yorick Hardy <yhardy@uj.ac.za> with input from several
people on tech-kern.

XXX: bus_dma(9) needs an update still.
2007-02-21 20:41:23 +00:00
ad 3363855a4a Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
2007-02-16 02:53:43 +00:00
reinoud 43061c75ae Rename the B_XXX flag to B_DEVPRIVATE flag since it was never used for
debugging and its main use is in device drivers. Its used there to signal
that the flagged buffer has a special meaning or should be handled
differently.

OK'd by Bill Sudenmund on tech-kern.
2007-02-15 18:33:26 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
hubertf 142c2a33ba Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
2007-01-24 13:08:11 +00:00
jdc 06da305240 We don't need the cpu_startup() prototype here. It is already provided by
sys/systm.h.  Pointed out by skrll@.
2006-12-22 18:00:19 +00:00
yamt 8bf7662829 merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie).
	  http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
	- complete workqueue(9) and fix its ipl problem, which is reported
	  to cause audio skipping.
	- fix netbt (at least compilation problems) for some ports.
	- fix PR/33218.
2006-12-21 15:55:21 +00:00
he 25e5748c32 Add -Os to CFLAGS, so that the boot code fits within the constraints
again.  Sorry, I've not traced why this fit in the past, or what
changed to make it not fit anymore.
2006-12-01 13:52:46 +00:00
scw e07faf8a74 Replace the myriad copies of bounds_check_with_label() with a single MI
version.

Add disk_blocksize(9) so that disk drivers can record the physical
block size of a disk if it is different to DEV_BSIZE. Right now this
simply initialises dk_blkshift and dk_byteshift according to the
supplied block size. This information is used in the MI version of
bounds_check_with_label().
2006-11-25 11:59:55 +00:00
wiz 09cb1d6f1c s/existance/existence/, from Zafer. 2006-11-24 22:52:16 +00:00
wiz 6919c6578c s/independant/independent/, from Zafer. 2006-11-24 22:04:21 +00:00
dsl 09cad86587 Make the install actually die when the boot code is too big (which it is).
No idea how long it has been bust for.
Other parts of this makefile are deeply sub-optimal.
2006-11-21 18:31:44 +00:00
jmmv 7a13fe4abf Remove tmpfs's experimental status. OK'ed by core@. 2006-11-11 18:47:08 +00:00
mrg 648bbec934 in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev.  this occurs when we try to set the dumpdev to a device
with no driver loaded.  this fixes PR#34872.

in sys_swapctl, if bdevsw_lookup() fails, set dumpdev = NODEV
before calling cpu_dumpconf().  (this also fixes PR#34872.)

XXX: cpu_dumpconf() should probably be changed to take a dumpdev
XXX: and return an error in such cases, but that is a much more
XXX: intrusive change.

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
2006-10-21 05:54:31 +00:00
elad 65792a0340 More from Matt Fleming:
Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
2006-10-01 20:31:49 +00:00
elad e8373398dc Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks! 2006-10-01 18:56:21 +00:00
mhitch 07b204f92f Sync with m68060 fix from amiga pmap.
Uvm changes over 17 months ago resulted in the 68040/060 segment table
page being entered with pmap_kenter(), which does not record the mapping
in the pv table.  Attempting to inhibit caching of that page as required
by the 68060 hardware no longer changes the PTE and caused varying degrees
of multiple faulting, sometimes resulting in an unusable system.  Apparently
very few people attempted to run a 68060 based system since that change.
Fix to to change the caching bits directly rather than using pmap_changebit().
2006-09-16 18:53:53 +00:00
bjh21 7c4318304d Regen 2006-09-03 13:54:27 +00:00
bjh21 e10108c7f2 Nothing in the kernel now tests __HAVE_NWSCONS, so stop defining it everywhere. 2006-09-03 13:51:23 +00:00
matt 87eed1926a Make sure .data is .long aligned. (fixes linker warning) 2006-09-01 19:11:56 +00:00
he 4493c76313 Use the common <dev/sun/vuid_event.h> header file instead of maintaining
separate copies in port-specific directories.  Add duplicate include
protection.  Makes the alpha and atari ports build usr.bin/kdump/ again.
2006-08-28 16:41:04 +00:00
christos e0df1e4c51 PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
2006-08-26 20:26:43 +00:00
christos b300b74469 Disable SYSTRACE by default on all kernels (discussed with core) 2006-08-12 15:29:52 +00:00
mhitch 4016823297 gcc4 fix: needs stdlib.h 2006-08-04 01:51:31 +00:00
mhitch 3264771d41 gcc4 fix: static devsw didn't match the prototype. 2006-08-04 01:50:30 +00:00
mhitch c97e01a899 gcc4 fixes: need to include stdlib.h; fix prototype and definition of
local error() function.
2006-08-04 01:48:02 +00:00
mhitch fa97ed2f83 More gcc4 "uninitilized" variables. 2006-08-04 01:45:05 +00:00
mhitch 425bfd4d05 gcc4 "uninitialized" variables; just like pmap_motorola.c and amiga/pmap.c. 2006-08-04 01:44:12 +00:00
drochner 84f50d1b92 don't install <machine/db_machdep.h>, this is kernel only 2006-07-26 19:54:56 +00:00