Commit Graph

2783 Commits

Author SHA1 Message Date
matt
8fc07c130e Enable HWRENA for the CN50xx even though it doesn't support USERLOCAL.
Enable the MIPS64R2 locoresw.
2015-05-25 23:45:54 +00:00
matt
64433ea7fa Don't .set mips64 if we are already mips64 2015-05-20 07:04:49 +00:00
matt
fdf19e39a7 Let the compiler/assembler know we compiling for octeon. 2015-05-19 07:08:21 +00:00
matt
b86a13b9df Add per irq evcnt's 2015-05-19 05:51:16 +00:00
matt
210d1711a7 u-boot on the ERLITE will call the kernel entry point on each cpu specified
in the coremask argument.  Add code to deal with that.
2015-05-19 00:00:23 +00:00
macallan
1e554361c1 explicitly un-suspend the OTG port after PHY reset 2015-05-18 15:11:47 +00:00
macallan
b5397a7efc pass the appropriate clock register to devices so different instances of the
same driver don't have to guess
also wire the ddc2 part to iic4 for now so we can see the monitor
2015-05-18 15:07:52 +00:00
macallan
1f087e4105 add some clock divider registers 2015-05-18 15:03:16 +00:00
matt
6323d617a2 Print cpu_model after copyright. 2015-05-18 01:32:52 +00:00
matt
b2ae998f66 machine_arch on mips depends on the ABI so we need a routine to return
the right value.
2015-05-17 18:52:37 +00:00
macallan
abaafac606 - fix pclk calculation
- report CPU clock
- pass mclk to child devices
- wire up pins for MSC / sdmmc
2015-05-04 12:23:15 +00:00
macallan
d74120f14c moar registers
( clock and gpio related )
2015-05-04 12:16:24 +00:00
matt
e27ef76d92 mips_{l,s}d_a64 only valid for !O32 2015-05-02 18:16:17 +00:00
matt
313761704f Don't define MIPS1/MIPS32/MIPS32R2 if ABI is N32 or N64. 2015-05-02 17:39:31 +00:00
christos
784dba5c8e change #error to KASSERT 2015-05-01 18:37:40 +00:00
hikaru
1e45f134c1 Use dwc2 instead of octeon_usbc, and unify octeon_usbn to new octeon_dwctwo.
Internal USB memory stick of EdgeRouter Lite works now.
2015-05-01 07:23:47 +00:00
hikaru
f693c92206 Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.
2015-04-29 08:32:00 +00:00
macallan
0d580d9e18 add entries for sdmmc hosts, no driver yet 2015-04-28 15:08:07 +00:00
macallan
b476f8d357 'USB' -> 'USB OTG' to distinguish this one from the other USB hosts 2015-04-28 15:07:07 +00:00
macallan
dfeb853a61 add sdmmc ('MSC') registers 2015-04-28 15:05:45 +00:00
macallan
f1ea20a105 more bits & registers 2015-04-23 01:20:20 +00:00
macallan
d3361f56e7 enable clocks as needed 2015-04-21 19:57:41 +00:00
macallan
de18a25b0d #define some bits in the clock gating registers 2015-04-21 19:56:01 +00:00
macallan
3aefd491bf fix comments, add LCDC*_BASEs 2015-04-21 19:19:31 +00:00
macallan
66d1b808ee support interrupt-driven transfers 2015-04-21 06:12:41 +00:00
jmcneill
6c00453054 __HAVE_PREEEMPTION -> __HAVE_PREEMPTION 2015-04-14 22:36:53 +00:00
riastradh
445478ce67 MD rnd.h cleanups. Please let me know if I broke anything! 2015-04-13 21:18:40 +00:00
macallan
fb06cc11ce preliminary driver for JZ4780's on-chip SMBus controllers
needs more work but it's good enough for talking to an RTC
2015-04-04 12:28:52 +00:00
macallan
c593056617 use 32bit __cpuset_t in o32 kernels
ok matt@
2015-03-29 12:00:02 +00:00
macallan
ada74a1dcd - determine bus clock, pass it to devices
- more clock enabling / gpio setup
2015-03-25 11:25:10 +00:00
macallan
53a48da639 more clock and gpio stuff 2015-03-25 11:23:26 +00:00
macallan
ac1f438869 add SMBus registers 2015-03-19 12:22:36 +00:00
macallan
1b64e3ebad spin up SMBus clocks before attaching drivers
TODO: only enable clocks for drivers that actually attach
2015-03-19 12:22:00 +00:00
macallan
4f8ab635ea set root hub vendor IDs 2015-03-17 09:27:09 +00:00
macallan
73612c0da3 always print the child devices' address, print irq if not -1 and a driver
is actually attaching
2015-03-17 09:26:31 +00:00
macallan
613f592364 - keep a list of devices, addresses and interrupts in apbus.c
- pass irq numbers to devices
- reduce magic numbers in device drivers
- allow multiple instances of device drivers
2015-03-17 07:25:07 +00:00
macallan
9f61ee1762 add SMBus base addresses 2015-03-17 07:22:40 +00:00
macallan
8aae23d3a3 config goop for dme 2015-03-10 18:16:20 +00:00
macallan
68b2e2bad9 support CI20's onboard Ethernet controller 2015-03-10 18:15:47 +00:00
macallan
4dd5ab1bbe flash the LED to show we're doing something
( and as a side effect make sure the USB PHY is powered up )
2015-03-10 18:03:17 +00:00
macallan
f9cd814175 add gpio registers 2015-03-10 18:02:16 +00:00
macallan
2b384ef413 moar devices 2015-03-09 13:24:21 +00:00
macallan
7cae5ebb28 magic number reduction 2015-03-09 13:23:57 +00:00
macallan
c614c4022d moar registers 2015-03-09 13:22:37 +00:00
macallan
e3ba4f1c4e drivers for on-chip ohci and ehci
ohci works fine, ehci doesn't like high speed devices
2015-03-08 17:14:27 +00:00
macallan
97f2a49be5 add memory controller registers 2015-03-07 15:36:16 +00:00
macallan
cc7c5632da fix uart parameters, now speed setting actually works 2015-03-07 15:35:33 +00:00
macallan
8ec6531309 on o32 kernels with MIPS3 use mips3_sd() and mips3_ld() in *read*_8()
and *write*_8() methods
needed by sgimips, some O2 registers can only be properly written in
64bit chunks
2015-02-27 14:44:16 +00:00
macallan
2bded62014 do as others do and mmap() DMA buffers uncached if we get
BUS_DMA_PREFETCHABLE passed in flags
2015-02-17 09:58:33 +00:00
macallan
3ee6b07ade mmap() DMA buffers uncached if we know how.
From sgimips, needed for X on O2.
2015-02-16 14:10:00 +00:00
skrll
cb047b90b6 Deal with 64-bit fallout from previous. 2015-02-13 17:19:23 +00:00
macallan
6b5804d6c0 fix previous for LP64 2015-02-13 14:11:12 +00:00
macallan
c580902417 in unmap():
- fix pasto in debug output
- shut up a set-but-not-used warning
2015-02-12 13:29:15 +00:00
macallan
21afea1618 - add CHIP_WRONG_ENDIAN for things like PCI buses behind endianness
converting hardware that can't be turned off, like MACE PCI found in
  the SGI O2
