Commit Graph

119735 Commits

Author SHA1 Message Date
martin 121875800b Remove unsued variable 2013-09-12 12:08:49 +00:00
martin 2861b6deff Remove unused variable 2013-09-12 12:04:37 +00:00
martin 1b1163f56b Get rid of unused variables 2013-09-12 12:03:33 +00:00
martin 46208470f2 Remove unused variable 2013-09-12 11:44:08 +00:00
martin ebfd259656 Eliminate (mostly) unused "ostate" variable 2013-09-12 11:42:26 +00:00
martin 84e3fc8358 Fix wrong for loop limit 2013-09-12 11:38:23 +00:00
martin fda716a94d Remove unused maxPower_t4 variable. 2013-09-12 11:26:53 +00:00
martin a0cc4b1258 Remove unused ppr_able variable. 2013-09-12 11:23:37 +00:00
joerg 9b315b031e Overwrite PIE_*, otherwise bootxx_cd9660 is not recognized by
installboot in MKPIE=yes builds.
2013-09-12 05:54:38 +00:00
christos 952f93f19e Include BRDADDR and NETMASK to the v4 ioctls we ban for v6; from FreeBSD.
Remove X25 stuff which has been GC'ed.
XXX: pullup-5,6
2013-09-11 23:15:47 +00:00
martin 4073f8732b Disallow MAP_FIXED mmap's in the sparc64 VA hole (XXX - need to deal with
different variants of the hole for different CPU types)
2013-09-11 18:27:44 +00:00
martin d31af930cb Allow MD code to add aditional checks for mmap(..., MAP_FIXED) address
ranges. This can be used, for example, to avoid not implemented VA-holes,
but we probably need to check in a few more places.
2013-09-11 18:26:14 +00:00
matt 0c7184eef8 Add md_march and PROC0_MD_INITIALIZERS 2013-09-11 04:24:48 +00:00
matt 50bfeb714d Support an optional MARCH ELF tag.
Store the MACHINE_ARCH of the executable in mdproc and override sysctl
so that value returned.
2013-09-10 21:30:21 +00:00
pooka 543084bf66 regen 2013-09-10 17:42:02 +00:00
pooka cb7f5a8a3d "rumpuser_port.h" -> <rump/rumpuser_port.h> 2013-09-10 17:40:54 +00:00
pooka 6a483aa182 +rump_server 2013-09-10 17:08:57 +00:00
matt 2b74ba5033 Add a NetBSD note variant for recording the machine_arch for which the
executable was built.  (currently only used by earm variants)
2013-09-10 16:24:02 +00:00
macallan 7823c23e84 update comment about which CPU uses what counter/timer 2013-09-10 16:03:48 +00:00
gsutre 403a135bbc Unbreak vax build (which still uses gcc 4.1). See PR lib/48131. 2013-09-10 12:54:14 +00:00
christos 4a5538bfa8 PR/48198: Peter Bex: Avoid kernel panic caused by setting a very small bpf
buffer size.
XXX: Pullup -6
2013-09-09 20:53:51 +00:00
pooka dcf10cb7c5 Fix minor bug in previous: make sure we come out of rump_init()
without a bound lwp set.
2013-09-09 19:18:08 +00:00
matt d3628fd5ef Cleanup. Make KGDB work.
We now process the u-boot boot args.
2013-09-09 17:54:38 +00:00
matt 4f88b6a6f6 Make sure AWIN_PLL_CFG_BYPASS is cleared (it was but just being safe.) 2013-09-09 17:53:36 +00:00
matt 89d25dc1ce Add AWIN_AHCI_DMA
Do a little cleanup
2013-09-09 17:52:48 +00:00
rkujawa c7b0c56c96 Preliminary support for MPL115A2 pressure sensor. It works, but accurracy is
awful.

