Commit Graph

522 Commits

Author SHA1 Message Date
ad
4b293a84e1 Interrupt handling changes, in discussion since February:
- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
2007-12-03 15:33:00 +00:00
garbled
b0f4d9f970 Apply a set of patches from Frank Wille to make the genfb attachment work
better on ofppc.  In doing so, we also move a few functions around in
macppc and the generic ofw powerpc stuff to allow better sharing of code.
Also, introduce a model_init function.

move ofb_cons.c from macppc/dev to powerpc/oea and rename it to rascons.
This gets rid of some naming confusion, and makes it OFW-MI rather than
macppc specific.
2007-11-26 19:58:29 +00:00
jmmv
ffc43e2cd8 Fix a typo in a comment, and while here also drop trailing whitespace. 2007-11-24 15:49:32 +00:00
garbled
276f1a3cde Commit a fix for the _SR regions that are needed by ofppc. Because this
platform tends to just declare anything from 0x8 to 0xf as mem or io
regions willy-nilly, we need to avoid batmapping a few of those in order
to save space for USER_SR, KERNEL_SR and KERNEL2_SR.  I picked values for
these three that are least-commonly used or used for non-vital things.
2007-11-14 18:34:12 +00:00
garbled
53a6c19ca5 Add code to detect and initialize the com port correctly, so that we have an
actual real console when booting.
2007-11-13 19:17:30 +00:00
garbled
1fb588bc51 Convert ofppc to the shared ofw_autoconf.c 2007-11-07 19:31:09 +00:00
garbled
8c63679baf Add a bunch of devices to GENERIC. Fix interrupts on the PegasosII with
a nasty little hack.  Getting closer to a working system.
2007-11-06 19:22:59 +00:00
garbled
de8e7fde3e Lots of small changes for ofppc:
Remove the ofb driver.  I'm not interested in trying to make this work.
It should be replaced with the genfb driver, which I have added,
commented out because that driver needs work before it will function on
ofppc.  (it's too panic-happy, and ofppc needs a working autoconf.c)

Change the way we do isa_inb/outb.  The new way is a slightly nastier
hack, but won't run afoul of the other isa drivers as much.

Fix ofw_consinit.c to remove the dependency on ofb.
2007-11-05 15:49:02 +00:00
garbled
1a42c9ee88 Reorder the includes in bus.h to be correct, and add the missing defines for
PHYS_TO_BUS_MEM and BUS_MEM_TO_PHYS.  Noticed by Frank Wille.
2007-11-04 17:15:43 +00:00
garbled
bc44c54090 Apply patch from Frank Wille to make the pegasos2 pci scan work
properly.  Modified slightly by me to add the pegasosreg.h file.

With this change, the pegasos correctly scans both primary and secondary
PCI busses.
2007-11-04 17:07:10 +00:00
garbled
51861415b8 Get rid of the ofppc use of the ofbus completely, for the last time.
Write a complete OF boot console into ofw_consinit.c and rewire a bunch
of the ifdef logic in that file to use it when appropriate on both macppc
and ofppc.  Get rid of the attempt to wire up the serial console early,
as that is extremely difficult on ofppc.  Yank all the console code out
of ofppc/machdep.c.  (This is a boot console only, not a full blown
console like ofcons.c)

Delete all the ofbus references out of the config files, and pull in
dev/ofw/openfirmio.c and dev/ofw/ofw_subr.c directly rather than pulling
in files.ofw.  It might be worth going back and adding a files.ofw-nobus
to that directory to allow pulling in the openfirmware driver without
pulling in the whole ofbus mess.

Change rtas driver to connect directly to mainbus, like the PCI bus nodes do.
2007-11-04 16:28:27 +00:00
xtraeme
4ba09b41c3 Remove System V semaphores and share memory options to set the limits:
SEMMNI, SEMMNS, SEMUME and SHMMAXPGS.

They can be tweaked via sysctl now. Ports that were setting values on
them weren't touched, I only removed the ones that were commented out.
2007-11-04 14:34:19 +00:00
garbled
9e99088c7c Add code to properly detect the interrupt mapping on the PegasosII, and any
other OFW machine that fails our first two methods.
2007-10-26 00:34:53 +00:00
garbled
3f9a46c5fb Add some basic options from i386 GENERIC. 2007-10-25 17:33:25 +00:00
garbled
5c24ff82a3 Add a bunch of fixes and minor rewrites to ofppc to bring it closer to
working properly.  This is still a work in progress, and all work so far
has been based on the PegasosII machne.

1) Rewrite how the ISA memory and IO space maps are found.  More work
will still need to be done in this area.
2) Add a new OFW method of pci configuration.  So far I can only get this
to work on the primary PCI bus on the Pegasos.  Unsure if this is a
pegasos bug or a code bug.
3) Add the rtas device to ofppc, and add an "rtas_reboot" function to
rtas to allow me to reboot the PegasosII.  The rtas driver works, and is
a great start but needs to be changed slightly to allow easier access to
the functions from outside the driver.
4) Fix a number of bugs that existed in the shared PCI code for ofw that
probably weren't tickled by macppc.

