Commit Graph

241 Commits

Author SHA1 Message Date
thorpej c13a5359d5 Largely unify the <machine/cpu.h> headers on the m68k platforms. 2024-01-20 00:15:30 +00:00
thorpej 36f542a77b Consistently use "intr_depth" as the name of the interrupt depth counter
on m68k platforms.
2024-01-19 18:18:53 +00:00
thorpej c60cfbdc3c Add _KERNEL guards around most of the definitions in these files. 2024-01-19 03:09:04 +00:00
thorpej 9ded135d26 G/C __HAVE_LEGACY_INTRCNT from the sun68k platforms. 2024-01-15 17:40:34 +00:00
thorpej 44ce13b2c4 Switch the sun68k platforms over to the common m68k interrupt dispatch code. 2024-01-14 22:34:54 +00:00
thorpej dbb30ef1da Merge common sun68k types defns into <sun68k/types.h>. 2024-01-14 18:22:02 +00:00
thorpej 1a19861ce4 Don't bother with isr_add_custom(). It's just a thin wrapper around
vec_set_entry(), so just use vec_set_entry() directly.
2024-01-14 17:51:16 +00:00
thorpej adadcf47c4 Use NAUTOVECTORS and NUSERVECTORS constants from <m68k/vectors.h> 2024-01-14 00:00:58 +00:00
thorpej 1acb62a3e4 Switch the sun68k platforms over to the common m68k vector table. 2024-01-13 18:51:37 +00:00
thorpej f2eefce19f Make getsr() an inline in <m68k/psl.h> and G/C all of the now-redudant
copies.
2024-01-12 23:36:29 +00:00
riastradh ff1a985cf9 sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 11:46:38 +00:00
msaitoh d1b93bab8c Fix typo in comment. 2023-06-24 05:27:13 +00:00
thorpej eca1c11589 Remove unnecessary inclusion of <net/netisr.h>. 2022-09-02 23:48:10 +00:00
andvar ae3a1b96f2 s/functin/function/ in copy pasted comment. 2022-07-26 20:08:54 +00:00
andvar 2e0bf311b3 fix multiplei repetitive typos in comments, messages and documentation. mainly because copy paste code big amount of files are affected. 2021-08-17 22:00:26 +00:00
thorpej c7fb772b85 Merge thorpej-cfargs2. 2021-08-07 16:18:40 +00:00
thorpej 2685996b0e Merge thorpej-cfargs branch:
Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
  actually needed.
- Don't be explicit about what interface attribute is attaching if
  the device only has one.  (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
  situations, making is visibly easier to see when indirect config is
  in play, and allowing for future change in semantics.  (As of now,
  this is just a wrapper around config_match(), but that is an
  implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance.  This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
2021-04-24 23:36:23 +00:00
mrg 17da6476c4 use libsa/saerrno.h instead of our own errno definitions. 2021-04-12 09:19:10 +00:00
skrll 89d6c918de Fix spelling of preferred in comments. While here improve grammar in
one of the comments.
2021-01-11 22:01:14 +00:00
thorpej fd5889cbee malloc(9) -> kmem(9) 2020-11-21 00:27:52 +00:00
riastradh 0f00d469ba Nix trailing whitespace. 2020-06-20 18:44:17 +00:00
tsutsui 3d2f819b62 Make local functions static.
Tested on 3/60.
2020-06-18 17:59:05 +00:00
rin 27f1060c62 Restrict usage of m68k assembler versions of {,u}divsi3 and {,u}divsi3 to
kernel and bootloader for 68010.

They requires a special calling convention to udivsi3, and cannot to be
mixed up in normal routines provided by libgcc or compiler_rt. Although,
there's no problem for using them in a controlled situation, i.e., kernel
and standalone programs.

Note that this does not affect at all m68k ports other than sun2, since
codes generated by gcc do not call these routines.

Assembler files are moved from common/lib/libc/arch/m68k/gen to
sys/lib/libkern/arch/m68k in order not to be compiled in libc.

Revert hack introduced to lib/libc/compiler_rt/Makefile.inc rev 1.37:
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/compiler_rt/Makefile.inc#rev1.37

Proposed on port-sun2@ with no response...
(Again, this does not affect m68k ports other than sun2.)
http://mail-index.netbsd.org/port-sun2/2020/03/10/msg000102.html
2020-04-22 11:28:56 +00:00
ad 7812221f71 Correction to previous. 2019-11-24 15:53:47 +00:00
ad 115c1bc097 cpu_need_resched():
- Remove all code that should be MI, leaving the bare minimum under arch/.
- Make the required actions very explicit.
- Pass in LWP pointer for convenience.
- When a trap is required on another CPU, have the IPI set it locally.
- Expunge cpu_did_resched().
2019-11-23 19:40:34 +00:00
chs d47bcd296c in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
2019-11-10 21:16:21 +00:00
skrll bf158e33f8 Provide PRIxBUSADDR, PRIxBUSSIZE, PRIuBUSSIZE, and PRIxBSH for all arches
to follow arm and (generic) mips.

Reviewed by christos.
2019-09-23 16:17:54 +00:00
msaitoh 94d8805114 Remove inclusion of old m68k/sysctl.h 2018-08-23 04:04:34 +00:00
mrg 6d188dd0d7 convert HAVE_GCC handling to modern GCC release numbering:
- HAVE_GCC=5 is now the default (vs. HAVE_GCC=53 we've been using for
  GCC 5.4 and GCC 5.5.)
- remove some more GCC 4.8 code.  we don't support GCC 4 here.
- adjust set lists to gcc=5 from gcc=53.

add some basic HAVE_GCC=6 handling (totally unused so far.)
2018-02-02 01:02:39 +00:00
christos 0b98b0bb96 no need fo clean vers.c
fix typo
2017-04-09 18:46:55 +00:00
christos cb5e99c661 centralize vers.c building for standalone programs. 2017-04-08 19:53:19 +00:00
christos c64104c2e3 PR/51935: David Binderman: bad call to printf
- fix debugging printfs in general.
- KNF
2017-02-01 18:24:22 +00:00
christos 6f0de7e87f NOSSP/NOPIE 2016-09-03 15:18:21 +00:00
msaitoh 8bc54e5be6 KNF. Remove extra spaces. No functional change. 2016-07-07 06:55:38 +00:00
dholland 5f5131c174 PR 51200 gets in libsa considered harmful: change own gets() to kgets()
and use it.
2016-06-11 06:49:46 +00:00
mrg 8872ffd0f4 remove some more GCC 4.5 code. make GCC 5.3 be HAVE_GCC=53, so that,
for example, HAVE_GCC >= 48 works properly.
2016-03-13 01:06:51 +00:00
tsutsui ebddcf615c Revert incorrect and broken kludge. PR/50101 2015-07-29 14:32:54 +00:00
christos 4dcf3726f4 XXX: add missing symbols. 2015-07-29 08:52:22 +00:00
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