Commit Graph

2964 Commits

Author SHA1 Message Date
roy
98f3a8d458 vether: Add to kernel configurations
It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
2020-09-27 13:48:49 +00:00
isaki
667082ac9f Fix register order. %d0 is higher and %d1 is lower.
This would have rarely affected.
2020-08-22 05:09:02 +00:00
riastradh
25f11de3b9 mmap MAP_FAILED audit. 2020-08-20 15:54:11 +00:00
rin
1b18db475e Clean up _LKM --> _MODULE leftovers.
Note that _KERNEL is always defined for modules.
2020-08-10 10:59:33 +00:00
rin
0e29220ba7 Fix siginfo support for amiga, mac68k, and sun3:
- T_ZERODIV is integer divide by zero. Therefore, ksi_code should be
  FPE_INTDIV, not FPE_FLTDIV.

- Set ksi_addr for SIGTRAP. Also, set TRAP_BRKPT or TRAP_TRACE to
  ksi_code appropriately.

This fixes some tests in lib/libc/sys and lib/libc/gen.

XXX
Apply similar fixes to other m68k ports.
2020-08-10 10:51:21 +00:00
rin
76c3a0bc77 regen 2020-08-10 06:33:45 +00:00
rin
6d74044e30 Add -fno-omit-frame-pointer to m68k kernels with DDB for backtraces.
-omit-frame-pointer is enabled for -O1 and higher for GCC8 by default.
2020-08-10 06:32:57 +00:00
maxv
b84521f2f3 Remove references to BRIDGE_IPF, it is now compiled in by default. 2020-08-01 08:20:47 +00:00
rin
87dfc27289 Align tmpstk to 4-byte boundary in the same manner as mac68k.
However, unfortunately, this does not fix strange crashes of GCC8-compiled
kernel, for which I cannot even enter DDB nor obtain crash dump.

We need further investigation...
2020-07-21 06:39:31 +00:00
thorpej
ca8ce3aeb1 Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
  Provide a new resource provider API:

  ==> pciconf_resource_init() -- Initialize a PCI configuration resources
      container.
  ==> pciconf_resource_add() -- Add a PCI configuration resource to the
      container (I/O, MEM, or prefetchable MEM).  Multiple resources of
      each type may be added.
  ==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
      container once the bus has been configured.

  This is much easier to use than the previous method of providing an
  extent map for each kind of resource, and works better for e.g. ACPI
  platforms that provide potentially multiple PCI resources in tables
  provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
  rather than extent maps.
2020-07-07 03:38:45 +00:00
maxv
ef06fc5cad hardclock_ticks -> getticks() 2020-07-03 16:23:02 +00:00
rin
ef570bbc69 Keep the top of stack zero as other m68k ports do
(and required by System V ABI).
2020-06-19 07:43:37 +00:00
thorpej
bb3714a7d1 <sys/extent.h> not needed here. 2020-06-17 06:37:57 +00:00
chs
69a3e9b705 replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
2020-06-14 01:40:02 +00:00
rin
08f17a5785 For clk_timecounter:
- Use C99 initializer.
- Leave .tc_name NULL initially.
No functional changes.
2020-05-29 05:35:47 +00:00
rin
3bf974419b Round amiga_clk_interval to the nearest integer, in order to emulate
100 Hz clock better by that running at PAL frequency (709379 Hz).

No functional changes for systems running at NTSC freq (715909 Hz).
2020-05-19 08:43:30 +00:00
ad
56d6bdb9f7 PR port-amiga/55233 Process hangs indefinitely if not calling syscalls for a while
cpu_intr_p() is broken on amiga, fix it.

From code inspection it looks like amiga and other m68k ports check for ASTs
with interrupts enabled in some cases, which is racy.  Not fixed.
2020-05-05 21:22:48 +00:00
rin
47c5004e0c Regen to disable amiga/efa(4) in GENERIC, accidentally enabled in the
previous revision.

