Commit Graph

203 Commits

Author SHA1 Message Date
christos
50369d2f23 fix leak 2014-09-21 16:37:34 +00:00
joerg
eb6cc7528a Consistently define WARN in a way that passes format string checks, i.e.
always uses the same number of arguments as given in the format string.
2014-08-06 21:57:48 +00:00
tsutsui
80f4cef428 Move sun3 bootloader address to allow loading growing GENERIC kernels. 2014-07-26 17:24:04 +00:00
tsutsui
8c436a9898 Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.
XXX: probabry we should have bsd.saprog.mk or something.
2014-01-12 15:26:28 +00:00
christos
87d348b35e undo the ld script hack now that the default scripts have been modified to
do this.
2014-01-04 20:19:33 +00:00
christos
eb3888d4e4 Add a load script that puts text.unlikely after text so that the start
address stays where we are. This is copied from m68kelfnbsd.xbn
2014-01-03 21:21:17 +00:00
christos
982091c4c2 Revert previous change:
gcc-4.8.1 converts -mc68000 to -mcpu=68000 which breaks gas. gas even
breaks with -mcpu=68010, but works with -march=68010 so we'll go with that.
2013-11-07 19:52:56 +00:00
christos
e159cab062 avoid confusion with 68010 and 68020. The sun3 always was a 68020, and
the code assumes that.
2013-11-07 00:43:15 +00:00
christos
15607b72ed fix unused variables 2013-11-07 00:42:42 +00:00
christos
86b6b2fef2 make cpu_need_resched() macros consistent; __USE flags 2013-10-19 19:20:59 +00:00
joerg
c5837ca27d Build boot loaders without unwind tables. 2013-08-12 16:34:05 +00:00
tsutsui
522687ebbb use device_xname() (from chs@) 2012-10-13 06:38:08 +00:00
mlelstv
8ce4433821 Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().

Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().

Make cpu_rootconf(9) describe the calling order.
2012-07-29 18:05:39 +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
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
mrg
89202c74ac mark bus functions as static inline, not just plain inline. 2011-07-12 05:31:49 +00:00
tsutsui
62cab9ef46 Use WARNS?=2 to pull warnings flags. 2011-05-29 10:19:09 +00:00
tsutsui
4d77588a25 Disable LOAD_BACKWARDS on tapeboot which can't seek backwards.
Fixes bootstrap tapeboot installation failure on TME reported from ryoon@.

Should be pulled up to netbsd-5.
(note netbsd-5 uses LOAD_NOTE instead of LOAD_BACKWARDS)
2011-05-29 10:15:30 +00:00
tsutsui
2ab216d8a0 Add ugly definitions to make standalone programs build without
installed DESTDIR binaries.
2011-05-29 10:06:34 +00:00
joerg
3c550524b5 Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh.  Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
2011-01-22 19:19:14 +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
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
a1b485666f NBSG is not used in this file so remove unnecessary comment and include. 2009-12-11 18:45:05 +00:00
tsutsui
1a88b50bca Include pmap.h or pmap3.h instead of param.h for NBSG to handle MMU. 2009-12-11 18:42:05 +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
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
he
3b5f619bfc Use .PATH.S instead of giving a source file with fully qualified path.
This should avoid the sun3 port contaminating its source tree during build
with .d and .o files corresponding to ctrlsp.S.
2009-09-25 11:19:35 +00:00
tsutsui
1b7ed0b13a Switch sun68k standalone programs to using MI libsa and libkern.
Bump version.

Tested bootxx + ufsboot on TME (sun2 and sun3) and 3/80 (sun3x).
2009-03-20 11:42:25 +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
tsutsui
1440fadbfd Use <bsd.klinks.mk> to create MD include dir symlinks. 2009-03-15 14:08:17 +00:00
he
ecef5ef303 Correct typo in previous: seseconds_t -> saseconds_t. 2009-01-17 12:47:02 +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
fe0dea612e WARNSfy. 2009-01-12 07:00:59 +00:00
tsutsui
4a193f31ac Split device_t/softc with misc cosmetic changes. 2008-07-01 15:15:34 +00:00
tsutsui
5886a7c394 - avoid extra offset calculation in region/multi ops
- fix swapped dist/src in copy_region ops
2008-07-01 15:14:32 +00:00
tsutsui
aecc2565d0 Make cpu_intr_p() inline. 2008-06-22 17:33:41 +00:00
tsutsui
43a0e8e404 Unify splraiseipl(9) implementation among m68k ports as per
suggestion from isaki@ on port-m68k.

For sun68k (sun2, sun3 and sun3x):
- 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)
2008-06-15 07:23:26 +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
martin
9c63b7e8cc Move to 2 clause TNF license 2008-05-04 00:18:16 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
tsutsui
bdc08026eb Fix a botch in rev 1.21. 2008-04-27 15:18:00 +00:00
tsutsui
c3b129605a Use generic atomic_cas_uint() for mutex(9) and rwlock(9), and
remodel old RAS based _lock_cas() implementation for m68010
into genereic atomic_cas_32().
Now sun2 kernel compiles and even works on multiuser. (hehe)

Tested on tme (emulationg 2/120 and 3/150) and (real) 3/80.
2008-04-05 22:47:52 +00:00
joerg
509bb20712 Return NULL if no scsibus was found to fix compilation. 2008-02-18 14:59:52 +00:00
joerg
dd20faf2af Convert to device_find_by_driver_unit. 2008-02-12 19:53:46 +00:00
tsutsui
d0ea2c0ffa Also account idepth in clock interrupt handlers
(which are registered directly by isr_add_custom())
and use the idepth value for CLKF_INTR().
2008-01-26 14:02:54 +00:00
tsutsui
8dcb4a7ea6 Always account idepth for cpu_intr_p(), which is now
mandatory for sys/kern/vfs_bio.c:biodone().

Comments from Andrew Doran, and fixes mutex errors on sun3.
2008-01-11 10:21:26 +00:00
tsutsui
99221a563b Use TAILQ_FIRST(3) and TAILQ_NEXT(3) macro. 2007-12-05 12:31:25 +00:00
tsutsui
2f66d76b2f Adapt sun68k ports to recent interrupt handling changes.
XXX: sun2 (m68010) doesn't have CAS instructions.
2007-12-04 15:12:07 +00:00