Commit Graph

2472 Commits

Author SHA1 Message Date
christos
ee8d32bb92 remove __HAVE_COMPAT_NETBSD32 2017-01-27 17:21:51 +00:00
christos
e4cf317682 provide __HAVE_COMPAT_NETBSD32 and fix multiple include protection consistently. 2017-01-26 15:55:08 +00:00
christos
e06c26e434 belatedly fix constants for ppc64 (this does not define __arch64__ like sparc
does?)
2017-01-14 21:33:09 +00:00
rin
011775c944 PR port-powerpc/51368: powerpc FPU emulation fails for single precision
floating point arithmetic

For single precision instruction, calculate first in double precision,
and then round it. With this fix, single precision arithmetic gets sane
on ibm4xx and booke.

Taken from FreeBSD commit r258250:
  https://svnweb.freebsd.org/base?view=revision&revision=258250

Ok matt and simonb.
2016-12-28 10:52:30 +00:00
rin
0b5b7fff16 - add missing default from FreeBSD
- remove duplicate panic pointed out by matt
2016-12-28 10:30:04 +00:00
rin
49eb5e173f PR port-powerpc/51367: kernel panic for powerpc/ibm4xx with "option DDB"
Stop using ddbstk/ipkdbstk to make nested traps possible, which avoids
kernel panics reported in the PR.

Suggested and approved by matt.
2016-12-28 09:36:02 +00:00
rin
879c3fe377 Remove wrong comment which was copy-and-pasted from somewhere. 2016-12-26 21:54:00 +00:00
rin
b72e1d6d7b Assert that the size of a trap handler does not exceed its room.
XXX
The debug exception is critical for ibm4xx. Since rev 1.24, we use the critical
trap hundler for it. Sorry for the wrong commit log for rev 1.24.
2016-12-26 21:25:08 +00:00
rin
0000e45fe1 No need to have same trap handlers in trap_subr.S.
No functional changes.
2016-12-26 20:28:00 +00:00
rin
4a63f69046 We cannot have DDB and IPKDB at the same time. 2016-12-26 20:16:29 +00:00
cherry
dac5688b8d Conform API use of uvm_hotplug(9) to documented behaviour:
When testing for an invalid uvm_physseg_t,
compare with UVM_PHYSSEG_TYPE_INVALID which is implementation agnostic.
2016-12-24 19:02:16 +00:00
cherry
2e9cf2b5f9 Tell mpc85xx about uvm_hotplug(9)
Should fix the evbppc build breakage.
2016-12-24 18:34:31 +00:00
cherry
3631b5f030 introduce evbppc pmap to the uvm_hotplug(9) API
Should fix build.
2016-12-24 18:07:31 +00:00
cherry
3b1622fa3c "Make NetBSD great again!"
Introduce uvm_hotplug(9) to the kernel.

Many thanks, in no particular order to:

TNF, for funding the project.

Chuck Silvers - for multiple API reviews and feedback.
Nick Hudson - for testing on multiple architectures and bugfix patches.
Everyone who helped with boot testing.

