Commit Graph

17 Commits

Author SHA1 Message Date
martin 9c63b7e8cc Move to 2 clause TNF license 2008-05-04 00:18:16 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
matt 666d4c1ddb split device_t/softc. Use device_xname and device_private. 2008-04-04 16:04:19 +00:00
phx 1ed426bc21 On the Pegasos2, we must never run PCI-configure for the MV64361 host bridge,
otherwise the devices on that bus might no longer work correctly (e.g.
interrupt flood).
Approved by garbled.
2008-02-23 21:11:22 +00:00
garbled 55804a6f72 Use model_init to clean up how we decide the ranges for
PCI_NETBSD_CONFIGURE.  Add some code to hopefully better handle the
firepower and powerstackII, based on the OFW dumps from those machines.
Untested on those machines, but doesn't break anything on pegasos/7044.
2008-02-11 17:32:18 +00:00
garbled 7636840ee2 Apparently BRIDGE mode allows BAT registers, so re-enable that code.
Change the pegasos PCI_NETBSD_CONFIGURE arguments around to wire up mem
space into the correct area, and move the io regs a little to make it
work properly. Just avoid the secondary PCI entirely.
Change the list of things that we fiddle with in pci_conf_hook.  Map mem
on the fwohci, avoid display cards, avoid IO on the auvia.
Change some printf's to aprint_*
Yank a call to genppc_pci_indirect_make_tag and change it to the
bus-independant pci call instead. (in pci_conf_hook)
2008-01-28 18:24:21 +00:00
garbled 80a83a2b7e Add support to ofppc for the IBM 7044-270 machine. This is a POWER3-II
based machine.  Currently the kernel to run on this machine is
incompatible with the standard GENERIC kernel, so for now, we have a
separate GENERIC_B64. Eventually, I hope to combine the two.

Please note, this is a port of 32bit ofppc, not a powerpc64 port.

Thanks to Matt Thomas and Kevin Bowling for helping to make this port
possible.

Summary of changes:

Change ofwpci to use the ofmethod config for configuring the PCI bus,
rather than indirect configuration.
Move the wiring of the interrupt controllers from at the start of the
boot, into the configuration of the first PCI bus.
Rewrite the map_isa_ioregs() hack to work on a machine without BATs
Fix a ton of bugs in the genofw_find_pics routine, and in the map_space code.
Split the pic_openpic into openpic_common and pic_openpic.
Create a new pic_distopenpic driver, for the distributed openpic found on
some newer IBM machines.
Fix a bad panic in pmap_extract on 64bit bridge mode
2008-01-17 23:42:57 +00:00
mrg 626bd12a5c enable PCI_NETBSD_CONFIGURE for ofppc.
the call to pci_configure_bus(9) and it's supporting code is
copied verbatim from the prep port.

this allows us to completely remove the really gross pegasos
specific pegasospci_indirect_attach_hook() that set various
pci command regs, since all those devices (mostly work now,
see below) and additionally PCI plugin cards work now too.

it also makes the pegasos onboard vr(4) ethernet work with
disk boot (it previously only worked with netboot.)

in the generic macppc ofw pci conf hook and for pegasos,
don't configure the viaide(4) device, and don't configure
memory space on the fwohci(4) device.


with this, and my other recent ofppc/ppc changes the pegasos
port is mostly functional.  the marvell gige is not working,
and my 512mb appears as only about 256mb, but otherwise
this port is almost done!
2008-01-11 05:18:58 +00:00
macallan 7eb34fdf1c get rid of macppc's private pci_bus_dma_tag 2007-12-25 17:55:10 +00:00
macallan 7500033ffa check for __HAVE_PRIVATE_PCI_BUS_DMA_TAG instead of macppc when (not)
declaring pci_bus_dma_tag
while there move #include <machine/isa_machdep.h> to the ISA block so archs
without ISA won't see it. Now macppc builds again.
2007-12-24 01:31:08 +00:00
phx d2a9b2ff83 VT8231 IDE workaround for native mode with "compatibility" interrupts 14/15.
This time done right by calling pciide_machdep_compat_intr_establish() to
get a MD interrupt handler.
Verified that it compiles for XEN again.
2007-12-20 22:24:40 +00:00
perry 9b2b412c19 __FUNCTION__ -> __func__ 2007-12-15 00:39:14 +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 fbd1da06d8 Apply a patch from Frank Wille that fixes a stupid in the ofw interrupt map
discovery where the pin value was off by one.
2007-11-04 17:11:05 +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 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 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