Commit Graph

547 Commits

Author SHA1 Message Date
garbled
2849d0b8df Add padding to align the rodata section. This fixes a strange bug
where the bootloader would freak out if various printfs were enabled or
disabled.

Add code to autodetect a 64bit cpu, and attempt to load a different set
of kernels if they exist.

Bump version to 1.9
2008-01-24 19:52:53 +00:00
garbled
0beb82c81b Add another optional argument to mkbootinfo.sh, the location of the bitmap. 2008-01-24 01:12:57 +00:00
garbled
7c8654b9e9 Add an install kernel for 64bit bridge mode cpus. This will hopefully go
away in the next few months.
2008-01-23 23:11:22 +00:00
garbled
ad9b9c40d6 Add a new mkbootinfo.sh script that builds a bootinfo.txt file. Remove a
printf in ofwboot.
2008-01-23 23:09:42 +00:00
joerg
3615cf7715 Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
2008-01-20 18:09:03 +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
garbled
0d31ffa76d Remove alloc.h too, no longer needed. 2008-01-09 19:39:07 +00:00
garbled
dc535894e1 Changes to the ofppc ofwboot to make it boot on an IBM CHRP RS/6000.
Tested on a pegasos II and a 7044-270.  Also, switch away from the hacked
up alloc.c we were using, and use the stock libsa one.
2008-01-09 19:34:44 +00:00
mrg
58b3d9db6c extend the grossness that is pegasospci_indirect_attach_hook() a little
further and enable the vr(4) located at pci 0 dev 13 fn 0.

now my vr(4) works from disk boot.
2008-01-09 07:35:29 +00:00
mrg
9c1261344f support FS_RAID partitions, and increase the offset by
RF_PROTECTED_SECTORS (64) if so.
2008-01-03 06:40:02 +00:00
mrg
a386f0e8b3 build an INSTALL kernel. it's just GENERIC with md(4) root space. 2008-01-02 11:32:15 +00:00
mrg
3259c65b6e add COMPAT_40, raid and RAID_AUTOCONFIG options. 2008-01-02 02:32:25 +00:00
ad
2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
garbled
0abe9cf449 Add one more convenience function to rtas, rtas_has_func, and add a
global int machine_has_rtas that can be used to decide if a machine has
rtas functionality or not.  Take a crack at power off support for the
pegasos, which doesn't work right, probably due to a firmware bug.
2007-12-28 05:12:41 +00:00
garbled
f217f96524 Take advantage of the new rtas_call function and get rid of the uneeded
rtas_reboot() function.  Still reboots even.
2007-12-28 04:47:37 +00:00
garbled
47b06f10ce change some printf's to aprint_normal. 2007-12-27 17:49:36 +00:00
garbled
28d432f9cc Add an infinate loop after the reboot call so we don't somehow drop past
it if it fails.
2007-12-27 17:25:02 +00:00
garbled
cbd61cd9a6 Enable l2 cache on the pegasos 2007-12-27 05:41:51 +00:00
perry
970ad9314d Remove __attribute__((__noreturn__)) from things already marked __dead
Found by the department of redundancy department.
2007-12-24 15:46:45 +00:00
phx
66e67a4f6b Make USB, IEEE1394 and viaaudio attach to the Pegasos2.
USB works fine. IEEE1394 is untested. Audio doesn't work (playing white noise).
Need to set IO/MEM-enable for IEEE1394 and audio, as the firmware (Smart
Firmware 1.2) doesn't do it.
Patch approved by Tim Rightnour.
2007-12-24 13:54:58 +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
phx
5dda38d449 wsmux was missing.
Switched to a smaller default font.
2007-12-15 16:09:08 +00:00
garbled
76a99a952a Fix the endless stream of 7's problem on i8259-like interrupt controllers
once and for all.  The i8259 does not like to be read in a loop, when an
interrupt comes in, it will return a valid value, however, if you keep
reading it until there are no outstanding interrupts, it will return 7
(which is the lpt interrupt).  Change the pic handler to give an argument
to the get_irq functions of mode, which indicates if this is the first
time we are asking, or if we are just rechecking in a loop.  Non-i8259
handlers can safely ignore this argument.

Tested to fix the stream of 7's problem on prep and ofppc.  Got rid of
the nasty hack in ofppc with this too, and the prep machine seems to take
less interrupts now, which is a good thing.
2007-12-11 18:04:18 +00:00
garbled
05fd0d9547 Switch ofppc to the unified powerpc majors file. This should make single
user mode work.
2007-12-10 18:19:45 +00:00
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