There is much much more left to do here, this is all still a work in
progress, but this commit will allow other people to play around with the
code if they want to.
2007-10-25 16:55:49 +00:00
garbled
5c6f84b03f Fix some minor issues in ofppc to make it complete ofwoea_initppc() and
sync up with 1.6 of ofwboot.
2007-10-18 21:12:54 +00:00
garbled
30dc55f8a8 Bump version 2007-10-18 19:59:32 +00:00
garbled
9898e70302 Update the bootloader to work with the ofwoea_initppc code used by macppc 2007-10-18 19:58:54 +00:00
garbled
d974db0ada Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
2007-10-17 19:52:51 +00:00
ad
9f56dfa520 Merge brelse() changes from the vmlocking branch. 2007-10-08 18:02:53 +00:00
pavel
ce71996a9e Put the declaration of cpu_softc and #include of sys/device.h inside
#ifdef _KERNEL to reduce the namespace pollution from proplib which
causes build failure in libexec/ld.elf_so.
2007-09-01 06:41:28 +00:00
ad
63811f5275 Generic soft interrupts are mandatory. 2007-07-14 21:48:17 +00:00
tsutsui
12b13f1335 Fix more pesudo. 2007-07-10 12:15:00 +00:00
martin
c2534a819b Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
2007-06-04 08:55:18 +00:00
tsutsui
a2ee5e6ef2 - include "dev/pci/files.pci" rather than pulling only dev/pci/pcibusprint.c
- also include "dev/wsfb/files.wsfb" which is required by files.pci
2007-05-21 13:39:31 +00:00
tsutsui
0527b0db7b Call pci attachment only if pci(4) is configured. 2007-05-21 13:37:28 +00:00
tsutsui
b69e9377c9 - convert to register prefixes
- zero out BSS before we start calling into C code instead of memset()
  (pulled from macppc/stand/ofwboot/Locore.c rev 1.16)
2007-05-21 13:20:03 +00:00
tsutsui
29070a7e6e Add src/common/include to -I include path so that ofwboot build
without installed headers in DESTDIR.
2007-05-21 13:14:51 +00:00
jmmv
4eca7e7c2d Implement support for softintrs.
Reviewed, corrected and tested by aymeric@.
2007-03-10 14:15:48 +00:00
he
582dc91458 More fixes after the caddr_t removal.
Mostly cast to char* for pointer arithmetic,
but also one missing indirection, and one "void *v, x;" fix.
2007-03-06 13:54:44 +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
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
ad
3363855a4a Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
2007-02-16 02:53:43 +00:00
ad
b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
aymeric
211211993c Basic support for RTAS (CHRP's Run-Time Abstraction Services).
Tested on the Efika; now it knows what time it is.
rtas can attach to mainbus. Not added to any kernel config file yet.
2007-01-14 22:18:02 +00:00
yamt
8bf7662829 merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie).
	  http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
	- complete workqueue(9) and fix its ipl problem, which is reported
	  to cause audio skipping.
	- fix netbt (at least compilation problems) for some ports.
	- fix PR/33218.
2006-12-21 15:55:21 +00:00
scw
e07faf8a74 Replace the myriad copies of bounds_check_with_label() with a single MI
version.

Add disk_blocksize(9) so that disk drivers can record the physical
block size of a disk if it is different to DEV_BSIZE. Right now this
simply initialises dk_blkshift and dk_byteshift according to the
supplied block size. This information is used in the MI version of
bounds_check_with_label().
2006-11-25 11:59:55 +00:00
wiz
6919c6578c s/independant/independent/, from Zafer. 2006-11-24 22:04:21 +00:00
wiz
d6a98601a8 s/heirarchy/hierarchy/, from Zafer. 2006-11-24 21:20:05 +00:00
jmmv
7a13fe4abf Remove tmpfs's experimental status. OK'ed by core@. 2006-11-11 18:47:08 +00:00
manu
f309b668fd - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
2006-09-27 21:42:04 +00:00
gdamore
cf407be292 Convert shark and ofppc to new common ofrtc and MI todr code. Tested
on shark.  Ok christos@, martin@.
2006-09-13 07:14:35 +00:00
christos
e0df1e4c51 PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
2006-08-26 20:26:43 +00:00
tsutsui
6ff205ce76 Remove obsolete #options VERIFIED_EXEC, found by grep(1). 2006-08-26 07:59:21 +00:00
christos
b300b74469 Disable SYSTRACE by default on all kernels (discussed with core) 2006-08-12 15:29:52 +00:00
he
34485a4327 Make devsw non-static to match libsa/stand.h. 2006-06-28 22:22:50 +00:00
liamjfoy
aeee5deab9 Add CARP to GENERIC kernel configs. CARP is not enabled by default.
ok: christos
2006-06-28 15:19:27 +00:00
pavel
dc1372c547 Add stf to all kernel configs which have INET6 and gif, except the INSTALL
ones and those for specific machines of developers. PR 32304.

OK'ed by rpaulo.

N.B. stf is a cloning device, so it still must be enabled by
"ifconfig stf0 create".
2006-03-28 20:58:39 +00:00
thorpej
b8fb264ef0 Use device_is_a(), rather than the locally-defined DEVICE_IS() (which
uses a much more complicated mechanism to do the check).
2006-02-23 05:49:42 +00:00
thorpej
458b3e43f7 Use device_parent(). 2006-02-23 05:37:46 +00:00