I should add presure as a new type of sensor to envsys at some point...
2013-09-08 14:59:42 +00:00
chs 4640275d2a revert making smc91cxx_idstrs static, it's referenced from
sys/dev/isa/if_sm_isa.c
2013-09-08 14:27:39 +00:00
jmcneill 017bf683aa defparam ATADEBUG_MASK 2013-09-08 12:51:14 +00:00
matt 1529b1223b Set the ACHI port mask since the h/w is broken. 2013-09-08 11:47:50 +00:00
matt 2bf7a125b9 Allow the attachment to override ahci_ports.
Keep ACHI_PI cached in the softc.
2013-09-08 11:47:16 +00:00
matt 1efbdaa7a9 If there is only 1 port, don't say "1 ports".
Add a debug printf after reading the active ports.
2013-09-08 11:19:47 +00:00
jmcneill 58c506be7c correct a typo in the reg name polled while waiting for phy calibration 2013-09-08 10:43:51 +00:00
jmcneill 36ad2e17e8 Use correct offset for PLL6 register. 2013-09-08 10:32:56 +00:00
skrll c03ab98a67 Add sc->sc_bus.use_polling || to a couple of KASSERTs
PR/46826
2013-09-08 06:37:23 +00:00
pooka 15344de734 Fool isatty() into thinking we're a tty. 2013-09-08 04:37:17 +00:00
kiyohara 1730fa1769 Fix size of EHCI register space. 2013-09-08 04:10:23 +00:00
matt 45d2ed72c1 Improve phy_init a little. Still doesn't work. 2013-09-08 04:07:45 +00:00
matt 7ff2146a83 Rename awinfe to awe and awinge to awge.
Allow properties in awinio0 to disable devices.
Use such a property to disable probing of gige.
2013-09-08 04:06:44 +00:00
msaitoh 10b245faf0 Remove extra debug message. 2013-09-08 03:17:02 +00:00
matt 40fad00f75 Add more nand #define's 2013-09-08 01:29:42 +00:00
matt 79e6364f42 Move interrupts back to IPL_USB 2013-09-08 01:01:33 +00:00
matt 33ff832239 Make sure to actual push the configuration of the GPIO to its registers.
With this change, USB now works.
2013-09-08 00:55:25 +00:00
matt 0e738d35fd Add mii support and some initialization. 2013-09-08 00:05:27 +00:00
matt b4057f5a8c Add some comments 2013-09-08 00:04:33 +00:00
matt 2aea4d4a26 Add mii attr to ethernet devices 2013-09-08 00:03:59 +00:00
matt febe4991a1 Add rlphy 2013-09-08 00:03:40 +00:00
jmcneill b3d80f01ed correct a typo in awin_gpio_pin_ctl that would have prevented configuring output pins 2013-09-07 23:47:33 +00:00
matt 3b639577a4 Add a machdep.hwdiv_present sysctl (cortex A7 and A15 have hwdiv instructions) 2013-09-07 23:10:02 +00:00
matt 21dbc4bb59 Reenable OHCI 2013-09-07 22:52:12 +00:00
matt 5c28d99f8a Simplify USB initialization. 2013-09-07 22:51:41 +00:00
matt d34a5755d1 start adding NFC registers
fix AWIN_AHB_GATING0_USB_OHCI0
2013-09-07 22:51:03 +00:00
matt e6c711a47f add KASSERT to make sure softints are not NULL 2013-09-07 19:53:24 +00:00
matt 5df3d4b64c Add more initialization code for AHCI and USB.
Alas, neither still is coming up.
2013-09-07 19:48:57 +00:00
matt c5a9cb82c0 Finish off GPIO handler. Add hook for other driver to access a named gpio.
Add two input gpio's for usb0.
2013-09-07 19:47:28 +00:00
chs 18ec38ea7c switch to ELF naming for local labels. 2013-09-07 19:06:29 +00:00
chs c2a70ce464 apply changes from Robert Sprowson in PR 47765 and PR 47788:
- make sure we wait long enough after resetting the chip.
 - add the necessary delay after changing the FIFO pointer.
 - add a missing interrupt ACK.
 - fix padding of short and odd-length packets.

