Commit Graph

1223 Commits

Author SHA1 Message Date
tsutsui b2a913526c Use <bsd.klinks.mk> to create machine and ${MACHINE_CPU} symlinks. 2009-12-24 16:39:39 +00:00
tsutsui 626b27405b Now we have Sysseg_pa value so no need to calculate it from KVA Sysseg.
Tested on hp300.

XXX: mac68k seems to have a different VA vs PA mechanism so I leave it for now.
2009-12-13 11:24:02 +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 1401e77eb0 Move uvm_setpagesize() calls from locore.s to pmap_bootstrap_finalize().
Also explicitly set uvmexp.pagesize to prepare 8KB/page settings.

XXX: There is #ifdef !defined(amiga) && !defined(atari) workaround
XXX: because they have different pmap initialization functions.
2009-12-11 18:28:35 +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 8ab3a33f47 Put asm objects into OBJS, not dependencies for all target. 2009-12-06 13:31:16 +00:00
tsutsui 25aced04f4 Create machine and ${MACHINE_CPU} symlinks properly and
remove unnecessary dependencies so that parallel build works.
2009-12-06 13:28:04 +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 378ad8db55 Sync MMU table initialization with amiga and atari a bit:
- for 040/060, move L2 descs for Sysptmap from the last L2 block in segment
  table pages to the contiguous block with ones for segment table mappings

- for 020/030, invalidate ste and pte entries separately since
  ste size (TIA_SIZE) and pte size (TIB_SIZE) could be different
  on 8KB/page systems

Tested on hp300 (040), mac68k (LC040), and news68k (030)
(and untested on others).

XXX: some more stuff in pmap_bootstrap.c could be moved into
XXX: common pmap_bootstrap_finalize()?
2009-12-06 02:42:34 +00:00
tsutsui 9ca3f123d3 Use proper macro, variable names, types, and assignments for readability. 2009-12-05 23:16:57 +00:00
tsutsui a45ee63e6e Allocate lwp0upa (PA of lwp0 uarea) right after kernel rather than
between other page tables to use different mappings for ste/pte pages
as well as amiga and atari.  Should resolve XXX comments in next68k and x68k.

Tested on hp300 and mac68k.
2009-12-04 18:55:13 +00:00
tsutsui 353cefd7f1 No need to initialize lwp0 u-area in pmap_bootstrap()
since it will be done in pmap_bootstrap_finalize().
2009-12-04 18:32:31 +00:00
tsutsui b59d02fc5e Update one more comment. 2009-12-04 18:11:14 +00:00
tsutsui 97c41e17f2 Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc.
Also update some comment.
Compile test only.
2009-12-04 18:06:28 +00:00
matt 11af2f9cfa Kill proc0paddr. Use lwp0.l_addr instead. 2009-11-26 00:19:11 +00:00
rmind 3dc24f5a91 Use lwp_getpcb() on m68k ports, clean from struct user usage. 2009-11-23 00:11:42 +00:00
snj 3358f48bf3 Drop 3rd and 4th clauses. Approved by scw (copyright holder). 2009-10-23 17:01:08 +00:00
snj ce8b7309aa Follow revision 1.28 in OpenBSD: remove ad clause. 2009-10-23 03:28:09 +00:00
snj 85791bacd0 Follow revision 1.8 in OpenBSD: remove ad clause. 2009-10-23 03:25:36 +00:00
snj febb7cce65 Drop 3rd and 4th clauses. Approved by gwr@ (copyright holder). 2009-10-21 23:12:09 +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
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
he bca1eed8b8 This one needs <sys/exec_aout.h>, so include it explicitly. 2009-08-22 10:02:21 +00:00
matt 209a0b42e3 Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
2009-08-15 23:44:57 +00:00
snj 0215f7165d Fix a 13 year old buffer overrun. From Henning Petersen in
PR port-mvme68k/41857.
2009-08-15 19:16:45 +00:00
he 266e29fe75 Remove a no-longer-needed include of <sys/device.h>, which now created
a build problem because dvl_mtx has an incomplete type when building
cacheops.o.
2009-05-22 08:08:36 +00:00
scw a73e6e5f81 Fix previous. printlp() and printclp() are not varargs functions. 2009-04-11 11:04:41 +00:00
scw 9678a68913 Invoke zs_lock_init() _after_ copying console state to avoid a later
lock-related panic.
2009-04-11 11:01:47 +00:00
scw 403ccaeac2 Fix for install/40961: The RAMDISK kernel has grown significantly
since bootst was written. Grab 3MB of the kernel image from tape
in hackprom_diskrd() instead of 2MB.

Bump bootst version on account of the above fix.

While here, use -Os instead of -O2 to compile mvme68k stand code.
2009-04-11 10:56:12 +00:00
tsutsui ac465a42e7 Remove obsolete LIBSA_USE_MEMCPY and LIBSA_USE_MEMSET.
They were removed from <lib/libsa/stand.h> on December 2007.
2009-04-03 10:38:12 +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
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
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
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
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
mrg c6a4afa995 add COMPAT_50 to all the configs with COMPAT_40. 2009-01-24 05:06:05 +00:00
he d4b1297c8f Re-adapt to the changed return types for major() and minor(). 2009-01-21 16:24:33 +00:00
he d8caed22ee Remove parens around target in .ifmake -- new make doesn't like it. 2009-01-19 23:09:16 +00:00
he 75eff3e6e1 Print dev_t with PRIu64 instead of llu, suggested by mhitch@. 2009-01-17 19:34:28 +00:00
he cc247d44dd Print dev_t (result of major() and minor()) with %llu. 2009-01-17 12:22:26 +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 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 c2aee7cf41 Make sure machine and ${MACHINE_ARCH} symlinks are always created. 2009-01-12 07:23:59 +00:00