Commit Graph

1903 Commits

Author SHA1 Message Date
drochner dce09ea075 clean up some definitions around rune_t which are not needed anymore 2007-09-03 20:31:56 +00:00
drochner 0e0fe2c353 Fix definitions of UCHAR_MAX/USHRT_MAX and related
types. C99 requires that these definitions promote to (signed/unsigned)
integer the same way as the types the definition is for. And since
unsigned char/short fit into an "int" on all our archs and thus promote
to signed int, the definitions must not be unsigned.
Fixes PR lib/31306 by Neil Booth.
2007-08-31 16:24:21 +00:00
dyoung 6f7649313f Constify. 2007-08-26 22:28:52 +00:00
ad 8b381466db The Atheros HAL on MIPS uses %s7 as a general purpose register, but the
rest of the kernel uses it to store the value of curlwp. Sam won't
recompile the HAL for us (fair enough), and we can't modify the HAL
to use another register because doing so could put us in breach of
the license (v. crappy). So, do a save/set/restore on %s7 in KernIntr()
and in the stubs that the HAL uses to call back into the kernel.
2007-08-24 23:52:10 +00:00
ad 07b0fe01aa cpu_lwp_fork: don't rely on struct mdlwp being zeroed in advance. 2007-08-17 23:58:45 +00:00
ad 63c4506184 Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.
2007-08-15 12:07:23 +00:00
kiyohara ec1fb4e2a6 Remove white-spaces. 2007-08-14 14:10:52 +00:00
ad 9c6535a6de Add ci_cpuid where it's missing. 2007-08-04 09:49:51 +00:00
ad 744a92f0f8 Don't depend on uvm_extern.h pulling in proc.h. 2007-07-21 19:06:20 +00:00
tsutsui a02017d6e7 Don't set PSL_LOWIPL to SR on switching to lwp_trampoline().
If interrupts are enabled when kernel is switched to lwp_trampoline(),
we could get lock errors by interrupts before lwp_unlock() in lwp_startup()
is called. The spl is lowered by spl0() in lwp_startup() after lwp_unlock().

Ok'ed by mhitch@ and ad@ on port-mips.
2007-07-18 13:46:46 +00:00
macallan 57a324e6fa if we have 64bit paddr_t add a flag which indicates non-cachable for use
with mmap*() and pmap_enter()
Mainly for allowing userland to mmap() the O2's framebuffer uncached
2007-07-17 04:01:34 +00:00
macallan 8bad22882a add definitions for non-cached pages 2007-07-17 03:53:56 +00:00
macallan a1457f5905 change pmap_phys_address()s parameter to paddr_t since that's what it gets
fed from mmap*() anyway
approved by gimpy
2007-07-16 23:48:03 +00:00
he f39d28c4bf Adapt to the new signature of callout_init(). 2007-07-12 22:02:38 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
pooka 0bc323f5cd Initialize the link context in a signal frame to the receiving lwp's
link context instead of NULL.  Otherwise, if we got a signal while the
lwp had a link context set, the link context would be set to NULL upon
return from signal delivery.

christos@tech-kern: "I think you are right."
2007-07-08 10:19:21 +00:00
tsutsui 6a8a584d1a Remove leftover netns stuff. 2007-07-07 05:13:14 +00:00
uebayasi 2360b1d428 Fix typo. 2007-06-27 08:16:58 +00:00
tsutsui 73b3a64df4 Move declaretions of _spl*() and _{clr,set}softintr() functions
(which are in mips/locore.S) into <mips/locore.h>
from various MD files.
2007-06-17 06:04:27 +00:00
tsutsui 82e46da13f Use the kernel symbol table to see the beginning of the current
subroutine to get more proper backtrace on ddb(4).

In the previous code it scans backwards from the current PC
for the end of the previous subroutine and checks "jr ra" or
"jr k0" instructions, but it often fails because gcc is
so aggressive nowadays as to reorder instruction blocks
to create efficient code path by branch predict etc. and
"jr ra" is not always located at the end of subroutines.

No objection on port-mips.
2007-05-29 12:03:45 +00:00
tsutsui 5964c0cd2d Pass correct args to lwp_startup() in lwp_trampoline().
Should fix "panic: TLB out of universe" on MIPS3 machines.
2007-05-27 13:57:30 +00:00
tsutsui aee64784f3 proc_trampoline -> lwp_trampoline in comment. 2007-05-25 23:58:43 +00:00
tsutsui 0f31f5cb6c Preserve local symbols on linking a kernel so that
we can get more useful trace on ddb(4).
2007-05-25 10:44:27 +00:00
he e9e5beefa0 Now that curcpu() is defined in terms of curlwp() for mips, we need to
include <sys/lwp.h> where curcpu() is used.
2007-05-20 17:06:25 +00:00
yamt f03010953f merge yamt-idlelwp branch. asked by core@. some ports still needs work.
from doc/BRANCHES:

	idle lwp, and some changes depending on it.

	1. separate context switching and thread scheduling.
	   (cf. gmcgarry_ctxsw)
	2. implement idle lwp.
	3. clean up related MD/MI interfaces.
	4. make scheduler(s) modular.