and a few more changes from me:
 - do 2-byte writes in most places even if SMC91CXX_NO_BYTE_WRITE
   is not defined.  the only ones still conditionalized are
   writing to the interrupt ack/mask registers.
 - the only big-endian front-end of this driver (on mac68k) uses
   a bus_space that does all the byte-swapping in that layer,
   so remove the explicit byte-swapping in the MI part.

tested on mac68k.
2013-09-07 18:55:29 +00:00
pooka fbf90abc10 fix -Wuninitialized 2013-09-07 18:17:35 +00:00
pooka 28fc97ca89 Add an initial console device and open fd's 0/1/2 for initproc. This is
again useful in standalone-type environments such as Xen, where all
printf/etc calls go through the rump kernel.
2013-09-07 17:58:00 +00:00
rkujawa 45d149c466 Add forgotten xsh device. 2013-09-07 17:23:55 +00:00
skrll b8a293f0ef Some lock comments. 2013-09-07 16:47:23 +00:00
skrll 43ff4efcf0 Typo. 2013-09-07 16:43:48 +00:00
skrll 321324ebc8 Reload the full device descriptor after re-establishing the default pipe
with the new address.

Some HCDs, e.g. dwc2, need wMaxPacketSize to be the value returned from
the device to complete transfers after the set address.  Opening the pipe
again gives the HCD access to the correct value.
2013-09-07 16:39:15 +00:00
skrll 823b4b5f3b Deal with control transfers better by
- removing the UHCI_PTR_VF flag for the setup and status stages
	  which means they are scheduled less aggressively.  Some devices
	  appear to require this (blymn@ has one).  The flag was
	  introduced as a performance improvement for bulk transfers.

	- Checking for short reads and making sure the status stage runs
	  if they're encountered.

PR/47522 Enumeration of LUFA/Atmel devices on UHCI fails