efa_probe() seems broken and misdetected even if absent on A1200.
2020-05-03 10:06:29 +00:00
jdolecek
68e97caa11 mark nsmb major obsolete 2020-04-04 16:06:10 +00:00
jdolecek
23d0128155 remove 'file-system SMBFS' and 'pseudo-device nsmb' from all kernel configs
to prepare for their eventual removal
2020-03-25 17:06:17 +00:00
is
fb80b6a6c9 Whitespace police 2020-03-07 20:27:54 +00:00
is
07364bf8b0 The Gayle interface uses swapped (little-endian) word accesses, so we
need to use the amiga_bus_stride_1swap methods for the word accesses.

Analyzed and submitted via port-amiga@ by Martin Åberg.

Tested on formerly working hardware

- by Jukka Andberg	with Dlink DE-660+		(ne)
- by Frank Wille	with D-Link DFE-670TXD		(ne)

Tested on formerly not working hardware:

- by Martin		with 3Com 3c589 Etherling III	(ep)
- by Martin and Frank	with CompactFlash cards		(wdc)
2020-03-02 19:48:23 +00:00
isaki
3204498c44 round_blocksize must return a multiple of the framesize.
aucc(4) supports 3 channels mode.
2020-02-29 06:03:55 +00:00
isaki
c509fb12bb Remove rounding by 4 bytes on round_blocksize().
For drivers which supports only 16bit * 2channels sampling,
rounding by 4 bytes no longer meaningful.
2020-02-29 05:51:10 +00:00
rin
4ecd76e535 0x%p --> %p for non-external codes. 2020-02-24 12:20:29 +00:00
skrll
a0a61c51a5 G/C 2020-02-20 08:27:38 +00:00
skrll
94257d06d8 G/C LS{SLEEP,RUN,ONPROC}
LWP status manipulation was moved out of assembly long ago.
2020-02-17 09:09:48 +00:00
tsutsui
fc9073f9fe Add MAX/MIN PAGE_SIZE and PAGE_SHIFT definitions of m68k for jemalloc(3).
Background:
- All m68k ports have fixed PAGE_SIZE value in their kernels,
  but each port uses different PAGE_SIZE value (4096 or 8192)
  due to historical reasons.
- Currently module(7) binaries are built per each port so
  all m68k kernel sources don't support run-time variable PAGE_SIZE.
- MI <uvm/uvm_param.h> assumes that the port supports a variable
  PAGE_SIZE on module(7) builds if both MAX_PAGE_SIZE and MIN_PAGE_SIZE
  are defined and they have different values.
- On the other hand, jemalloc(3) checks MAX_PAGE_SHIFT in
  src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
  for internal optimization.
- m68k ports share userland binaries (especially pkgsrc binaries)
  among all ports, so we need to define MAX_PAGE_SHIFT as 13 to
  support m68k ports where PAGE_SIZE==8192.
  (though this would affect only if static binaries built on
   4k page hosts are executed on 8k page hosts)

To solve these inconsistency on PAGE_SIZE definitions,
we should have an independent PAGE_SIZE related definitions
for userland, but it requires major reorganization.
For now (especially for netbsd-9) we define MAX/MIN PAGE_SIZE and
PAGE_SHIFT values in <m68k/vmparam.h> only in !defined(_KERNEL) case.

Discussed on source-changes-d@ and tech-kern@ with christos@ and thorpej@:
 https://mail-index.netbsd.org/source-changes-d/2020/01/thread1.html#012035
 https://mail-index.netbsd.org/tech-kern/2020/01/thread1.html#025954

Should be pulled up to netbsd-9.
2020-02-01 19:41:48 +00:00
thorpej
1a2cab1766 Adopt <net/if_stats.h>. 2020-01-29 05:20:26 +00:00
msaitoh
a0403cde04 s/transfered/transferred/ 2019-12-27 09:41:48 +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
ad
8d31b01840 mi_userret(): take care of calling preempt(), set spc_curpriority directly,
and remove MD code that does the same.
2019-11-21 19:23:58 +00:00
msaitoh
6565c0bf2b Add missing initialization of sc_dev. 2019-11-12 13:17:43 +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
rin
7abe87f1c9 The device does not support recording.
Fix diagnostic assertion failure in aucc_set_format().

