Commit Graph

418 Commits

Author SHA1 Message Date
Blue Swirl
d4b64752eb Improve version number handling
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@533 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 18:20:53 +00:00
Blue Swirl
44ede105c1 switch sparc64 to ofmem module implementation (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@528 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 11:08:01 +00:00
Blue Swirl
f8c0ae8f7b switch ppc to ofmem module implementation (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@527 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 11:07:13 +00:00
Blue Swirl
a4c4f46834 unify ppc ofmem implementations (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@524 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 11:05:00 +00:00
Blue Swirl
75cbf028bb update briq/mol/pearpc client interface to use ucell type (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@523 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 11:04:27 +00:00
Blue Swirl
b2336d54c0 migrate ppc briq/mol/pearpc ofmem implementation to ucell type (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@522 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 11:03:26 +00:00
Blue Swirl
5fd89d6537 migrate ppc/qemu ofmem implementation to ucell parameter type (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@521 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 11:02:32 +00:00
Blue Swirl
0f141c94d3 move ppc internal prototypes to arch-specific implementation (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@519 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 10:59:49 +00:00
Blue Swirl
ffd20b950d Switch sparc64 to ofmem (Igor Kovalenko)
Initialize ofmem at startup.
Switch malloc/realloc/free to use ofmem.
Implement runtime migration of startup mappings to ofmem.
Implement mmu miss handlers to install tlb entries based on ofmem
translations list.


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@517 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-31 11:16:24 +00:00
Blue Swirl
e5b34330ee Sparc64 ofmem implementation (Igor Kovalenko)
Add sparc64 ofmem implementation.


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@516 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-31 11:15:30 +00:00
Blue Swirl
6b052af925 Use ucell type to pass ofmem arguments (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@513 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-31 11:10:38 +00:00
Blue Swirl
12fda803f3 Fix build errors with debugging enabled
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@512 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-20 06:52:23 +00:00
Blue Swirl
480883cebd Add a file missing from r508
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@510 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-12 10:13:39 +00:00
igor.v.kovalenko
5f5b8d6f8c sparc64: fix registers dealing with client (Igor Kovalenko)
Signed-off-by: igor.v.kovalenko@gmail.com


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@508 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-11 12:25:26 +00:00
Blue Swirl
b5b8d3c039 sparc64: clear unused registers when calling client image (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@500 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-30 07:43:58 +00:00
Blue Swirl
047609e0fa Add claim and release client methods
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@496 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-23 16:03:20 +00:00
Laurent Vivier
45caaecfa6 Author: Pavel Roskin <proski@gnu.org>
This is needed on Fedora 11 (GNU ld 2.19.51.0.2).  Otherwise, qemu
reports on statup:

invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1
invalid/unsupported opcode: 00 - 04 - 17 (000095c8) 000095ec 0

I checked Linux sources (arch/powerpc/kernel/vmlinux.lds.S) and I see
that .sbss is put to the .bss section in front of .bss itself.

The problem is discussed at
https://bugzilla.redhat.com/show_bug.cgi?id=494075



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@488 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-17 17:14:01 +00:00
Blue Swirl
a0c398f24b Delete some unused macros detected with -Wp,-Wunused-macros use
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@482 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-28 14:28:16 +00:00
Blue Swirl
b098842b5b Use firmware configuration instead of NVRAM (initial patch by Aurelien Jarno)
Use firmware configuration device for boot device, kernel, initrd and
kernel command line parameters on PPC, Sparc32 and Sparc64.


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@479 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-08 09:45:25 +00:00
Alexander Graf
4702c219f3 Author: Alexander Graf <alex@csgraf.de>
Expose PCI controller information

Linux tries to detect which PCI controller it's supposed to work with.
On PPC32 there is fallback code that doesn't get compiled with
CONFIG_PPC64, so we really have to expose a controller or we don't have
pci config space accessor functions.

Let's expose a un3-agp if we have a mac99 model, as that's what is
supposed to be in there anyways.

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@466 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-08 01:06:56 +00:00
Alexander Graf
4578c8ae20 Author: Alexander Graf <alex@csgraf.de>
Expose NVRAM compatibility

Linux requires the NVRAM to expose a 'nvram,flash' compatibility
in the device tree. Let's expose it so it's happy.

v2 adds a NEWWORLD macro to protect nvram,flash getting exposed in
oldworld macs.

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@465 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-08 01:03:17 +00:00
Alexander Graf
5973871ed2 Author: Alexander Graf <alex@csgraf.de>
PPC64: Switch to 32-bit mode in interrupts

All the code in OpenBIOS runs in 32 bits, which is fine. Now, when
an interrupt arrives, the 970 CPU automatically sets the MSR_SF bit,
making us run in 64 bit mode.

That breaks address calculation, because 'lis' and 'ba' get sign
extended.

In order to circumvent that mess, let's just go back to 32 bit mode
whenever we get an interrupt.

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@464 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-08 00:54:06 +00:00
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
0c9a399601 Clear TLBs on reset
git-svn-id: svn://coreboot.org/openbios/openbios-devel@457 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-21 11:11:56 +00:00
Laurent Vivier
21507bfb5b Extract "bootargs" from "boot" command line.
It is needed to boot Fedora-10 as we must specify the path to the yaboot.conf.

To boot Fedora:

boot cd: conf=cd:,\ppc\ppc32\yaboot.conf

so "bootpath" is "cd:", and "bootargs" is "conf=cd:,\ppc\ppc32\yaboot.conf"



git-svn-id: svn://coreboot.org/openbios/openbios-devel@456 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-18 13:58:35 +00:00
Laurent Vivier
d95cb61e29 remove unused function timer_calib_start
git-svn-id: svn://coreboot.org/openbios/openbios-devel@455 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-17 22:45:41 +00:00
Laurent Vivier
f0daea0151 In "<boot-script>", from bootinfo.txt, decode all bootinfo entities: device,
partition, directory, filename, full-path.

(as defined in "PowerPC Microprocessor CHRP binding r1.8", chapter 3.1.6.1.)



git-svn-id: svn://coreboot.org/openbios/openbios-devel@453 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-15 20:20:55 +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
a837cf70f8 Increase Forth memory for FCode tables
git-svn-id: svn://coreboot.org/openbios/openbios-devel@451 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-12 19:39:47 +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
Laurent Vivier
b47d10c5e2 Extract correctly "&device;" and "&partition;" from bootinfo.txt.
To keep compatibility with yaboot (tested with debian install CD), 
put in bootpath a fully qualified path (<device>:<partition>,<filename>)



git-svn-id: svn://coreboot.org/openbios/openbios-devel@442 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-05 00:05:58 +00:00
Blue Swirl
d74b4e50cb Fix x86 PCI initialization
git-svn-id: svn://coreboot.org/openbios/openbios-devel@438 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-02 17:06:37 +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
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
eea3589cb9 Use RAM for SMP init instead of NVRAM
git-svn-id: svn://coreboot.org/openbios/openbios-devel@426 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-25 12:20:12 +00:00
Blue Swirl
3fae06cd81 Add support for floppy boot on Sparc32
git-svn-id: svn://coreboot.org/openbios/openbios-devel@425 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-25 09:56:08 +00:00
Blue Swirl
91cba136b9 Add UPA decode and encode methods
git-svn-id: svn://coreboot.org/openbios/openbios-devel@424 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-25 07:31:15 +00:00
Blue Swirl
65057d6167 Fix Sabre device ID
git-svn-id: svn://coreboot.org/openbios/openbios-devel@423 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-25 07:30:45 +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
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