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
0bcf12f53b
Fix warning about shadowing
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@403 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 19:54:29 +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
Blue Swirl
3bcc49243a
Fix native compilation (Aurelien Jarno)
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@401 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 17:40:00 +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
Laurent Vivier
7a10250555
ppc, cross-ppc: add -Werror to CFLAGS
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@399 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 12:19:11 +00:00
Laurent Vivier
53c56562ce
escc: add "AAPL," and "reg" properties (allow to use it with linux)
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@398 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 08:05:51 +00:00
Laurent Vivier
7dac2248ea
Add aliases for ch-a and ch-b: ttya, ttyb for oldworld, and scca and sccb for all
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@397 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 07:49:44 +00:00
Blue Swirl
3ed0c8e1e4
Synch cross and native configs
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@396 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-12 20:46:27 +00:00
Blue Swirl
e43da79c51
Fix wrong property
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@395 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-12 19:49:10 +00:00
Laurent Vivier
f52a3bcc8e
Add ide0, ide1 ... ideN aliases needed by ybin (yaboot)
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@394 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-12 19:22:10 +00:00
Blue Swirl
b417eb1838
Fix amd64 warning
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@393 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-12 18:20:14 +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
4f2d4ae6f2
Extract ESCC serial driver
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@391 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-12 17:46:19 +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
ef3a27bcdf
Fix warning about unused variables
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@381 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-10 20:40:11 +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
397977b9a6
Disable romfont: unused
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@379 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-10 11:49:43 +00:00
Blue Swirl
cbbf8e81a9
Remove accidental debug printk
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@378 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-10 11:41:04 +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
bc7a813d71
Add Sparc64 PCI devices
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@375 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-09 20:58:23 +00:00
Blue Swirl
24848e97dd
Fix VBE address on Sparc64
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@374 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-09 20:55:34 +00:00
Aurelien Jarno
709c8c466a
grubfs: don't try to read a file beyond its end
...
Yaboot relies on the read function from openbios to stop reading at the
end of a file. This patch makes sure to not read beyond the end of the
file. This fixes the boot of debian-installer using a CD-ROM.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net >
git-svn-id: svn://coreboot.org/openbios/openbios-devel@373 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-09 19:43:39 +00:00
Blue Swirl
b323c13516
Add Heathrow Mac I/O (Aurelien Jarno)
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@372 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-08 15:14:33 +00:00
Blue Swirl
32a9122790
Define oldworld property for oldworld hardware (Laurent Vivier)
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@371 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-07 17:54:25 +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
e781dea8c6
Don't hang if we discover an unknown device (Laurent Vivier)
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@369 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-07 15:57:07 +00:00
Blue Swirl
96a43ab78e
Create special properties for host and bridge (Laurent Vivier)
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@368 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-07 15:55:19 +00:00
Blue Swirl
7986b6ac9d
Create "ranges" property (Laurent Vivier)
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@367 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-07 15:53:14 +00:00
Blue Swirl
525283b17f
Correctly create "reg" property for PCI devices (Laurent Vivier)
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@366 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-07 15:51:40 +00:00
Blue Swirl
02a709c6bc
Create "assigned-addresses" property (Laurent Vivier)
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@365 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-07 15:50:03 +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
251d1101ca
Fix amd64 build
...
git-svn-id: svn://coreboot.org/openbios/openbios-devel@358 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-06 18:09:22 +00:00