Thanks to jak@ and blymn@ for testing and mlelstv@ for comments.
2013-09-07 16:17:12 +00:00
tsutsui 8f3d6d39ad Whitespace cleanup. 2013-09-07 15:56:11 +00:00
jmcneill 209e8daf3b ECHI -> EHCI in printf 2013-09-07 10:46:18 +00:00
jmcneill ce02c0de21 usb irq handler should be IPL_SCHED 2013-09-07 10:45:53 +00:00
matt 25fcead210 Change two KASSERTs to KASSERTMSG 2013-09-07 03:34:59 +00:00
matt b880990f59 Fix comment. 2013-09-07 03:34:20 +00:00
matt 26ece6925f Only configure awiniic0 for now 2013-09-07 02:46:26 +00:00
matt 6bb0ecb12c correct twi -> awiniic entries 2013-09-07 02:46:06 +00:00
matt b384585b87 Add an INSTALL kernel for CUBIEBOARD 2013-09-07 02:36:59 +00:00
matt d2a02f3137 Comment out ohci 2013-09-07 02:34:01 +00:00
matt cd2eff09a7 Allow either ohci or ehci to be missing. 2013-09-07 02:32:53 +00:00
matt 9687362fa5 Make sure to turn on the phys and clocks and crap. 2013-09-07 02:10:37 +00:00
matt d1e1e0984b Move awin_ahci_set_clear to awin_var.h and rename to awin_reg_set_clear. 2013-09-07 02:10:02 +00:00
matt 7541a57671 Add #ifdef VERBOSE_INIT_ARM 2013-09-07 02:09:23 +00:00
matt ef1cc6c998 Add awingpio 2013-09-07 02:08:56 +00:00
matt f037bcbc97 This uses an EDGE interrupt. (D'oh) 2013-09-07 01:50:12 +00:00
matt bee3a2d7cc Fix some bugs. 2013-09-07 01:42:44 +00:00
matt f85d39dabc Flesh out allwinner support. 2013-09-07 00:35:52 +00:00
matt 8bfbe2803e Remove brain fart with TTBCR 2013-09-07 00:33:32 +00:00
matt fb162eecb5 Add CPU_ID_CORTEXA7R0 entry 2013-09-07 00:32:54 +00:00
matt 291e02d9ef fix CPU_ID_CORTEXA7R0 2013-09-07 00:32:33 +00:00
matt f175e12a3e Use KASSERTMSG 2013-09-07 00:32:02 +00:00
matt 6a4963bd36 call pmap_devmap before awin_bootstrap.
Don't copy bootargs yet.
2013-09-07 00:31:10 +00:00
matt 63da933fa6 Make sure the core register are mapped PA:VA too. 2013-09-07 00:30:17 +00:00
matt 803fa2dd54 Add AWIN_CONSOLE_EARLY and comment out sdhc 2013-09-07 00:29:22 +00:00
matt f78f2a0b7e Use KERNEL_BASE_PHYS for load and entry addresses for u-boot. 2013-09-06 22:56:47 +00:00
skrll 90a158400d Fix INTEGRATOR build. 2013-09-06 21:25:34 +00:00
tsutsui 3e6e9bd41e Tab/whitespace cleanup. 2013-09-06 17:43:19 +00:00
skrll 2362fe4baf Minor update. 2013-09-06 11:15:14 +00:00
skrll a43a823fc4 Improve the #ifdefs
"it's not worse." from matt@
2013-09-06 09:43:32 +00:00
skrll 0196a1c7a9 Change the cv name slightly 2013-09-06 05:50:22 +00:00
matt 33c1c5753b Make gttswi MI and usuable from non-Marvell SoCs.
(should rename to mvi2c but ...)
2013-09-06 00:56:12 +00:00
matt 31f2dd87c7 Make sc_started bool and true/false instead of 1/0 2013-09-05 22:28:57 +00:00
gsutre da518997b2 Implement __negative_p without floating-point arithmetic, using
a solution proposed by jxh on Stack Overflow.  Fixes the second
half of PR lib/48131.

While there, simplify __type_fit_u by using the same logic
as in __type_fit_s.

ok christos@
2013-09-05 21:00:15 +00:00
skrll 60dbdcfe86 RPI DWC2 glue. 2013-09-05 20:49:25 +00:00
skrll c8117e497f Adapt the Synopsys DWC2 driver to NetBSD.
Still work-in-progress
2013-09-05 20:25:27 +00:00
skrll d13ab4c347 Pull across some linux header files from riastradh-drm2, but put them
in a shared location.

Riastradh: nick, OK.
2013-09-05 15:28:07 +00:00
skrll 618a9dc6b5 Do a better job of matching some linux APIs. Still not quite working. 2013-09-05 13:56:12 +00:00
pooka 5d36abf618 In fd_abort(), reset ff_exclose to preserve invariants expected by fd_free() 2013-09-05 12:23:07 +00:00
gsutre a06b34339b Check for overflow in __type_fit_s when casting to intmax_t.
Fixes the first half of PR lib/48131.

ok christos@
2013-09-05 09:03:13 +00:00
skrll 970b07004d Import dwc2 2013-09-05 2013-09-05 07:53:10 +00:00
skrll f5f10bf60f Whitespace 2013-09-05 07:06:37 +00:00
pooka 4c0122ee7f Also create hw.pagesize, makes sysconf(_SC_PAGESIZE) return a more
sensible result.
2013-09-04 17:56:08 +00:00
matt e2b669807c Add wdog support. Use wdog to do reset (works for both A10 & A20). 2013-09-04 17:45:40 +00:00
christos d42767053d regen 2013-09-04 17:39:01 +00:00
christos c454fe7eaa PR/48180: Christian Groessler: Support for Oxford Semi OXuPCI952 dual serial
PCI card
2013-09-04 17:38:37 +00:00
skrll 32d2366deb Typo in comment. 2013-09-04 10:16:16 +00:00
jmcneill 94a3e5f5b5 establish intr handler before calling sdhc_host_found 2013-09-04 09:14:57 +00:00
jmcneill 251d73ff8e add missing call to ahci_attach at the end of awin_ahci_attach 2013-09-04 09:09:25 +00:00
matt 7153ca6fc3 Very very very prelimnary support for cubieboard 1 & 2 based on the
Allwinner A10 & A20 SoCs.  It links and that's about all it does.
Many drivers are stubs with autoconf glue.
com, ahcisata, sdhc, usb might have a chance of working.
2013-09-04 02:39:01 +00:00
pooka f754a2f110 + don't rename rump_syscalls.*o
+ support RUMP_KERNEL_IS_LIBC
2013-09-03 21:32:21 +00:00
pooka cee3de56df regen 2013-09-03 21:30:43 +00:00
pooka d04c1489fc If RUMP_KERNEL_IS_LIBC is defined, alias the rump kernel syscalls to libc
syscall stub symbol names.  This allows running standalone programs in
OS-less environments such as directly on a Xen DomU backed only by a
libc and a rump kernel.
2013-09-03 21:28:24 +00:00
pooka 6d43f1658d Autogenerate rump_syscalls.c into the correct namespace, i.e. it no
longer needs to go through rename in the build.
2013-09-03 20:54:03 +00:00
pooka fb19198452 RUMPCOMP_USEROBJ -> RUMPOBJ_NORENAME
Widens the implied usage scope of the variable.
2013-09-03 19:57:02 +00:00
pooka 31b175eb03 Don't autogenerate the wrapper that is called from the rump kernel
local syscall entry points.  The wrapper is now so big that it doesn't
get inlined (original intent for having it close to the entry points),
and autogenerating a regular function just loses in flexibility.
2013-09-03 19:55:13 +00:00
matt b85d7b17d8 Files for allwinner a20/a10 (need to compile stuff in evbarm/cubie) 2013-09-03 18:02:26 +00:00
matt 1eb01ad9de First attempt at initial evbarm support for cubieboard (compile tested). 2013-09-03 18:01:33 +00:00
jmcneill 6b4d5e4626 no EFR on tl16c750, use AFE bit on MCR reg instead for flow control 2013-09-03 15:32:55 +00:00
matt e7e586be3a Prelimary config goo for CubieBoard 1 & 2
(config is happy with it)
2013-09-03 06:12:00 +00:00
dholland 7763dff664 Add the FS_SUJ flag for journaled softupdates from FreeBSD.
This conflicts with our flag for FS_INDEXDIRS. Apparently FreeBSD
changed that arbitrarily on their end when implementing journaled
softupdates, so follow their lead.

Unfortunately, the new value they use for FS_INDEXDIRS conflicts with
our flag FS_DOQUOTA2 for 64-bit quotas. Since the only thing in our
tree that knows about FS_INDEXDIRS is dumpfs (for printing it), leave
FS_INDEXDIRS commented out.

Also add FS_NFS4ACLS from FreeBSD, commented out because it conflicts
with our FS_DOWAPBL, and FS_TRIM.

(We could honor FS_TRIM as we have code for doing that; however I'm
not sure why FreeBSD chose to make it an on-disk flag instead of e.g.
a mount option and it seems problematic to me. In any case, not in
this commit.)

Also see a post I just made in tech-kern about the flag conflicts.
2013-09-03 02:24:01 +00:00
skrll 2a05a7460d Use C99 designated initializers. 2013-09-02 15:48:08 +00:00
skrll 96ea816f0f Use C99 designated initializers. 2013-09-02 12:27:18 +00:00
skrll e1309f61bd KNF multi-line comments. 2013-09-02 12:20:59 +00:00
christos 7a82a27e35 regen 2013-09-02 07:41:01 +00:00
christos bc6912eb07 PR/48172: Reinhard Speyerer: u3g(4): add 4G Systems XS Stick W14 support 2013-09-02 07:39:03 +00:00
skrll bec8095433 Re-gen. Hi rkujawa. 2013-09-02 07:24:17 +00:00
kiyohara 3976ba3635 Declare mvsata_probe_drive() when defined MVSATA_WITHOUTDMA.
And more delay() for some machines.
2013-09-01 11:14:46 +00:00
kiyohara 38435b16f2 Add support 16750 64Byte FIFO. But not test. 2013-09-01 04:58:15 +00:00
kiyohara b5773b7ae3 Move the Marvell extension to com_mv.c. 2013-09-01 04:51:24 +00:00
matt 78620830e1 convert rfid to rfi in exception handlers. 2013-08-31 15:01:08 +00:00
jmcneill 04ca6cb022 md_root_setconf also depends on option MEMORY_DISK_DYNAMIC 2013-08-31 12:26:56 +00:00
matt 310fbebba0 Move the pmap_setup to the start oea_init (no non-OFW ports can use it).
If PPC_OEA64_BRIDGE is defined, add code so that when OEACPU_64_BRIDGE is not
present, it replaces the rfid with rfi and mfmsr/rldicl/mtmsrd sequence
with NOPs.  This allows plain OEA kernels to work.  (tested on PMPPC with
PPC_OEA64_BRIDGE option added).
2013-08-31 07:33:15 +00:00
matt 378cec5a74 Add CACHE_INFO_DCACHE_LINE_SIZE to assym.h 2013-08-30 21:29:29 +00:00
jmcneill fef2fc66c9 Bump bootloader version for memory disk image changes. 2013-08-30 16:43:33 +00:00
jmcneill 1265ac6952 Add support for using a raw file-system image as memory disk root with
the x86 bootloader.
2013-08-30 16:42:17 +00:00
rmind 4c45c55542 bpf_filter: add a custom argument which can be passed to coprocessor routine. 2013-08-30 15:00:08 +00:00
skrll 36c915dd13 Remove race introduced by using usbd_sync_transfer_sig with a callback
that use the xfer cv (or does wake up on the xfer). The xfer has likely
been freed or re-used.

While here update utoppy(4) to use usbd_sync_transfer_sig.

Fixes PR/48151
2013-08-30 12:59:19 +00:00
hannken 1f6a95ec03 Dounmount() violates the locking protocol for member v_mountedhere.
A vnode lock is required to access or modify this field.

Lock/unlock the vnode when clearing v_mountedhere.

Reviewed by: David Holland <dholland@netbsd.org>

Should fix PR #48135 (Bad locking for umount)
2013-08-30 12:58:22 +00:00
pooka 1f2f41bbc5 commit all files when regen'ing 2013-08-30 11:10:34 +00:00
pooka 8ab637bd54 regen 2013-08-30 10:34:39 +00:00
pooka 7efe29ddc3 There is absolutely no way that fexecve() could even theoretically work
in a rump kernel, so don't create a wrapper for that.

recv/sendmmsg(), however, can, so create wrappers for those.
2013-08-30 10:33:10 +00:00
pooka 74f1a93841 Rename RUMPTEST_BUILDSH to RUMPKERN_ONLY. Turns out not building any
POSIX implementations of hypercalls is useful beyond the build.sh test,
such as when building rump kernels for non-POSIX hosts.
2013-08-30 10:29:06 +00:00
christos d407b3e25b draft-gont-6man-ipv6-atomic-fragment-00 is now RFC 6949 (Loganaden Velvindron
logan at elandsys dot com)
2013-08-30 07:42:08 +00:00
dholland 0a50969465 Use __CTASSERT instead of handrolled version. 2013-08-30 07:35:44 +00:00
dholland 13106e31df more typos in comments 2013-08-30 07:30:50 +00:00
dholland 99c51e18cd typo in comment 2013-08-30 07:25:43 +00:00
riastradh aab95335f3 Make the rpi hwrng feed data to the entropy pool in a softint.
The two-lock scheme here is excessive but will do provisionally until
rnd(9) gets disentangled.

Tested by Aymeric Vincent.
2013-08-29 21:54:11 +00:00