Commit Graph

2139 Commits

Author SHA1 Message Date
para
4c23b30cff proper sizing of kmem_arena on different ports
PR port-i386/45946: Kernel locks up in VMEM system
2012-02-10 17:35:47 +00:00
mhitch
2c61985659 The recent kmem changes allocate a large kernel address space before
pmap_init() is called, and the initial kernel PT pages aren't enough
for the allocations pmap_init().  This fails because pmap_kenter_pa()
tries to allocate a new kernel PT page and traps because the pmap has
not been initialized.  When computing the number if initial kernel PT
pages, include enough to allow kmem to map the physical memory.  This
should fix PR/45915.  OK by releng@.  One mac68k system has been verified
to boot.  Volunteers to test the others welcome.  Amigas with at least
up to 128MB of memory were OK, but larger memory will need some adjusting.
2012-02-10 04:49:44 +00:00
tsutsui
8ff81a2ae9 Always include <m68k/cpu.h> (i.e. outside #if defined(_KERNEL))
for crash(8) as amiga and sun3.  There are _KERNEL protections in it.

Briefly tested by "build.sh -m news68k -U build".
Further possible botch will be fixed later.
2012-02-02 16:59:42 +00:00
para
89c9828deb converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
2012-01-27 18:52:47 +00:00
tsutsui
b417004b5f Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.
2011-12-22 15:33:28 +00:00
tsutsui
cd383d3880 Restore __HAVE_MM_MD_READWRITE which was added for 5.99.53 in rev 1.14
but removed by merge botch on __HAVE_NEW_STYLE_BUS_H changes in rev 1.15.

Fixes "/dev/nvram: Device not configured" problem on installboot(8)
reported by David Ross.
2011-12-18 09:12:18 +00:00
dholland
7bbf82b772 WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
2011-12-18 05:49:22 +00:00
tsutsui
6bb63ff72f Explicitly specify -m68020-60 to avoid possible 060SP instructions,
especially 64 bit integer mul/div ops in standalone bootloaders. From x68k.
2011-12-18 04:51:12 +00:00
he
eb489fae8a Commit regenerated configuration file after COPTS=-Os shuffle. 2011-12-17 12:45:14 +00:00
he
e1442234a8 Drop makeoptions COPTS=-Os for the SMALL030 kernel now that std.atari
contains it.
2011-12-17 12:44:12 +00:00
tsutsui
61964ee46d Specify COPTS="-Os" for rich gcc 4.5 as bsd.sys.mk does for userland binaries
so that gzipped atari kernels still fit into floppies.
Noticed by David Ross.
2011-12-15 13:27:06 +00:00
mrg
9a4a666ff3 implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places.  avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.
2011-12-12 19:03:07 +00:00
tsutsui
6218939425 Make sure to call pflusha before (not after) enabling MMU on
68030/68851 initialization paths.

Pointed out by isaki@ per observation of ATC status on XM6i emulator.
Tested on TT030, HP362, NWS-1750, and X68030 by me.

XXX: probably we can remove existing pflusha or TBIA calls after MMU turned
XXX: on (and before enabling cache) but I leave them as is for now to avoid
XXX: unexcpected side effects.
2011-11-26 14:05:52 +00:00
tls
a22a3917ac The rnd pseudo-device is not really optional, because it is in the same
source file as the entropy-pool code itself.  Move it to std.  This
will be cleaned up more when I split the sources up as they should be.

This fixes build breaks on several ports.  Thanks to Havard Eidnes for
pointing them out.
2011-11-22 21:24:51 +00:00
tsutsui
556c80110c Merge copy-and-pasted fpu_probe() function (to share it among more m68k ports).
Tested on TT030, Sun3/80, and X68030.
2011-11-15 12:23:21 +00:00
tsutsui
e179a96fd3 Move spread getsfc() and getdfc() functions into common m68k/support.s.
Note:
- ENTRY_NOPROFILE() is okay since they are used only for debug printf
- they are declared to return int so no need to put a return value into %a0
2011-11-15 10:57:00 +00:00
christos
0ec8fd1308 make this compile again. 2011-11-05 00:34:01 +00:00
chs
0ac4272b25 use WARNS instead of mucking with CFLAGS directly. 2011-11-01 13:19:53 +00:00
chs
264277f693 expand the attr array to hold all the bytes we store in it.
not that the code actually does anything with the extra bytes,
but at least it builds with gcc 4.5.
2011-10-04 04:50:20 +00:00
chs
7cb12714f7 fix build errors with gcc 4.5. 2011-10-01 15:59:00 +00:00
bouyer
a47e2eb758 Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
2011-08-30 12:39:49 +00:00
dyoung
fb90a131da Switch to new-style <sys/bus.h>. 2011-07-17 23:40:16 +00:00
joerg
3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
dyoung
9aff02ebc1 #include <sys/bus.h> instead of <machine/bus.h>. 2011-07-01 20:57:45 +00:00
dyoung
ed9977b122 #include <sys/bus.h> instead of <machine/bus.h>. 2011-07-01 20:26:35 +00:00
dyoung
59adf08e17 Per discussion at
<http://mail-index.netbsd.org/tech-kern/2010/04/02/msg007941.html>,
divide each machine's bus.h into bus_defs.h (constants & data types)
and bus_funcs.h (macro implementations of bus_space(9) routines and MD
prototypes).

Note that some bus_space(9) routines' implementation will move to .c
files from inline subroutines or macros in .h files.

I've only made the split for machine architectures where there is PCI.
All of the non-PCI-having architectures will require a similar split.

These #include files are not referenced by any (committed) Makefiles or
header files, yet.  Changes to Makefiles, to <sys/bus.h>, and to some
more machine-dependent files will dribble in before I throw the switch.
2011-07-01 17:09:58 +00:00
wiz
4cbd24b23f dependant -> dependent 2011-06-30 20:09:15 +00:00
rmind
e225b7bd09 Welcome to 5.99.53! Merge rmind-uvmplock branch:
- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
2011-06-12 03:35:36 +00:00
tsutsui
097168d022 - split device_t/softc
- struct proc -> struct lwp

XXX: this driver is not in the default kernels.
2011-06-10 09:29:07 +00:00
tsutsui
c1b2bf5a29 Split device_t/softc. Compile test only. 2011-06-10 09:27:51 +00:00
matt
ef75e7c7b2 A few missed device_t, cfdata_t cleanups 2011-06-05 17:09:18 +00:00
tsutsui
2cb98cc774 Split device_t/softc. Also rename some softc variables. Tested on TT030.
XXX: old ugly config_console() hack should go away...
2011-06-05 16:25:12 +00:00
tsutsui
8997a4eb90 Split device_t/softc. No crash on TT030. 2011-06-05 06:33:42 +00:00
tsutsui
6572d9c092 - use CFATTACH_DECL_NEW() (no softc)
- use device_t, cfdata_t etc.
2011-06-05 06:31:41 +00:00
christos
52e90f00f1 add missing include 2011-05-20 01:29:30 +00:00
christos
2d48e20cb6 include missing includes 2011-05-19 02:56:03 +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
tsutsui
34637b8687 - merge and move pasted m68k MD setreg() functions into m68k/m68k_machdep.c
- move m68881_save() and m68881_restore() declarations into <m68k/m68k.h>

Briefly tested and no obvious breakage on atari, sun3, and x68k.
2011-05-16 13:22:51 +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
dyoung
a184f1f486 Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args.  Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
    pci_intr_map() was a leftover from Xen 2.  Probably a bug.  I
    stopped writing it.  I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
    Probably a bug.  I use a temporary variable.  I have not tested this
    change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
    Probably a bug.  Use a local pci_attach_args.  I have not tested
    this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
    caller's pci_attach_args.  Probably a bug.  Make a local copy of the
    caller's pci_attach_args and modify the copy.  I have not tested
    this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
	HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
	KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
	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
	OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
2011-04-04 20:37:44 +00:00
dyoung
062b6658ec Fix target 'tags'. 2011-04-04 19:44:16 +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
48717cfc00 Refactor ps_strings access. Based on PK_32, write either the normal
version or the 32bit compat layout in execve1. Introduce a new function
copyin_psstrings for reading it back from userland and converting it to
the native layout. Refactor procfs to share most of the code with the
kern.proc_args sysctl handler.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-03-04 22:25:24 +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
joerg
19b23810a0 Switch remaining platforms to modern CPP for assembler. 2011-01-21 15:59:04 +00:00
tsutsui
4d58277bcd Explicitly include <machine/pcb.h> for struct pcb. 2011-01-17 14:36:32 +00:00
rmind
7146b2f61d Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete.  Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
2011-01-14 02:06:22 +00:00
tsutsui
6542895ee1 Tidy up common comments. (Yes, too many dup code...) 2011-01-02 18:48:04 +00:00
matt
c831bbca8c Collect cpu_info and friends and move to m68k/include/cpu.h
Add a define __HAVE_CPU_DATA_FIRST which means that cpu_data is the first
member in struct cpu_info.
2010-12-22 02:42:27 +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
tsutsui
e0063a27f3 Regen from HADES.in rev 1.12:
> Rename device name of Crazy Dots II ET4000 video from et(4) to et4k(4).
2010-12-12 10:07:34 +00:00
tsutsui
caaa33e8a0 Rename device name of Crazy Dots II ET4000 video from et(4) to et4k(4). 2010-12-12 10:05:25 +00:00
tsutsui
6935bb98f8 Regen from GENERIC.in rev 1.92:
> Rename device name of Crazy Dots II ET4000 video from et(4) to et4k(4)
2010-12-12 09:58:29 +00:00
tsutsui
0fdbb4b5f8 Rename device name of Crazy Dots II ET4000 video from et(4) to et4k(4)
to deliver the name to recently committed newer and more common MI device,
et(4) at PCIe (Agere ET1310/ET1301 network driver) in PR kern/39094.
http://mail-index.NetBSD.org/source-changes/2010/11/13/msg014416.html

No particular reaction for a month on source-changes-d@,
no responsible person on atari port, and probably
no active user still using ET4000 on TT030 running NetBSD/atari.
2010-12-12 09:56:15 +00:00
hannken
f9d9b76c70 Regen. 2010-11-23 11:16:59 +00:00
hannken
afdfce8e3b Remove unused count from pseudo-device md. 2010-11-23 11:13:52 +00:00
uebayasi
41e5df6d3e Remove incomplete, never worked dynamic run-time memory registration
(uvm_page_physload(9)).  This functionality will be re-added later.
2010-11-06 15:42:43 +00:00
uebayasi
ee5c2a53e4 Machine dependent code is considered as part of UVM. Include
internal API header.
2010-11-06 11:46:00 +00:00
tsutsui
36538467b8 Prepare empty module_init_md() for options MODULAR for all other m68k ports. 2010-10-16 17:10:42 +00:00
tsutsui
d52a314491 - add m68k/conf/std.m68k, which includes common standard options for m68k,
options EXEC_ELF32, EXEC_SCRIPTS, and CPU_IN_CKSUM for md cpu_in_cksum.c
- make all m68k ports include common arch/m68k/conf/std.m68k
  from MD std.${MACHINE}
2010-09-19 02:09:27 +00:00
joerg
c1e0a5bd50 Replace the current usage of Elf64_Half with Elf64_Word and rename
NetBSD specific Elf64_Quarter to Elf64_Half. This restores compatibility
with the common ELF specifications.
2010-08-28 21:30:02 +00:00
chs
9ea6b6e3f2 implement ucas_* for m68k. 2010-07-07 01:16:23 +00:00
mrg
4c92852a80 remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format.  ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k.  this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
  down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
2010-07-06 05:59:50 +00:00
mrg
bd01b4a30e fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h.  FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
2010-06-06 04:50:05 +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
tsutsui
8aad094f00 Include <bsd.own.mk> before ${NETBSDSRCDIR}. 2010-05-10 15:10:54 +00:00
mrg
cd1a4ca67f regenerate these configurations from GENERIC.in. 2010-05-08 22:18:23 +00:00
mrg
309c6e11b7 enable IPFILTER_COMPAT in all kernels that have ipfilter already.
canonicalise several of the ipf option segments in various files
(this mostly means adding commented out IPFILTER_DEFAULT_BLOCK,
or adding commented or uncommented IPFILTER_LOG or IPFILTER_LOOKUP
option statements.)

i built about 20 of these kernels to check, but not all of them.
2010-05-08 22:16:25 +00:00
tsutsui
1542e4335d Regen from GENERIC.in rev 1.89:
> - don't enable TMPFS for SMALL030
> - remove dup PTYFS
2010-05-08 20:41:24 +00:00
tsutsui
56959c2168 - don't enable TMPFS for SMALL030
- remove dup PTYFS
2010-05-08 20:39:55 +00:00
chs
d178bb14d6 regen 2010-04-29 22:42:27 +00:00
chs
7654d6d482 enable TMPFS in all GENERICs that have MFS enabled. 2010-04-29 22:40:48 +00:00
tsutsui
80da83d515 extern inline -> static inline 2010-04-17 12:54:29 +00:00
pooka
f52cca13e0 regen 2010-04-16 13:49:57 +00:00
pooka
835e533be4 Remove unused count (invariably "4") from pseudo-device fss. 2010-04-16 13:48:27 +00:00
tsutsui
cde07f4f60 Misc KNF and cosmetics. 2010-04-13 13:30:37 +00:00
tsutsui
863aabbe23 Misc KNF. 2010-04-13 13:29:35 +00:00
tsutsui
eb9963a857 Misc KNF. 2010-04-13 11:22:22 +00:00
tsutsui
c1acd41f47 Include "ioconf.h" to declare struct cfdriver foo_cd. 2010-04-13 09:51:07 +00:00
tsutsui
6df3cee82c Remove a declaration of unused variable. 2010-04-13 09:49:54 +00:00
tsutsui
9233a7ff42 Replace old MD sicallback functions with MI softint(9). 2010-04-12 13:05:25 +00:00
tsutsui
078ba9f9eb - more cosmetics
- use queue(3) macro properly
2010-04-12 12:43:39 +00:00
tsutsui
09adc53649 KNF and cosmetics. 2010-04-12 12:28:59 +00:00
tsutsui
7288813c34 Always schedule callback functions via add_sicallback(),
which calls softint_schedule(9).

We cannot use BASEPRI() to check recursive calls any longer
since softint(9) has been reorganized to use kernel thread.
2010-04-10 18:02:05 +00:00
tsutsui
1ecf20919a Comment out currently unused mbprint(). 2010-04-10 17:40:36 +00:00
tsutsui
8b508b5672 Remove extern int atari_realconfig decls. It's in <atari/atari/device.h>. 2010-04-10 16:14:07 +00:00
tsutsui
7220c81d93 Remove now unused getsoftc() macro. 2010-04-10 16:12:34 +00:00
tsutsui
c018c74bc9 Make local functions static. 2010-04-10 16:07:04 +00:00
tsutsui
44a4256e29 Regen from GENERIC.in rev 1.86:
> Disable options SERCONSOLE (force serial console if DCD is detected)
> because now it's patchable by binpatch(8).
2010-04-10 02:29:25 +00:00
tsutsui
958ecc45de Disable options SERCONSOLE (force serial console if DCD is detected)
because now it's patchable by binpatch(8).

Enabling serial console by DCD signal could be problematic
on some earlier TT030 (with revision A board), and it's also
annoying for users who connect an active device on the serial port
as mentioned in PR port-atari/39849.

XXX: Eventually serial console should be enabled by MD bootloader flags,
XXX: but I have no idea how to build bootloader binaries for TOS.
2010-04-10 02:27:52 +00:00
tsutsui
eb340f649b Regen from HADES.in rev 1.11 and MILAN.in rev 1.25:
> Remove EtherNEC from HADES and MILAN.
> They have ISA so no one will bother to connect ISA NE2000 via EtherNEC.
2010-04-10 02:01:30 +00:00
tsutsui
3ac2ae2366 Remove EtherNEC from HADES and MILAN.
They have ISA so no one will bother to connect ISA NE2000 via EtherNEC.
2010-04-10 01:59:40 +00:00
tsutsui
b8cca62afb - establish zs interrupts via common intr_establish() function rather than
hardcording them in locore.s and vector.s
- also make interrupt handlers take per unit softc and put a softint cookie
  into softc (though atari machines have only one zs)
- tweak some structures as per MI z8530sc driver

Tested on TT030 using sl(4) on zs.
2010-04-09 17:38:43 +00:00
tsutsui
3104521fc6 minor constify 2010-04-09 17:06:31 +00:00
tsutsui
c72cdbc3b4 More KNF. 2010-04-09 16:30:15 +00:00
tsutsui
45c5a41969 Split device_t/softc. 2010-04-09 12:50:34 +00:00
tsutsui
3ae52b0ad3 Rename variables and members of softc for readability. 2010-04-09 12:38:48 +00:00
tsutsui
af7ec4ee38 Remove unnecessary volatile keyword against struct zschan.
(volatile against structure member is enough)
2010-04-09 12:34:25 +00:00
tsutsui
6cace5bc53 - misc KNF
- remove `register' keyword from variable declarations
2010-04-09 12:09:29 +00:00
tsutsui
c28b217b41 Include ioconf.h for struct cfdriver. 2010-04-09 11:30:19 +00:00
tsutsui
649a24ad45 minor constify 2010-04-09 11:27:21 +00:00
tsutsui
ed0d3417a9 Make options SERCONSOLE (force serial console if DCD is detected)
patchable by binpatch(8) like:
---
# binpatch -s serconsole -r 0 /netbsd
serconsole(0x23bac4): 0x00000001 (1), at offset 0x23bb44 in /netbsd
new value: 0x00000000 (0)
#
---

May work around PR port-atari/39849
(netbsd-ATARITT kernel fails with serial port connected)
and some old TT030 with early revision boards.
2010-04-09 11:09:03 +00:00
tsutsui
f48349093a - split device_t/softc
- verbose output on attach as well as zs serial ports
2010-04-09 10:49:37 +00:00
tsutsui
83f406edd9 Include ioconf.h for struct cfdriver. 2010-04-09 10:07:14 +00:00
tsutsui
e33bfc17ee Misc KNF. 2010-04-09 10:04:35 +00:00
tsutsui
8f12100ec0 Misc KNF. 2010-04-07 13:53:05 +00:00
tsutsui
863ed02e2e - split device_t/softc
- use device_lookup_private() directly rather than via local macro
2010-04-07 13:14:23 +00:00
tsutsui
883db6bc19 extern inline -> static inline 2010-04-07 12:39:59 +00:00
tsutsui
1d5998f903 Use callout_schedule(9) rather than callout_reset(9) on polling
as callout(9) man says.
2010-04-06 15:32:36 +00:00
tsutsui
6df9cedd56 Regen from GENERIC.in rev 1.85, HADES.in rev 1.10, and MILAN.in rev 1.24:
> Add support for the EtherNEC.
2010-04-01 17:10:06 +00:00
tsutsui
901a864f9d Add support for the EtherNEC.
The EtherNEC is yet another user designed device for Atari machines,
an NE2000 based ISA board connected to Atari's ROM cartridge slot with
simple but ingenious interface and cartridge port adapter, and
it's the most available network solution for the old Atari machines.

See following pages for more details about EtherNEC:
http://hardware.atari.org/ether/
http://home.arcor.de/thomas.redelberger/prj/atari/etherne/
http://www.freemint.org/ethernec/ethernec.html
2010-04-01 17:07:51 +00:00
tsutsui
8f232399f0 Misc KNF and cosmetics. 2010-03-31 14:12:55 +00:00
tsutsui
9955f57940 ANSIfy, some KNF. 2010-03-31 13:15:52 +00:00
chs
04aa4da3b0 fix copy{in,out}{,str}() to return the error returned by uvm_fault().
fixes PR 41813.
2010-03-20 23:31:27 +00:00
tsutsui
436303df95 Check if mapped bus_space regions are actually valid
before trying to access them.

Fixes trap panic when SMC_TT board is not installed. (oops)
2010-03-16 18:50:14 +00:00
tsutsui
84ebe66073 Renumber board type for LE_PAM.
We can't use 0x00 if we also use the value as bitmap.
2010-03-16 17:58:57 +00:00
tsutsui
a44528e3c5 Fix register and memory addresses for PAM, per MintNet driver.
XXX: In le_vme_match(), probably we should not return even if
XXX: bus_space_map(9) fails unless all le_addresses have been checked.
2010-03-16 17:56:41 +00:00
tsutsui
52e0334c00 Regen from GENERIC.in rev 1.84:
> Add support for the SMC Elite Ultra Ethernet with the SMC_TT VME-ISA bridge.
2010-03-13 16:31:38 +00:00
tsutsui
639430789a Add support for the SMC Elite Ultra Ethernet with the SMC_TT VME-ISA bridge.
The SMC_TT is the user designed "handmade" VME-ISA bridge circuit
for 16 bit VME slot on TT030 and the SMC Elite Ultra ISA Ethernet card.
More information about SMC_TT can be found in the following archive:
ftp://ftp.funet.fi/pub/atari/net/smc_tt1.zip

Demonstrated on the NetBSD booth in Open Source Conference 2010 Kansai@Kobe.
2010-03-13 16:30:02 +00:00
snj
ccaf1e96be Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.
2010-02-28 15:52:16 +00:00
tsutsui
d31d8d052b Regen from GENERIC.in rev 1.83:
> Add pseudo-device ksyms. Noticed by David Ross on port-atari.
2010-02-21 18:00:13 +00:00
tsutsui
4b4e0d474c Add pseudo-device ksyms. Noticed by David Ross on port-atari. 2010-02-21 17:57:03 +00:00
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