Commit Graph

116 Commits

Author SHA1 Message Date
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
Stefan Assmann
bf6f68f96f Add an enhancement to deal with configurations in /ppc/bootinfo.txt like
<boot-script>boot &device;:1,\suseboot\yaboot.ibm</boot-script>.
This would evaluate to boot cd:0,1\suseboot\yaboot.ibm which results
in a file not found error (seen on many openSUSE ppc media).

With this patch the above will evaluate to boot cd:0,\suseboot\yaboot.ibm
and yaboot will load.

Signed-off-by: Stefan Assmann <sassmann@suse.de>



git-svn-id: svn://coreboot.org/openbios/openbios-devel@429 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-29 10:51:25 +00:00
Blue Swirl
bcd092ad4a Add support for configuring for multiple targets
git-svn-id: svn://coreboot.org/openbios/openbios-devel@420 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-23 20:09:26 +00:00
Laurent Vivier
f336ed1793 ide: allow to have multiple instances
git-svn-id: svn://coreboot.org/openbios/openbios-devel@411 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-15 12:55:31 +00:00
Laurent Vivier
e85a0d9bde PowerPC: Fix milliseconds prom call
The current implementation of the milliseconds prom call on PowerPC is
totally buggy:
- The timer frequency returned by get_timer_freq() does not correspond
  to the timer which is read.
- The dividend and the divisor of the division are swapped
- If called very often, this function is not precise
- Depending on the timer frequency and of the frequency of the calls,
  the variable overflow after a few dozen of seconds.

Please find in this patch a totally new implementation. This fixes the
problem observed with the quik when a timeout is defined.

The timer frequency is defined using #define, I wonder if there is a
better place to put it.

It reads both low and high part of the timer to make sure there is no
overflow. It also removes the function that returns 0 on the first call
as this is not needed according to IEEE 1275-1994. Finally it computes
the real value of the timer each time, instead of adding a small value
to a variable at each function calls, in order to get a correct
precision if this method is call very often.

(Aurelien Jarno)


git-svn-id: svn://coreboot.org/openbios/openbios-devel@407 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-14 23:25:41 +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
b599634ceb Don't try to start Quik from hard disk if booting from the CD-ROM
(Aurelien Jarno)


git-svn-id: svn://coreboot.org/openbios/openbios-devel@405 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 20:07:43 +00:00
Laurent Vivier
f9a9554ba5 use the kernel arguments when using -kernel-append (Aurelien Jarno)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@404 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 20:02:40 +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
Laurent Vivier
c93afa0cca Disable debug printk in ofmem_map()
git-svn-id: svn://coreboot.org/openbios/openbios-devel@387 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-11 00:34:08 +00:00
Laurent Vivier
5fde3e6ee3 Remove compilation warning
git-svn-id: svn://coreboot.org/openbios/openbios-devel@386 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-11 00:27:48 +00:00
Laurent Vivier
3888c71730 Add quik support (oldworld bootloader).
Load two first sectors of the partition and check quik signature ('QUIK').
If it is quik, execute it to boot.

Currently partition and parameter are hardcoded to "hd:2" and "Linux".



git-svn-id: svn://coreboot.org/openbios/openbios-devel@385 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-11 00:19:02 +00:00
Laurent Vivier
f42c360455 According to
"PowerPC Processor binding to:
IEEE 1275-1994, Standard for Boot (Initialization, Configuration) Firmware
Revision: 2.1 (Approved Version), November 6, 1996"

7.1 Calling Convention:

Client interface preserves: msr, cr, r1, r2, r13-r31, sprg0-3, fpscr, f0-f31,
sr0-sr15, other SPRs.

This patch modifies of_client_callback(), to preserve r1, r2, r4-r31.

This is needed to be able to execute the first stage of quik which
supposes r7 is unmodified.



git-svn-id: svn://coreboot.org/openbios/openbios-devel@384 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-11 00:01:40 +00:00
Laurent Vivier
0a8028cefc Correct comment about dictionnary size (512K)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@383 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-10 23:47:37 +00:00
Blue Swirl
432a08e8a1 Store opened "mmu" in "/chosen" (Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@370 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-07 15:58:33 +00:00
Blue Swirl
68d97a517d Delete tree.c, accidentally left from r362
git-svn-id: svn://coreboot.org/openbios/openbios-devel@364 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-07 15:46:49 +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
49d3954458 Mac-io cleanup (Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@356 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-05 20:30:39 +00:00
Blue Swirl
ccb9456516 Correct a typo (Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@352 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-05 20:08:04 +00:00
Blue Swirl
9b865de74b Pass initrd parameters to preloaded Linux kernel like Yaboot does
git-svn-id: svn://coreboot.org/openbios/openbios-devel@349 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-04 19:25:41 +00:00
Blue Swirl
2ed122296d Fix reset vector 0xfff00100
Move non-vector code to higher memory addresses to free vector area.
Rename entry point _start to _entry so that it will not conflict with
ldscript _start.



git-svn-id: svn://coreboot.org/openbios/openbios-devel@348 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-04 16:01:50 +00:00
Blue Swirl
ec53fcec45 Clean up video routines
git-svn-id: svn://coreboot.org/openbios/openbios-devel@343 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-02 14:53:33 +00:00
Blue Swirl
2137312f95 Clean up font handling
git-svn-id: svn://coreboot.org/openbios/openbios-devel@342 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-02 13:32:15 +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
7ae5790865 Remove unused definition from qemu/tree.fs and move cd and hd alias
definition to ide.c (Laurent Vivier)


git-svn-id: svn://coreboot.org/openbios/openbios-devel@332 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-31 16:18:34 +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
1beaaac8fa Allow yaboot to read files from cdrom (Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@325 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-25 10:38:40 +00:00
Blue Swirl
612dd8d75d Change cdrom alias (original patch by Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@324 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-25 10:36:19 +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
882edb55de Parse bootscript in ppc\bootinfo.txt
git-svn-id: svn://coreboot.org/openbios/openbios-devel@314 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-23 11:54:25 +00:00
Blue Swirl
fa30d06c1d Use boot-device and boot-args NVRAM variables, fix warnings when debugging
git-svn-id: svn://coreboot.org/openbios/openbios-devel@313 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-23 11:53:13 +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
24b4bc7fe8 Fix Linux OOPS (Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@305 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-22 06:19:19 +00:00
Blue Swirl
187a0ae950 Add missing "static"
git-svn-id: svn://coreboot.org/openbios/openbios-devel@304 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-21 14:24:30 +00:00
Blue Swirl
7456a60d4b Avoid using NVRAM area for ROM, add SRE vector
git-svn-id: svn://coreboot.org/openbios/openbios-devel@303 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-21 10:17:03 +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
Laurent Vivier
15a6ebf30b Qemu console cleanup (Laurent Vivier)
This patch removes unused macro from qemu/console.c

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


git-svn-id: svn://coreboot.org/openbios/openbios-devel@298 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-20 20:22:17 +00:00
Blue Swirl
7e21fc929d Fix almost all remaining warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@294 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-20 17:15:47 +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