Commit Graph

2783 Commits

Author SHA1 Message Date
macallan
a3107e02e3 make sure we compile mips_fpu.c and fp.S with -mhard-float 2016-03-29 18:40:32 +00:00
martin
afad7c48d8 Restrict float format hacks to gcc 4.8 2016-03-28 08:10:57 +00:00
martin
0b2c20760e Do not touch FP register on softfloat kernels. 2016-03-26 17:40:02 +00:00
tnn
6815b834d0 Don't try to interpret MIPS3-specific status register bit on MIPS1.
Fixes boot of NetBSD/pmax in gxemul 3max emulation mode.
2016-03-06 21:03:01 +00:00
macallan
e2007d759e gcc does not pass floating point options to the assembler
by default, because it is afraid that the stricter tests
will break userland code. The new binutils is pickier about
this. Gcc 5.x fixes the issue so for now, set explicitly
the assembler soft-float flags when we build the kernel.
see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64569
2016-02-18 20:50:44 +00:00
macallan
677061ce2a Adapt CI20 HWRNG to synchronous on-demand callback.
Omit needless softint/locking dance.
from riastradh@
2016-02-17 20:12:42 +00:00
chs
2f02870f3b zero the i2c_attach_args structure before filling it in.
fixes occasional crashes in iic_attach().
2016-02-14 19:54:19 +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
55745840fb use namespace protected types. 2016-01-24 16:13:19 +00:00
christos
f7947ff0c1 expose label_t for _KMEMUSER 2016-01-24 16:08:05 +00:00
christos
5dc68936fa expose __fpregister_t too, merge definitions. 2016-01-24 16:00:45 +00:00
christos
d6d783a302 use namespace protected types. 2016-01-24 16:00:29 +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
macallan
1ae1c2335b properly initialize the EHCI
from Alexander Kabaev ( kan at freebsd.org )
2016-01-02 16:50:52 +00:00
christos
94ed82768d remove dup fenv 2015-12-25 06:01:38 +00:00
christos
257ef94e95 Add mips fenv.h (From FreeBSD) 2015-12-21 17:02:32 +00:00
macallan
21e70d0c91 zero out struct i2cbus_attach_args before messing with it 2015-12-14 23:21:23 +00:00
martin
76713fa86f We never exec(2) with a kernel vmspace, so do not test for that, but instead
KASSERT() that we don't.
When calculating the load address for the interpreter (e.g. ld.elf_so),
we need to take into account wether the exec'd process will run with
topdown memory or bottom up. We can not use the current vmspace's flags
to test for that, as this happens too early. Luckily the execpack already
knows what the new state will be later, so instead of testing the current
vmspace, pass the info as additional argument to struct emul
e_vm_default_addr.
Fix all such functions and adopt all callers.
2015-11-26 13:15:34 +00:00
macallan
b9de1f8955 Long overdue suggestions from Taylor Campbell and a few syntax/style
tweaks from myself.

From Michael McConville
2015-11-17 16:53:21 +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
macallan
c0e6781154 use mips3_ld() and mips3_sd() for all accesses if CHIP_ACCESS_SIZE == 8 and
we're on o32
Now serial console works on O2 with o32 kernels again
2015-10-21 15:47:19 +00:00
macallan
6c39fa1448 add some comments 2015-10-14 15:44:57 +00:00
macallan
eaf482297b fix build with INGENIC_DEBUG 2015-10-08 18:20:31 +00:00
macallan
816f56832b use the MAC address passed as a property if available instead of relying on
u-boot to program it into the chip for us ( which it may not do if we're not
netbooting )
2015-10-08 17:55:58 +00:00
macallan
56acaa063f add a driver for the chip's EFUSE interface, use it to find the MAC address
for the onboard ethernet controller
2015-10-08 17:54:30 +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
b88569ce68 For processors that have memory breakpoints, add macros for them to help
libproc
2015-09-25 16:05:17 +00:00
skrll
de63ae2228 Fix typo 2015-09-21 10:10:19 +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
daa8bb7f76 Trailing whitespace. 2015-09-11 06:55:45 +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
skrll
c7ae7fb6cf Update for latest dwc2 2015-08-30 13:02:42 +00:00
macallan
05830377d3 add attribution, no functional change.
from Michael McConville
2015-08-30 05:09:16 +00:00
dholland
801de81aa6 Turn interrupts back off after sleeping. From maxv's Brainy list. 2015-08-30 04:09:21 +00:00
pooka
01d7ebdd80 Fix PTHREAD_FOO_INITIALIZER for C++ by not using volatile in the relevant
pthread types in C++ builds, attempt 2.

The problem with attempt 1 was making assumptions of what the MD
__cpu_simple_lock_t (declared volatile) looks like.  To get a same type
except non-volatile, we change the MD type to __cpu_simple_lock_nv_t
and typedef __cpu_simple_lock_t as a volatile __cpu_simple_lock_nv_t.
IMO, __cpu_simple_lock_t should not be volatile at all, but changing it
now is too risky.

Fixes at least Rumprun w/ gcc 5.1/5.2.  Furthermore, the mpd application
(and possibly others) will no longer require NetBSD-specific patches.

Tested: build.sh for i386, Rumprun for x86_64 w/ gcc 5.2.

Based on the patch from Christos in lib/49989.
2015-08-27 12:30:50 +00:00
uebayasi
54882650b0 Have MI genassym.cf. 2015-08-26 03:00:52 +00:00
uebayasi
d677c061b4 Replace a constant in ldscript. 2015-08-25 08:08:12 +00:00
uebayasi
db0ac56ebf Define ${LINKSCRIPT} in one place. 2015-08-24 14:04:24 +00:00
uebayasi
ce93b3da57 Don't mention stab and DWARF sections, because these (poorly mtaintained)
lists only help to make them harder to read.

If those sections are found in inputs, they simply appear in outputs as
orphaned sections, sorted by section types and attributes.
2015-08-24 08:13:07 +00:00
uebayasi
6ecada7d3b .rel/.rela should not be generated in kernels. 2015-08-22 23:49:54 +00:00
uebayasi
220951d1d4 I bet setting search-directory for ld.so is useless in any kernel. 2015-08-21 02:35:52 +00:00
uebayasi
185745d477 Indent with 2 spaces. 2015-08-20 07:00:48 +00:00
macallan
569fb3a720 add driver for jz4780 random number generator
From Michael McConville
2015-08-07 17:39:58 +00:00
macallan
7de0cc0eb5 - sprinkle volatile
- add RNG registers
- fix some comments
2015-08-07 17:37:54 +00:00
skrll
6e61a7832e Use IPL_VM for dwc2_intr and mark as MP safe where possible. 2015-07-30 07:32:40 +00:00
skrll
2937f60293 Trailing whitespace. 2015-07-22 10:32:16 +00:00
macallan
ede3c3ba87 - get rid of private bus space in ingenic_com.c
- move com to apbus
- attach the other UARTs
2015-07-11 19:00:04 +00:00
macallan
1e82b93929 fix tpyos 2015-07-11 18:54:03 +00:00
matt
f018114026 More ifndef _MODULE 2015-07-09 14:41:54 +00:00