Commit Graph

34 Commits

Author SHA1 Message Date
Alexander Graf
d257db6033 Make OpenBIOS interrupt handlers 64bit aware v2
While booting a 64bit kernel, there is a small timeframe where OF and the kernel communicate with each other. Within that timeframe, DSI/ISI interrupts may occur, because some memory is not mapped yet.

Right now in case that happens, we jump into the DSI/ISI interrupt handler which clobbers the high 32 bits of the kernel's registers. In order to circumvent that, let's save/restore all 64 bits of all kernel registers when we get a DSI/ISI interrupt.

This patch enables a PPC64 Linux kernel to boot up to the point where it tries to set up the SLB entries (slbmte), which is not yet implemented in qemu.

v2 implements handling for the HIOR register, bringing interrupt handlers to RAM.

Signed-off-by: Alexander Graf <alex@csgraf.de>


git-svn-id: svn://coreboot.org/openbios/openbios-devel@462 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-28 18:38:55 +00:00
Alexander Graf
189c9077a1 This patch enables OpenBIOS to initialize on PPC64, enabling support for -cpu 970fx.
It gets up to the boot prompt and works rather good so far, though I haven't been able to run a kernel yet.

For more recent PowerPC CPUs the PTE layout has changed, so we need to take that into account and create PTEs according to the new layout and at the new physical positions.

Signed-off-by: Alexander Graf <alex@csgraf.de>
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/openbios-devel@461 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-27 22:13:34 +00:00
Blue Swirl
3e926b99ce Postpone serial console use until PCI probe, fixes reset
git-svn-id: svn://coreboot.org/openbios/openbios-devel@459 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-21 17:13:41 +00:00
Blue Swirl
9020fb5fa1 Support for Qemu -nographic flag
git-svn-id: svn://coreboot.org/openbios/openbios-devel@452 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-14 09:44:55 +00:00
Blue Swirl
c6040cb8a0 Add basic Mac99 machine support
git-svn-id: svn://coreboot.org/openbios/openbios-devel@449 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-08 12:22:04 +00:00
Blue Swirl
c39ebf65f7 Add #defines for PCI vendor and device IDs for all devices, taken from Linux
and pciids.sourceforge.net.

Also fix a confusion between Sabre and Simba device IDs.


git-svn-id: svn://coreboot.org/openbios/openbios-devel@437 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-01 11:25:16 +00:00
Blue Swirl
36bab875b8 Refactor QEMU firmware confguration device handling (based on patch by
Aurelien Jarno)


git-svn-id: svn://coreboot.org/openbios/openbios-devel@432 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-31 08:49:16 +00:00
Laurent Vivier
f89783c5e4 CONFIG_SERIAL_PORT to 0 select ch-a (0x20 offset), other value select ch-b (0x00 offset). Idea from Blue Swirl
git-svn-id: svn://coreboot.org/openbios/openbios-devel@406 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 20:24:52 +00:00
Laurent Vivier
c254d42e4c ESCC: correctly use CONFIG_SERIAL_PORT
git-svn-id: svn://coreboot.org/openbios/openbios-devel@400 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 16:42:29 +00:00
Blue Swirl
3eda0189f0 Use ESCC for PowerMac serial
git-svn-id: svn://coreboot.org/openbios/openbios-devel@392 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-12 17:47:56 +00:00
Laurent Vivier
358bee9e5d Create properties for an oldworld machine if needed.
If arch is ppc and machine arch id is heathrow, we create:

- properties in root node for a powermac beige
  (Linux says "Powermac G3 (Silk)")

- "AAPL,interrupts" and "AAPL,address" properties in PCI device tree.