KeK (http://www.kek.org.in) for hosting the primary developers.
2016-12-23 07:15:27 +00:00
cherry
e08917ef90 switch all ports to use uvm_init.c:uvm_md_init()
uvm_setpagesize() is now subsumed within this funciton.
2016-12-22 14:47:53 +00:00
rin
010df59ee4 Remove needless goto's. No functional changes. 2016-12-16 06:29:11 +00:00
rin
fcf5a6f169 Fix typo: s/IPKBD/IPKDB/ 2016-12-16 04:27:03 +00:00
rin
d0e34aac46 Fix comments. No functional changes. 2016-12-16 03:59:31 +00:00
rin
6407d3776a Fix build without DDB. 2016-12-15 12:10:01 +00:00
rin
0e2afb8c30 Fix build without DDB. 2016-12-15 11:32:03 +00:00
ozaki-r
dd8638eea5 Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input
The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
  - Where/When if_ipackets is counted up
  - Note that some drivers still update packet statistics in their own
    way (periodical update)
- Moved bpf_mtap run in softint
  - This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
2016-12-15 09:28:02 +00:00
nat
03783bb56a Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
2016-12-08 11:31:08 +00:00
ozaki-r
c0e7885f20 Apply deferred if_start framework
if_schedule_deferred_start checks if the if_snd queue contains packets,
so drivers don't need to check it by themselves.
2016-12-08 01:12:00 +00:00
rin
d71ba65a0e PR port-evbppc/51564 (myself): wait for console input after halting the machine.
ok joerg
2016-12-06 07:34:22 +00:00
nonaka
e4a54b4193 Added MSI/MSI-X and interrupt_distribute(9) support for powerpc. 2016-10-19 00:08:41 +00:00
nonaka
8c5b560fca IFQ_PURGE() must be called only after call if_initialize().
it lock ifp->if_snd.ifq_lock.
2016-07-26 01:36:50 +00:00
matt
fc444195b0 Adapt to common pmap changes. 2016-07-11 16:06:52 +00:00
ozaki-r
d938d837b3 Introduce m_set_rcvif and m_reset_rcvif
The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
2016-06-10 13:27:10 +00:00
chs
bb2ba5a5a7 allocate cpuset structures needed by MP DDB. 2016-05-30 13:04:24 +00:00
macallan
f9df4180d4 treat IPIs like regular interrupts at IPL_HIGH
should fix port-powerpc/44387
tested by chuq
2016-05-26 17:38:05 +00:00
skrll
4e8e66439e Merge nick-nhusb
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
    - kern/48308
    - uhub status notification improvements
    - umass(4) probe fix (applied to HEAD already)
    - ohci(4) short transfer fix
2016-04-23 10:15:27 +00:00
joerg
daac313960 clang now supports normal soft float. 2016-02-27 21:48:34 +00:00
christos
256dd10e5c PR/50858: David Binderman: Remove redundant code. 2016-02-26 18:17:39 +00:00
dholland
a33f4fbcc2 Add missing va_end, from David Binderman in PR 50798. 2016-02-14 18:12:30 +00:00
dholland
e9150352cd Add missing va_end; PR 50795 from David Binderman. 2016-02-14 18:07:49 +00:00
ozaki-r
9c4cd06355 Introduce softint-based if_input
This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
2016-02-09 08:32:07 +00:00
christos
2f34b929f6 use __register_t 2016-01-24 20:02:38 +00:00
christos
2b7829fe47 expose __register32_t for frame.h 2016-01-24 19:49:35 +00:00
christos
d84c286204 expose the kernel types for standalone code. 2016-01-23 22:31:19 +00:00
christos
4d497c90e6 Hide {p,v}{addr,size}_t and register_t (and a couple more types that
are machine-specific) from userland unless _KERNEL/_KMEMUSER and a
new _KERNTYPES variables is defined. The _KERNTYPES should be fixed
for many subsystems that should not be using it (rump)...
2016-01-23 21:22:13 +00:00
christos
df13a573b0 PR/50685: David Binderman: fix memory leak 2016-01-21 17:14:05 +00:00
christos
522db2ab36 move fenv inside ifdef 2015-12-25 06:02:10 +00:00
christos
408e0ea0a3 remove dup definitions from fenv.h 2015-12-22 05:28:46 +00:00
christos
257ef94e95 Add mips fenv.h (From FreeBSD) 2015-12-21 17:02:32 +00:00
christos
ec195e5a37 Add fenv.h for powerpc (from FreeBSD) 2015-12-20 16:23:14 +00:00
pgoyette
1d2807e4ae Remove SYSVSHM-specific code. The value of shminfo.shmall is zero at
the time this pmap initialization code is called, so the increment is
a no-op.  (Thanks christos@ for pointing it out.)
2015-11-05 06:26:15 +00:00
msaitoh
605f564f52 PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
  if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
  Currently the following extended capabilities are decoded:
   - Advanced Error Reporting
   - Virtual Channel
   - Device Serial Number
   - Power Budgeting
   - Root Complex Link Declaration
   - Root Complex Event Collector Association
   - Access Control Services
   - Alternative Routing-ID Interpretation
   - Address Translation Services
   - Single Root IO Virtualization
   - Page Request
   - TPH Requester
   - Latency Tolerance Reporting
   - Secondary PCI Express
   - Process Address Space ID
   - LN Requester
   - L1 PM Substates
  The following extended capabilities are not decoded yet:
   - Root Complex Internal Link Control
   - Multi-Function Virtual Channel
   - RCRB Header
   - Vendor Unique
   - Configuration Access Correction
   - Multiple Root IO Virtualization
   - Multicast
   - Resizable BAR
   - Dynamic Power Allocation
   - Protocol Multiplexing
   - Downstream Port Containment
   - Precision Time Management
   - M-PCIe
   - Function Reading Status Queueing
   - Readiness Time Reporting
   - Designated Vendor-Specific
2015-10-02 05:22:49 +00:00
christos
5020ab68d5 Provide access to pc/sp/syscall-return registers like we have for mcontext 2015-09-15 15:49:02 +00:00
skrll
5cfbd3ac2e Trailing whitespace 2015-09-11 06:55:56 +00:00
skrll
0363056b47 Fix up USBMODE registers in sc_vendor_init functions and not in the ehci
driver.
2015-09-11 06:51:43 +00:00