Commit Graph

4497 Commits

Author SHA1 Message Date
christos 1a7202d2d0 cargo cult the x86 changes. 2010-09-20 16:13:35 +00:00
tsutsui f252fc5e80 Prepare sparc optimized (by 32 bit add-with-carry insns) cpu_in_cksum()
which is reusing in_cksum_internal() in old sparc/in_cksum.c.

~4% improvements of ttcp(1) xfer rates on SS1+ with le(4).
2010-09-20 10:21:10 +00:00
uwe fcfce86d87 Fix printf formats in -DDEBUG_PROM to make it compile.
XXX: print daddr_t after casting it to int since libsa is not built
with LIBSA_PRINTF_LONGLONG_SUPPORT by default.
2010-09-02 03:14:42 +00:00
macallan 3337b3cd99 remove shadow framebuffer support, use VCONS_DONT_READ instead 2010-08-31 21:14:57 +00:00
christos 7709732cb2 factor out the floppy detection code. 2010-08-25 20:16:48 +00:00
christos f2b34c1443 Don't LOAD_BACKWARDS for floppies. 2010-08-25 18:11:54 +00:00
christos d5a8010acd kill LOAD_MINIMAL. 2010-08-25 16:38:04 +00:00
christos 26c8040050 Try to detect if we are doing a floppy boot from the device name and if
we are, load the minimal set to avoid backwards seeks.
2010-08-25 16:24:45 +00:00
chs 4a968b527b merge sparc and sparc64 fsr.h into one file.
add the missing FSR_TT_* definitions.
fix FSR_FTT_MASK.  fix the V9 FCC fields.
2010-08-08 18:44:15 +00:00
chs c426f57d8c update a comment. 2010-08-08 18:21:50 +00:00
macallan c3900149cf make sure to include a small font for machines like the SPARCbook 3GX
should fix PR43297
2010-07-07 20:58:56 +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
rmind 3c507045e2 Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour.  Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.
2010-07-01 02:38:26 +00:00
tsutsui e193fab21a Forgot to commit this one that should have been done with zs.c rev 1.119:
> Establish interrupt handlers with proper softc per each zs device
> rather than sharing them among all zs devices and searching softc
> in handlers.
>
> The latter method is derived from ancient sun3 zs driver which tried
> to reduce overhead on autovectored interrupts, but nowadays such hack
> might cause recursive global locks on modern SMP capable framework.
>
> Fixes "5.99.30 sparc panic during startup" reported by Hauke Fath
> on tech-kern@:
> http://mail-index.NetBSD.org/tech-kern/2010/06/19/msg008374.html
> and also tested by Jochen Kunz on SS20 with both serial and kbd console.
>
> Ok'ed by mrg@ and dyoung@.

Noticed by martin@.
2010-06-26 16:10:00 +00:00
tsutsui 42db966caf Remove an unused variable. 2010-06-26 03:39:53 +00:00
tsutsui dc3badf5ec Establish interrupt handlers with proper softc per each zs device
rather than sharing them among all zs devices and searching softc
in handlers.

The latter method is derived from ancient sun3 zs driver which tried
to reduce overhead on autovectored interrupts, but nowadays such hack
might cause recursive global locks on modern SMP capable framework.

Fixes "5.99.30 sparc panic during startup" reported by Hauke Fath
on tech-kern@:
http://mail-index.NetBSD.org/tech-kern/2010/06/19/msg008374.html
and also tested by Jochen Kunz on SS20 with both serial and kbd console.

Ok'ed by mrg@ and dyoung@.
2010-06-26 01:42:57 +00:00
eeh 605be4ce9b indir-block needs to be the size of a filesystem block or bad things can happen. 2010-06-24 00:54:12 +00:00
rmind 1840edb963 Implement high priority (XC_HIGHPRI) xcall(9) mechanism - a facility
to execute functions from software interrupt context, at SOFTINT_CLOCK.
Functions must be lightweight.  Will be used for passive serialization.

OK ad@.
2010-06-22 18:29:01 +00:00
macallan ec4afcf862 add some more offsets
this should have been committed with the previous, noticed by he
2010-06-12 21:25:56 +00:00
macallan 3ab6a60f8f Add a couple more hw offset definitions, add an ioctl() to set colour depth
which works like Solaris and Linux, and finally make mmap() behave like an
actual CG14. This should be all we need to get Xorg's suncg14 driver going.
2010-06-10 13:21:13 +00:00
macallan c7622a73d1 get rid of the cg3/cg8 'emulation' kludge since we have the xf86-video-suncg14
driver now
this will probably need some work in cgfourteenmmap() to match what the
driver expects from a cg14
2010-06-08 06:30:41 +00:00
tnozaki 9efec5bce3 1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
   so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
   prepareing for next libc major crunk.
