Commit Graph

1913 Commits

Author SHA1 Message Date
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