- when using CHIP_ACCESS_SIZE on a bus with CHIP_ALIGN_STRIDE > 0 make
  sure we apply the stride when shifting data around
ok matt@ and my gdium still works
2015-02-08 15:22:33 +00:00
macallan
735afce6b0 restrict DMA buffers to the lower 256MB -> now dwc2 DMA works 2014-12-27 17:22:15 +00:00
macallan
5a85739cac - use the same parameter block as the linux driver, only with DMA disabled
- reset the chip before handing it to dwc2/
now it actually detects some devices
2014-12-25 05:13:49 +00:00
macallan
27aeb3449c un-gate yet another clock 2014-12-25 05:10:50 +00:00
macallan
9d431d0b9b even more registers 2014-12-25 05:10:00 +00:00
macallan
fa629718a1 appease nick 2014-12-23 18:48:52 +00:00
macallan
a08011a1be wake up the USB ports before attaching dwctwo
now it finds a root hub
2014-12-23 16:16:03 +00:00
macallan
10ba91a874 yet more registers 2014-12-23 16:15:05 +00:00
macallan
2346a64152 establish interrupt
do some PHY setup, now the hardware actually responds
2014-12-23 15:13:30 +00:00
macallan
2efe8d8430 establish interrupt 2014-12-23 15:12:23 +00:00
macallan
7ede87f785 use defflag-ed debug options
enable USB clocks before attaching dwctwo
2014-12-23 15:11:05 +00:00
macallan
28afb0c864 moar registers 2014-12-23 15:03:56 +00:00
macallan
071b59b0a8 config goop for apbus and dwc2/usb 2014-12-06 14:36:52 +00:00
macallan
4ccdfa77b1 dwc2 attachment, doesn't do much yet 2014-12-06 14:35:47 +00:00
macallan
2b89b9b534 peripheral bus, not really tested 2014-12-06 14:34:56 +00:00
macallan
c2b36bb0e2 moar registers! 2014-12-06 14:33:34 +00:00
macallan
39149f4bc3 sprinkle static 2014-12-06 14:33:18 +00:00
macallan
bc8fb6d4a3 fix _MTC0_V0_USERLOCAL for _LP64 as well
ok matt@
2014-11-25 05:28:26 +00:00
macallan
a36351c4b7 initial support for CI20 / Ingenic JZ4780
not much there yet, it loads, attaches a serial port and you can drop into
ddb
2014-11-22 15:17:01 +00:00
macallan
a85f210ee9 deal with Ingenic XBurst CPUs 2014-11-22 15:02:39 +00:00
christos
a0a6c85f4d centralize the call unit / dialout macros 2014-11-15 19:20:01 +00:00
uebayasi
017bd8df74 LINKSCRIPT is set only once, so use = not +=. 2014-11-15 15:01:41 +00:00
uebayasi
634cfde5a0 Use LINKSCRIPT. 2014-11-15 12:20:06 +00:00
snj
f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
joerg
7dc902cf7b Normal spelling is .asciz, so use that on MIPS too. 2014-09-17 16:49:20 +00:00
matt
82a12988ef Include <sys/common_int_types.h> if __UINTPTR_TYPE__ is defined. 2014-08-13 22:56:56 +00:00
matt
0b2cac531b Include <sys/common_int_const.h> if __INTMAX_C_SUFFIX__ is defined. 2014-08-13 22:51:58 +00:00
matt
7c5094c243 Include <sys/common_init_limits.h> if __SIG_ATOMIC_MAX__ is defined. 2014-08-13 22:31:06 +00:00
matt
2534797f07 include <sys/common_int_mwgwtypes.h> if __UINT_FAST64_TYPE__ is defined. 2014-08-13 22:25:39 +00:00
matt
efe99ca41d include <sys/common_int_fmtio.h> if __INTPTR_FMTd__ is defined 2014-08-13 19:48:17 +00:00
tls
ea6af427bd Merge tls-earlyentropy branch into HEAD. 2014-08-10 16:44:32 +00:00
dholland
f9228f4225 Add d_discard to all struct cdevsw instances I could find.
All have been set to "nodiscard"; some should get a real implementation.
2014-07-25 08:10:31 +00:00
alnsn
582402eab5 Rename sljitarch.h to sljit_machdep.h. 2014-07-23 18:19:43 +00:00
alnsn
196ff48bae Define SLJIT_CACHE_FLUSH() for mips. 2014-07-22 19:54:55 +00:00
martin
86b32edaf5 Restore file for playstation2 accidently overlooked in the big revitilazation 2014-07-02 13:33:22 +00:00
skrll
cc7dc561ab Remove unused variables 2014-06-28 10:25:32 +00:00
skrll
70a57c80dc #ifdef a variable like its usage. 2014-06-28 10:25:16 +00:00
msaitoh
b211437b51 IFM_FDX and IFM_HDX use different bit, so set IFM_HDX bit if it's not full
duplex. For many drivers, it recognize half duplex if IFM_FDX isn't set,
but not for others. Same as {Free|Open}BSD.
2014-06-16 16:48:16 +00:00
mrg
d316f09705 apply __diagused. 2014-06-02 04:57:02 +00:00
joerg
123b42ea74 Drop undocumented and redundant 0 argument to .ent. 2014-05-30 11:46:48 +00:00
skrll
4f6a923c1a Comment out nfrac as it's unused. 2014-05-29 14:41:26 +00:00
skrll
c9b732994b Remove unused file. 2014-05-28 12:06:24 +00:00
skrll
550a0399de Optimise the BUS_DMASYNC_PREREAD operation by only using wbinv for partial
cachelines. Full cachelines are now invalidated only.