git-svn-id: svn://coreboot.org/openbios/openbios-devel@388 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-11 01:03:16 +00:00
Blue Swirl
8a4aadc9b8 Create PCI properties "interrupts", "interrupt-map" and "interrupt-map-mask" (Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@363 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-07 15:45:26 +00:00
Blue Swirl
2742ea5723 Really create a tree for PCI devices (Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@362 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-07 15:43:10 +00:00
Blue Swirl
b2692171f9 Correct duplicate /cpus and more (Laurent Vivier)
Correct duplicate /cpus
Correct mmu properties in /chosen
Add mmu methods to /cpus/<cpu>


git-svn-id: svn://coreboot.org/openbios/openbios-devel@341 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-02 07:41:40 +00:00
Blue Swirl
5548667b76 Define the translations property for cpu (Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@333 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-31 16:19:15 +00:00
Blue Swirl
c7621f3a8b Add CPU reg node from PIR if available
git-svn-id: svn://coreboot.org/openbios/openbios-devel@328 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-28 14:04:49 +00:00
Blue Swirl
000686c328 Add more CPU definitions
git-svn-id: svn://coreboot.org/openbios/openbios-devel@326 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-25 20:23:02 +00:00
Blue Swirl
f7e2ff3e4c Get ram size from the configuration device
git-svn-id: svn://coreboot.org/openbios/openbios-devel@322 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-23 20:36:45 +00:00
Blue Swirl
978e8b3003 Probe CPU type
git-svn-id: svn://coreboot.org/openbios/openbios-devel@320 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-23 15:54:58 +00:00
Blue Swirl
32591c48f0 Check configuration device version
git-svn-id: svn://coreboot.org/openbios/openbios-devel@319 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-23 13:38:11 +00:00
Blue Swirl
18cd147df3 Get machine ID, boot device, preloaded kernel parameters and UUID from Qemu
configuration device and NVRAM.


git-svn-id: svn://coreboot.org/openbios/openbios-devel@315 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-23 11:57:36 +00:00
Blue Swirl
58d21fb1c2 Change part_length to a define
git-svn-id: svn://coreboot.org/openbios/openbios-devel@312 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-23 10:15:14 +00:00
Blue Swirl
e7b906fd86 Fix gcc and Sparse warnings generated by r301
git-svn-id: svn://coreboot.org/openbios/openbios-devel@302 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-21 09:15:57 +00:00
Laurent Vivier
e11b806d1c qemu better support
This patches copies all needed ppc files to qemu and modifies them.

The generated OpenBIOS image must be loaded at adresse 0xfff00000 by  Qemu.

It is able to load Yaboot from disk and Yaboot is able to load Linux, but Linux hangs somewhere... of course it needs more work (but this cleans up my patch queue).

Thank you to Blue Swirl and Aurelien Jarno for their help.

Signed-off-by: Laurent Vivier <Laurent@lvivier.info>


git-svn-id: svn://coreboot.org/openbios/openbios-devel@301 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-21 08:30:42 +00:00
Blue Swirl
edafcf6e86 IDE fixes for PPC (Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@292 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-20 14:48:40 +00:00
Blue Swirl
c5d270009e Warning fixes for Sparc32, Sparc64, PPC
Fix warnings that would be caused by gcc flag -Wwrite-strings and
-Wmissing-prototypes. Also fix most PPC specific warnings.


git-svn-id: svn://coreboot.org/openbios/openbios-devel@288 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-14 12:54:23 +00:00
Blue Swirl
bf0c6b1c38 Fix most warnings from Sparse
git-svn-id: svn://coreboot.org/openbios/openbios-devel@274 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-30 11:54:01 +00:00
Blue Swirl
f446864114 Use pci_arch_t also on Sparc64 (but disable PCI probing for now, hangs)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@270 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-29 13:18:32 +00:00
Stefan Reinauer
99568ec767 ADB/CUDA fixes
git-svn-id: svn://coreboot.org/openbios/openbios-devel@259 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-24 12:41:36 +00:00
Stefan Reinauer
34f110b694 Add Bochs VBE VGA support
git-svn-id: svn://coreboot.org/openbios/openbios-devel@258 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-24 12:38:23 +00:00
Laurent Vivier
ec800147a3 Copy serial support from arch/amd64/console.c
Signed-off-by: Laurent Vivier <Laurent@lvivier.info> 
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/openbios-devel@256 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-24 12:23:01 +00:00
Laurent Vivier
bee6afbc60 Access to nvram must left shifted by 4.
Initialize device tree (used by PCI patch, to follow).

Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
Acked-by: Stefan Reinauer <stepan@coresystems.de>




git-svn-id: svn://coreboot.org/openbios/openbios-devel@255 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-24 12:21:36 +00:00
Laurent Vivier
c619e7c4a1 Define the ISA io base according machine type.
Signed-off-by: Laurent Vivier <Laurent@lvivier.info> 
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/openbios-devel@254 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-24 12:19:05 +00:00
Laurent Vivier
fe82df644b Create arch/ppc/qemu by copying arch/ppc/pearpc.
Signed-off-by: Laurent Vivier <Laurent@lvivier.info> 
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/openbios-devel@253 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-24 12:16:22 +00:00