4. bump libc minor version.
2010-06-07 13:52:28 +00:00
macallan 1960e8cdf1 make sure we pass a valid consdev pointer to the console keyboard so kbd
knows it's console and passes the right flags to wskbd, now the wskbd will
not drop off the mux when leaving event mode.
Symptoms: now the keyboard should no longer be dead when leaving X and there
          should be no more panics caused by it
I tested this on an SS5 and an SS20, may need some more attention and zs.c
sure could use some cleanup - there are a few differences to sparc64 that
really don't make much sense to me, like not passing console flags to zstty
which sparc64 does but sparc avoids, which caused this problem in the first
place.
2010-06-04 06:04:15 +00:00
mrg 20b314532f add #if 0'ed implementation of xc_send_ipi(), to be used shortly. 2010-05-31 03:16:47 +00:00
tnozaki dc71c99d49 fix wrong integer promotion rule(removed U suffix from UINT{8,16}_C).
see ISO/IEC 9899:1999 7.18.4.3.
2010-05-29 17:33:57 +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
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
chs 7654d6d482 enable TMPFS in all GENERICs that have MFS enabled. 2010-04-29 22:40:48 +00:00
martin 4bc568f73e Avoid using demap_lock early in pmap_bootstrap before it is initialized. 2010-04-26 09:26:25 +00:00
rmind 13f624ca0f Remove lwp_uc_pool, replace it with kmem(9), plus add some consistency.
As discussed, a while ago, with ad@.
2010-04-23 19:18:09 +00:00
pooka 835e533be4 Remove unused count (invariably "4") from pseudo-device fss. 2010-04-16 13:48:27 +00:00
martin 2e897a5cc1 Turn a printf into a DPRINTF(), since we will very likely recover from
the condition (and it happens on stock install CDs)
2010-04-04 21:49:15 +00:00
martin 725f1afc58 Bump version 2010-04-02 18:41:52 +00:00
martin 9df6371983 Add support for /boot.cfg. Implement a single command for now: override
the boot partition, which will be used for bootable CDs. Add cd9660
support.
2010-04-02 18:39:44 +00:00
tnozaki 377cb4e4f9 1. {wctype,wctrans,mbstate}_t: switch MD to MI like other
libc implementation (such as *BSD and glibc2).

2. don't typedef void * wc{type,trans}_t, suggested by soda@-san.
   it may pass through compiler type check, it's harmful.
   so i introduce dummy struct __tag_wc{type,trans}_t(iconv_t already does).

no ABI change was made.
2010-03-27 22:14:09 +00:00
macallan 4e7878cd4e enable CG12 support 2010-03-24 00:39:07 +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
eeh 8dab50982e Fix shifting by zero. 2010-03-11 19:28:55 +00:00
mrg 5de4293bf6 gas has supported SPARC ".empty" for a long while; get rid of an
ancient workaround.
2010-03-07 00:42:08 +00:00
plunky c269ebf72f use a MI major number for uhso(4) driver
(requested by mrg)
2010-03-06 23:45:38 +00:00
plunky 4677f8289f add major device for usho(4) driver 2010-03-06 21:31:50 +00:00
macallan 5e9539b84b enable PNOZZ_USE_LATCH in case we run into some hardware which needs it 2010-03-01 06:14:17 +00:00
skrll 7b00c6209a s/cpu_fork/cpu_lwp_fork/ in comment 2010-02-25 07:21:19 +00:00
dyoung c1b390d493 A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
2010-02-24 22:37:54 +00:00
eeh feea5ba263 Add support for ffsv2 and lfs. 2010-02-17 15:50:06 +00:00
eeh 55cbbbda21 Fix ffsv2 support. 2010-02-17 15:49:19 +00:00
eeh 80ff9af55f Major overhaul:
1) Add support for multiple filesystems including ffsv1, ffsv2, lfsv1 and lfsv2.
(ffsv1 and lfsv2 are known to work.  ffv2 support needs more work.  lfsv1 is
probably untested.)

2) Only 32-bit Fcodes are used.  All 64-bit math uses two cells.  This means it
should work on 32-bit machines.

Additional work to consider:

1) Rename genfth.cf to genffs.cf, or keep it and move the ffs symbols to genffs.cf

2) Move the ffs code and the lfs code to different source files so you can
selectively fload the just the filesystems you want.

3) Add code to load ELF files directly instead of relying on the host firmware
ELF support.  But, since the binary is now 7250 bytes there may not be room.
2010-02-13 23:38:17 +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
mrg d06de812e8 don't set ksi_errno here. no other MD code does, and one
of the pthread tests demands it.
2010-01-29 05:17:36 +00:00
mrg 801fc55e41 make fpu_mtx visible only ifdef _KERNEL. 2010-01-29 05:14:11 +00:00