From the same change in various mips ports not least cobalt.
2014-05-27 15:56:18 +00:00
rmind
8011b285c0 Implement MI IPI interface with cross-call support. 2014-05-19 22:47:53 +00:00
rmind
d67ab12c1d pcu(9):
- Remove PCU_KERNEL (hi matt!) and significantly simplify the code.
  This experimental feature was tried on ARM did not meet the expectations.
  It may be revived one day, but it should be done in a much simpler way.
- Add a message structure for xcall function, pass the LWP ower and thus
  optimise a race condition: if LWP is discarding its state on a remote CPU,
  but another LWP already did it - do not cause an unecessary re-faulting.
- Reduce the variety of flags for PCU operations (only PCU_VALID and
  PCU_REENABLE are used now), pass them only to the pcu_state_load().
- Rename pcu_used_p() to pcu_valid_p(); hopefully it is less confusing.
- pcu_save_all_on_cpu: SPL ought to be used here.
- Update and improve the pcu(9) man page; it needs wizd(8) though.
2014-05-16 00:48:41 +00:00
skrll
21e6642529 Deal with incompatible cache aliases. Specifically,
- always flush an ephemeral page on unmap
- track unmanaged mappings (mappings entered via pmap_kenter_pa) for
  aliases where required and handle appropriately (via pmap_enter_pv)