OK isaki

XXX
pullup to netbsd-9
2019-09-07 11:57:08 +00:00
isaki
ede47d01be Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
  This eliminates need for audio.c to take care of such (old)
  drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
  It is handled in the audio layer now.
2019-06-08 08:02:36 +00:00
msaitoh
b9958efe6c Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in
sys/net/if_ethersubr.c if we can.
 - Add ec_ifmedia into struct ethercom.
 - ec_mii in struct ethercom is kept and used as it is. It might be used in
   future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use
   ec_mii for keeping the if_media. Those should be changed in future.
2019-05-29 10:07:28 +00:00
msaitoh
b7b3f0d6ee KNF. No functional change. 2019-05-29 06:21:56 +00:00
msaitoh
d4b636ef14 Whitespace fix. No functional change. 2019-05-29 05:06:39 +00:00
msaitoh
55f08d4525 s/suppport/support/ 2019-05-29 02:34:18 +00:00
sevan
c840dad319 regen 2019-05-26 23:03:31 +00:00
sevan
e0071a7ab5 The config files supported by this port are regened from this template.
Apply the changes which I previously made directly to the config files by
mistake.
2019-05-26 23:00:57 +00:00
sevan
18bb53eeae Include bsd.own.mk so that ${TOOL_SED} in expanded correctly 2019-05-26 22:53:22 +00:00
isaki
e622eac459 Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly.  Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism.  The encoding/channels/frequency
  conversions are completely handled in the upper layer.  So the hard-
  ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
  - Obsoletes query_encoding and add query_format instead.
  - Obsoletes set_params and add set_format instead.
  - Remove drain, setfd, mappage.
  - The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c         -> dev/audio/audio.c (rewritten)
- dev/audiovar.h      -> dev/audio/audiovar.h
- dev/audio_dai.h     -> dev/audio/audio_dai.h
- dev/audio_if.h      -> dev/audio/audio_if.h
- dev/audiobell.c     -> dev/audio/audiobell.c
- dev/audiobellvar.h  -> dev/audio/audiobellvar.h
- dev/mulaw.[ch]      -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
2019-05-08 13:40:13 +00:00
kamil
bca8c3ffc4 Switch all users (except ia64) of custom machine/ansi.h to common_ansi.h
Deduplicate the code among ports and poll definitions of types
directly from a compiler.

This fixes miscompilation of certain programs that instruct compilers
to generate code for different types. This bug has been detected with
-fshort-wchar in EFI firmware.

Proposed and discussed on a mailing list (twice).

Itanium uses custom !ELF fallback switch, temporarily leave it as it is.
2019-05-07 03:49:25 +00:00
sevan
75d6e670be Enable BUFQ_PRIOCSCAN, CARP, Veriexec by default in GENERIC kernel configs.
On ports without a GENERIC kernel config enable in individul files, e.g evbmips.
Omit on:
atari, dreamcast, emips, epoc32, evbppc/VIRTEX*, ia64, luna68x, mvme68k,
mvmeppc, playstation2, riscv, sun2, sun3, x68k, zaurus due to resource
constraints or port infancy.
2019-04-26 21:40:28 +00:00
isaki
bd558eee92 Regen.
> Add drvctl to kernel which has audio device.
> audiocfg(1) requires drvctl(4).
2019-04-13 08:26:14 +00:00
isaki
47655f2d42 Add drvctl to kernel which has audio device.
audiocfg(1) requires drvctl(4).
2019-04-13 08:22:58 +00:00
thorpej
91bfaeb675 Overhaul the API used to fetch and store individual memory cells in
userspace.  The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms.  The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
2019-04-06 03:06:23 +00:00