2007-05-17 14:51:11 +00:00
dyoung 1a779e29db Delete noisy diagnostic printf. 2007-04-22 19:26:25 +00:00
dyoung 4c03b53e43 In admsw_intr(), print any events we do not expect. 2007-04-17 03:33:48 +00:00
matt 89cbd8eca5 Remove the BUS_DMA_COHERENT check from bus_dma_mmap 2007-04-12 23:07:50 +00:00
matt ec4c8bca53 If bus_space_mmap is asked for a COHERENT page, make the phys addr is from
KSEG1.
2007-04-12 22:48:38 +00:00
dogcow 5eb224a2d3 the last of caddr_t in sys/, save for netbsd32_caddr_t and the like. 2007-03-23 20:05:47 +00:00
dyoung 5451083ef2 Comment out admflash, I have not supplied a source file for that,
yet.
2007-03-20 08:55:43 +00:00
dyoung 320845dda2 Add a port to the Infineon ADM5120.
Basics: the ADM5120 is a 175 MHz MIPS32 4Kc processor featuring a
6-port ethernet 10/100 switch with Auto MDI/X, a PCI controller,
USB 1.1 controller, UART, watchdog timer, eight GPIO pins, and a
multiport memory controller with both NOR and NAND flash support.
This code supports most of the devices on the ADM5120, including
the 6-port switch (each port attaches as an ethernet, admsw0 through
admsw5), the PCI controller, USB controller, GPIO, watchdog, and
UART.

Remaining work: the port includes no NOR/NAND flash drivers.  No
bootloader is included.  I have only tested the PCI bus driver with
the use of one PCI slot on the RouterBOARD 153.  It is not possible
to exploit the capabilities of the ethernet switch using bridge(4).
I have only netbooted the ADM5120 on the RB153.  Booting other
boards, and booting from flash memory, remains to be done.

Hardware availability: many low-cost routers, including the
RouterBOARD 100 series at RouterBOARD.com, use the Infineon ADM5120
processor.

Credits: Ruslan Ermilov and Vsevolod Lobko ported to the ADM5120,
and they wrote device drivers for the UART, USB controller, and
10/100 switch.  Matt Isaacs brought the port up-to-date with
NetBSD-current, made it compile, and ran it first on the RB153.
I added drivers for the PCI controller, GPIO, and watchdog timer.
I produced the bus attachment for the CompactFlash slot with advice
from Mikrotik technical support and from Matt Thomas.
2007-03-20 08:52:00 +00:00
ad 59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
christos 786c0109c2 count outgoing packets. from Markus Mayer 2007-03-07 17:24:38 +00:00
simonb 80c8d64aa9 Fix some caddr_t rototill fallout. 2007-03-06 00:43:50 +00:00
tsutsui 59e2eba553 Use (char *) on pointer arith. 2007-03-04 12:33:32 +00:00
tsutsui 81447cbc34 Use (char *) cast on pointer arith. 2007-03-04 12:24:58 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
thorpej 09c5f9cc49 TRUE -> true, FALSE -> false 2007-02-28 04:21:51 +00:00
tsutsui f9712fccb8 uvm.page_idle_zero now is a bool, not a 32bit value any more.
BTW, is it still worth to have uvm_pageidlezero()? Which port uses it?
2007-02-23 15:11:36 +00:00
matt c8513022b4 Fix more boolean_t -> bool lossage 2007-02-22 05:28:53 +00:00
thorpej 712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
mrg 4410329b87 add a pair of new bus_dma(9) functions:
int _bus_dmatag_subregion(bus_dma_tag_t tag,
				  bus_addr_t min_addr,
				  bus_addr_t max_addr,
				  bus_dma_tag_t *newtag,
				  int flags)
	void _bus_dmatag_destroy(bus_dma_tag_t tag)

that allow a (normally broken/limited) device to restrict the bus address
range it can talk to.  this is used by bce(4) to limit DMA addresses to
1GB range, the maximum the chip can address.

all this is from Yorick Hardy <yhardy@uj.ac.za> with input from several
people on tech-kern.

XXX: bus_dma(9) needs an update still.
2007-02-21 20:41:23 +00:00
simonb ca3eaca4a4 Fix a tyop. 2007-02-21 14:52:32 +00:00
dyoung 91ab437064 Expand SMIPS so that the 'tags' make-target covers more sources.
Sort.
2007-02-21 02:28:30 +00:00
dyoung f0a3da8a33 Following other platform-dependent MIPS code, use SI_NQUEUES for
the length of the si_to_sr table.
2007-02-21 02:26:15 +00:00
simonb 374aec7877 Fix checks for 64-bit MIPS (MIPS64 _doesn't_ mean 64-bit MIPS(!)). 2007-02-19 22:04:07 +00:00
dyoung 4f62f7609b Create tags for alchemy, atheros, bonito. 2007-02-19 08:19:14 +00:00
jmcneill 692a0ae545 Only define COM_ARBUS_BAUD if not already defined elsewhere. 2007-02-17 23:25:26 +00:00
pavel 934634a18c Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.
2007-02-17 22:31:36 +00:00