Hopefully this (finally) addresses the instability reported in the
following PRs:

PR/44900 - R5000/Rm5200 mips ports are broken
PR/46890 - upcoming NetBSD 6.0 release is very unstable / unusable on cobalt qube 2
PR/48628 - cobalt and hpcmips ports are dead
2014-05-11 07:53:28 +00:00
skrll
a774828bd4 In the MULTIPROCESSOR case where another thread wins the race to allocate
a new segtab page call mips_pmap_unmap_poolpage on the page our thread
allocated and called mips_pmap_map_poolpage for.
2014-05-05 05:55:21 +00:00
skrll
126d985871 Make this compile/work with PARANOIADIAG 2014-05-04 17:06:23 +00:00
skrll
9529d26c91 Use pmap_tlb_asid_check to reduce code c&p. 2014-05-03 12:50:01 +00:00
skrll
5aa26d5c98 Make PARANOIADIAG compile. 2014-05-03 07:06:31 +00:00
skrll
bc85f1552e Grab pv_list lock in pmap_unmap_ephemeral_page only when needed. 2014-05-03 06:55:04 +00:00
matt
86475f594a Remove cfg1 manip, moved elsewhere.
Use aprintf_normal_dev for some debug printfs
2014-04-30 00:54:47 +00:00
matt
eef2f41538 Fix a few more register definitions. 2014-04-30 00:53:31 +00:00
matt
37f92b90d2 Instead of
mainbus0 (root): Ralink System Bus
be more explicit about the system:
mainbus0 (root): Mediatek MT7620 System Bus
2014-04-30 00:52:49 +00:00
matt
e1c34615b2 comment a #endif 2014-04-30 00:51:26 +00:00
matt
2e12761837 Add a static bus_space_handle_t for the core (sysctl) registers. 2014-04-30 00:51:01 +00:00
matt
31ad70f277 Stub for PCI/PCIe support for RT3883/MT7620 2014-04-29 17:21:24 +00:00
matt
272c0890ba Clean these up and move some defines to ralink_reg.h 2014-04-29 17:10:07 +00:00
matt
7cfc5595df More MT7620 definitions 2014-04-29 17:09:17 +00:00
matt
9130dd89d8 Add pci attachment 2014-04-28 22:59:49 +00:00
skrll
e97ebf330d Fix a logic inversion introduced with the matt-nb5-mips64 for
pmap_{zero,copy}_page cache alias handing. The check previously used
PG_MD_UNCACHED_P, where it now uses PG_MD_CACHED_P, when considering if
a cache invalidation is required.

Additionally flush the cache for the uarea va to avoid potential (future)
cache aliases in cpu_uarea_free when handing pages back to uvm for later
use.

ok matt@

Hopefully this addresses the instability reported in the following PRs:

