Commit Graph

426 Commits

Author SHA1 Message Date
Blue Swirl
0726678a35 Use PCI IDE controller
git-svn-id: svn://coreboot.org/openbios/openbios-devel@415 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-17 18:42:48 +00:00
Blue Swirl
52f8efadc0 Set up console input and output variables correctly
git-svn-id: svn://coreboot.org/openbios/openbios-devel@414 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-17 15:37:30 +00:00
Blue Swirl
95183db81e Fix Sparc32 nographic mode
git-svn-id: svn://coreboot.org/openbios/openbios-devel@412 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-17 09:55:09 +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
Blue Swirl
f7b372866c Fix Sparc64 native unix build
git-svn-id: svn://coreboot.org/openbios/openbios-devel@402 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 19:31:14 +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
Blue Swirl
8eff2e7fc7 Shave off a few padding bytes
git-svn-id: svn://coreboot.org/openbios/openbios-devel@390 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-11 11:49:00 +00:00
Blue Swirl
e66ae17fc7 Shave off a few padding bytes
git-svn-id: svn://coreboot.org/openbios/openbios-devel@389 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-11 08:16:52 +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
cbfd537bee Fix x86 build
git-svn-id: svn://coreboot.org/openbios/openbios-devel@382 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-10 21:00:46 +00:00
Blue Swirl
0d733f14f2 Fix warning
git-svn-id: svn://coreboot.org/openbios/openbios-devel@380 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-10 20:31:21 +00:00
Blue Swirl
91a9c7865a Add EBUS bridge, refactor PC serial and keyboard, generalize floppy
git-svn-id: svn://coreboot.org/openbios/openbios-devel@377 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-10 11:37:34 +00:00
Blue Swirl
0c3877f095 Enable Sparc64 PCI probing, use probed display but not IDE
git-svn-id: svn://coreboot.org/openbios/openbios-devel@376 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-09 21:00:38 +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
4a9d1a7613 Support cd/cdrom and hd/disk aliases on all architectures
git-svn-id: svn://coreboot.org/openbios/openbios-devel@361 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-06 20:27:01 +00:00
Blue Swirl
eb3f96ade3 Fix amd64 warnings, enable more warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@360 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-06 19:06:58 +00:00
Blue Swirl
1b47a7ee96 Fix x86 warnings, enable more warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@359 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-06 18:46:22 +00:00
Blue Swirl
18d3fd2172 Fix x86 build
git-svn-id: svn://coreboot.org/openbios/openbios-devel@357 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-06 17:18:46 +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
a767eeb2d4 Allocate Forth memory and dictionary using malloc like PPC (cf. r345)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@347 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-04 14:47:11 +00:00
Blue Swirl
b700809e7f Clean up Sparc64 memory management
Concentrate memory and MMU management (lib.c malloc, OF /memory) to lib.c.


git-svn-id: svn://coreboot.org/openbios/openbios-devel@346 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-04 12:53:26 +00:00
Blue Swirl
992839d220 Allocate Forth memory and dictionary using malloc like PPC
git-svn-id: svn://coreboot.org/openbios/openbios-devel@345 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-03 13:46:15 +00:00
Blue Swirl
91148c0702 Clean up Sparc32 memory management
Concentrate memory and MMU management (lib.c malloc, romvec opb_, iommu,
OF /memory) to lib.c.



git-svn-id: svn://coreboot.org/openbios/openbios-devel@344 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-03 13:45:02 +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
e3ff961f02 Fix Unix host build on PPC
git-svn-id: svn://coreboot.org/openbios/openbios-devel@339 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-01 07:34:30 +00:00
Blue Swirl
aad2f953c6 Suppress useless printing of kernel address and size
git-svn-id: svn://coreboot.org/openbios/openbios-devel@338 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-31 20:07:10 +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