PR/44900 - R5000/Rm5200 mips ports are broken
PR/46170 - NetBSD/cobalt 6.0_BETA does not boot
PR/46890 - upcoming NetBSD 6.0 release is very unstable / unusable on cobalt qube 2
PR/48628 - cobalt and hpcmips ports are dead
2014-04-23 20:57:15 +00:00
matt
8ed9a6d892 Since all our compilers support __DBL_* and __FLT_*, use them to define
{DBL,FLT}_{DIG,MIN,MAX}
2014-04-21 10:53:47 +00:00
matt
e5f2235165 Add PCI register definitions 2014-04-19 12:48:03 +00:00
christos
3ff79dba35 adjust to new signature; return consistent stuff. 0 is ok -1 is error 2014-04-05 18:44:32 +00:00
ozaki-r
1cf0ee0759 Adjust to pci_intr_string signature 2014-04-04 16:41:55 +00:00
christos
81a9ee1d79 adjust to pci_intr_string signature. 2014-04-04 01:41:05 +00:00
macallan
381c27a747 catch up with *_intr_string() changes 2014-03-30 20:06:50 +00:00
christos
e58a356cba make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
2014-03-29 19:28:24 +00:00
christos
43ebc39121 kill sprintf 2014-03-26 17:41:15 +00:00
christos
b2543b9136 use cpu_{g,s}etmodel 2014-03-24 20:06:31 +00:00
christos
805326e6ff Make all __ALIGNBYTES macros return the same type (size_t) 2014-03-18 17:11:19 +00:00
dholland
a68f9396b6 Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
mrg
3b431c6785 remove some dead code, avoid set but unused variables. 2014-03-12 22:21:07 +00:00
mrg
56d2939512 avoid set but unused variables.
move variables under their usage #ifdef.
2014-03-11 08:19:45 +00:00
martin
8dd2c2e15c fix typo 2014-02-23 20:56:29 +00:00
msaitoh
1f7f7f0d8b Check _BYTE_ORDER. 2014-02-07 15:49:40 +00:00
christos
9718726c93 fix incorrect variable; (hi matt) 2014-02-05 19:09:06 +00:00
matt
ecd212e672 Provide a simple version of _bus_dmamap_load_raw. If each segments can
be mapped by XKPHYS/KSEGn, then the load will succeed.  If it would
require a bounce buffer or being mapped into the kernel's address space,
the load will fail.
2014-02-03 19:18:59 +00:00
matt
4d035bbcf3 Consolidate the 128-bit long double defintions to <sys/ieee754.h>
Each arch that uses it now defines __HAVE_LONG_DOUBLE to 128.
<machine/ieee.h> is now just include the machine's math.h followed
by <sys/ieee754.h>
2014-01-31 19:38:06 +00:00
matt
773a94325e Convert to uint64_t 2014-01-31 11:53:37 +00:00
christos
eacc94b9a6 handle non-topdown binaries 2014-01-25 15:20:55 +00:00
christos
b07f3fe235 delete VM_DEFAULT_ADDRESS; some of those should be GC'ed because they match
the default definition.
2014-01-25 15:16:49 +00:00
christos
058ee963d2 remove dup define (already defined in mips_param.h) 2014-01-22 20:49:19 +00:00
dsl
95739e63cd Remove __HAVE_PROCESS_XFPREGS and add the extra parameter for the size
of the fp save area to all the process_read_fpregs() and
  process_write_fpregs() functions.
None of the functions have been modified to use the new parameters.
The size is set for all the writes, but some of the arch-specific reads
  just pass NULL.
The amd64 (and i386) need variable sized fp register save areas in order
  to support AVX and other enhanced register areas.
These functions are rarely called - so the extra argument won't matter.
2014-01-04 00:10:02 +00:00
dsl
be74e0a9c9 Change the type of the 'cookie' that holds the state of the core dump file
from 'void *' to the actual type 'struct coredump_iostate *'.
In most of the code the contents of the structure are still unknown.
This just stops the wrong type of pointer being passed to the 'void *'
parameter.
I hope I've found everything, amd64 GENERIC and i386 GENERIC & ALL compile.
2014-01-01 18:57:15 +00:00
mrg
8693e10867 fix a register copy in compat_16_sys___sigreturn14() that GCC 4.8
picked up (would have read uninitialised, and possibly unmapped data,
but i doubt many people are running netbsd 1.6 mips apps on mips64
hosts yet.)
2013-12-06 13:52:05 +00:00
christos
ebc7bfb61b nobody uses qchain and it is about to be GC'ed. 2013-11-25 03:01:58 +00:00
alnsn
988b97e4aa Always define SLJIT_CACHE_FLUSH(), start include guards with '_' and use _LP64 guard. 2013-11-17 12:01:58 +00:00
christos
0101d11c56 fix unused variable warnings 2013-11-10 18:27:15 +00:00
christos
9f0d33d554 fix unused 2013-11-10 17:18:32 +00:00
christos
abc81f7c5e use __unused instead of __USE and void cast to mark iterator variable unused
where needed (from phone)
2013-11-10 00:50:13 +00:00
uebayasi
8415bb8191 G/C struct user *proc0paddr. 2013-10-30 06:47:18 +00:00
christos
3c79246835 discard eh sections 2013-10-04 15:02:43 +00:00
skrll
48d64c44ce Adapt to usbmp. Compile tested only.
Did this ever work?
2013-09-22 08:30:22 +00:00
skrll
f05cdfd607 Remove trailing whitespace. 2013-09-22 07:26:42 +00:00
skrll
2a05a7460d Use C99 designated initializers. 2013-09-02 15:48:08 +00:00
matt
7b311c01b4 When decide to coalesce segments, if the d_cache isn't coherent also make
sure the VA is contiguous as well.
2013-08-23 07:15:08 +00:00
drochner
69aeb16c07 -extend the pcu(9) API by a function which saves all context on the
current CPU, and use it if a CPU is taken offline
-add a bool argument to pcu_discard which tells whether the internal
 "LWP has used the coprocessor" flag should be set or reset. The flag
 is reported by pcu_used_p(). If set, future accesses should use the
 state stored in the PCB. If reset, it should be reset to default.
 The former case is useful for setmcontext().
 With that, it should not be necessary anymore to manage the "FPU used"
 state by an additional MD variable.

approved by matt
2013-08-22 19:50:54 +00:00
matt
0d1919ebcb Use sy_invoke 2013-06-26 08:38:03 +00:00
christos
3be97503a9 add generic copyrights so FreeBSD can use them. 2013-05-23 21:39:49 +00:00
macallan
095356428f add definitions for Loongson 2F Chip Config register 2013-04-16 09:02:32 +00:00
christos
caafbf4e1b add missing SSIZE_MIN 2013-04-11 00:57:34 +00:00
christos
3f9b5ba889 Explicitly set KERN_AS (this could be done in /usr/src/sys/conf/Makefile.*)
so that modules work, on config files that did not set it explicitly. All
the files now use the standard logic, except the ones that set KERN_AS=obj
and Makefile.usermode which sets KERN_AS=library.
2013-03-10 07:18:19 +00:00
joerg
e240adbd0b Retire OSI network stack. OK core@ 2013-03-01 18:25:13 +00:00
macallan
adb2aeccbf add sysctl machdep.loongson-mmi to indicate wether Loongson Multimedia
Instructions are supported
mostly for pixman
2013-02-28 12:44:38 +00:00
matt
b885b904fc Define LDBL_IMPLICIT_NBIT 2013-02-14 08:56:21 +00:00
matt
f5242e7fdd Make LDBL_NBIT and mask_nbit_l have no effect. 2013-02-14 00:55:25 +00:00
christos
981fdd0a21 whitespace police 2013-01-30 02:48:22 +00:00
matt
e3604c46b6 Add two missing relocs and DT_MIPS_PLTGOT and DT_MIPS_RWPLT 2013-01-30 01:11:12 +00:00
matt
1961975a4e Update to use new pcu_state_{load,save,release} definitions 2012-12-26 19:17:48 +00:00
matt
54bde49e53 Fix typo 2012-12-26 19:15:16 +00:00
matt
1a174f95b9 Update to use new pcu_state_{load,save,release} definitions. 2012-12-26 19:09:07 +00:00
alnsn
9fa58a12c5 EVPMIPS -> MIPS in include guard. 2012-11-25 23:04:51 +00:00
alnsn
079dc4d907 Add sljitarch.h to all mips machines. 2012-11-25 21:55:50 +00:00
skrll
34800b5860 We need to jump out of two switches to emulate rdhwr rt,$29 correctly.
Only one would result in segv.

Fixes pthread apps on mips1. Tested using gxemul.
2012-11-01 22:15:25 +00:00
chs
cbab9cadce split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +00:00
matt
11561450f1 N32 uses dadd instructions to manipulate stack (actually, all ABIs except
O32 use dadd).
2012-09-12 15:09:49 +00:00
bouyer
9edd4d81c5 Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
2012-07-31 15:50:31 +00:00
jakllsch
102f7b2016 Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
2012-07-26 20:49:44 +00:00
matt
0bc3200029 Fix mii_statchg to take a 'struct ifnet *' instead of device_t. This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.
2012-07-22 14:32:49 +00:00
matt
09fca0b71e EHCI_USBINTR is 4 bytes long so use EOWRITE4 2012-07-20 02:14:01 +00:00
matt
466102b969 Change lockless segtab management to use a mutex for protection. Some minor
changes to make this closer to common/pmap/tlb/pmap_segtab.c
2012-07-05 17:21:02 +00:00
bouyer
03c9df05c6 Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
  probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
  really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
  ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
  with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
  University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
  when SATA cable move was needed
2012-07-02 18:15:44 +00:00
kiyohara
51eeb5bd58 Fix can't assign IPv6 address. Valiable error resets to 0, if error == ENETRESET in aumac_ioctl(). 2012-06-07 00:19:29 +00:00
martin
6c3cc552c2 Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.
2012-05-21 14:15:16 +00:00
kiyohara
1818db7635 Enable interrupt in aumac_init(). And disable in aumac_stop()/aumac_attach().
Interrupt storm happen if received packet and DMA not set.
2012-05-19 15:17:35 +00:00
christos
ac37e644bb - elide parameter tags
- make argument size_t as appropriate
- add begin/end decls
2012-03-29 21:20:08 +00:00
christos
7484a2dbbe - Normalize inclusion protection (remove)
- Move CHAR_{MIN,MAX} to a common file.
- Fix broken comments
2012-03-28 17:03:27 +00:00
nonaka
e8e2f240ee fix build failure on mipsel.
>/usr/src/lib/libc/gen/nlist_ecoff.c(112): warning: constant in conditional context [161]
2012-03-20 11:28:04 +00:00
matt
df5fea35ff Use unsigned int instead of int fo the fp* typedefs. 2012-03-19 22:24:07 +00:00
mrg
3ecaef1d4b pull down from usbmp branch:
- remove usbd_bus{} intr_context member, and replace the checks against
  it with cpu_intr_p() and cpu_softintr_p().
2012-03-11 00:34:45 +00:00
mrg
c42ab07995 normalise RCSID handling some. 2012-03-11 00:02:04 +00:00
matt
7563d7d666 remove safepri declaration since it's defined in kern_synch.c 2012-03-03 00:23:19 +00:00
matt
31984c0b33 define IPL_SAFEPRI which will be used by kern_synch.c to initialize safepri. 2012-03-03 00:21:50 +00:00
matt
3c396e148d Remove an incorrect KASSERT 2012-02-27 15:57:21 +00:00
rmind
ad12c77015 Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
2012-02-19 21:05:51 +00:00
matt
1d7f24ead8 Change old-style function defintions to C89 prototypes.
Approved by releng.
2012-02-12 16:34:06 +00:00
oki
b06b44a7b8 add RT3050 SYSCTL_CFG0 values. 2012-02-12 01:51:52 +00:00
martin
f8c7c04bbe Add a posix_spawn syscall, as discussed on tech-kern.
Based on the summer of code project by Charles Zhang, heavily reworked
later by me - all bugs are likely mine.
Ok: core, releng.
2012-02-11 23:16:15 +00:00
tls
7b0b7dedd9 Entropy-pool implementation move and cleanup.
1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.
2012-02-02 19:42:57 +00:00
para
3eed4a3cfa - bringing kmeminit_nkmempages back and revert pmaps that called this early
- use nkmempages to scale the kmem_arena
- reducing diff to pre kmem/vmem change
   (NKMEMPAGES_MAX_DEFAULT will need adjusting on some archs)
2012-02-02 18:59:44 +00:00
matt
c97a1e79d0 Add ALIGNBYTES32/ALIGN32 for netbsd32. 2012-02-01 02:05:51 +00:00
matt
645c524104 Fix early console support. 2012-02-01 02:05:14 +00:00
para
e62ee4d475 extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(with private interface for interrupt safety reasons)

releng@ acknowledged
2012-01-27 19:48:38 +00:00
para
89c9828deb converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
2012-01-27 18:52:47 +00:00
matt
e5323fccec Let mips_pmap_{,un}map_poolpage do the translation work. 2012-01-26 02:14:08 +00:00
christos
dd23e71080 Use and define ALIGN() ALIGN_POINTER() and STACK_ALIGN() consistently,
and avoid definining them in 10 different places if not needed.
2012-01-24 20:03:36 +00:00