Commit Graph

125 Commits

Author SHA1 Message Date
Mark Cave-Ayland
c112720b01 Move the kernel header files into include/kernel to synchronise with the code directory structure.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@689 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 14:21:02 +00:00
Mark Cave-Ayland
259edb2d3b Finish move of architecture-specific header files, with modifications to the header paths as required.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@688 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 13:54:45 +00:00
Mark Cave-Ayland
04a412a7f5 Begin tidying up of header locations as described on the mailing list. Firstly we move all of the architecture-specific header
files from include/$ARCH to include/arch/$ARCH.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@687 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 13:47:44 +00:00
Mark Cave-Ayland
dbf16392cc Refactoring of the OpenBIOS source code, as discussed on the mailing list. The primary aim of this process is to try and arrange
the source files into a structure whereby it is easier to find the relationship between a forth package word and its C 
implementation, while also creating a libopenbios library into which more common code from the arch/ tree can eventually be 
moved.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> 


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@685 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-13 10:58:19 +00:00
Alexander Graf
88679e07e4 PPC: Add U3 based Mac machine
Linux on PPC64 knows only so many chipsets. One of the is the U3. So
we can use that when we're emulating a PPC64 machine, making Linux happy.

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@681 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-22 18:52:30 +00:00
Alexander Graf
81605d775a PPC: Create interrupt map for PCI
There is a draft spec that defines how interrupts are supposed to be mapped
from one bus to another, down to the PIC and CPU interrupt line.

So far we don't implement that spec. But PPC64 Linux requires us to for PCI
devices. So let's create a map here.

Draft: http://playground.sun.com/1275/practice/imap/imap0_9d.pdf

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@679 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-22 18:52:26 +00:00
Alexander Graf
50d1f0e78e PPC: Get timebase and clock speed from fw_cfg
When running on Qemu (TCG) time goes by at a constant frequency which
accidently happens to match with Linux's fallback value.

As soon as we go to KVM, the time base suddenly starts going as fast as
the host CPU's time base. So we need to make sure Linux knows about
it, so it can do its timekeeping properly.

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@678 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-22 18:52:25 +00:00
Blue Swirl
bdf1f6ce72 QEMU changed PCI/IO port byte swapping, adapt OpenBIOS to new way
This requires an updated QEMU.

Also use little endian access ASIs.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@671 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-29 18:46:38 +00:00
Blue Swirl
b135ff9ead Sparc64: use correct PCI probe mechanism
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@667 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-22 18:50:54 +00:00
Blue Swirl
a40a92653f Sparc64: use firmware configuration device for command line storage
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@663 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-09 21:28:28 +00:00
Laurent Vivier
576f234a27 Implement command "dir <path>".
This is the generic command, it needs support from the filesystem 
packages.

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@630 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-22 09:58:01 +00:00
Laurent Vivier
144d172001 Add a function forth_printf() which prints to openbios stdout.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@628 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-22 09:50:54 +00:00
Laurent Vivier
26c129730b Add cleaner ext2 filesystem implementation
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@627 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-22 09:47:08 +00:00
Laurent Vivier
d2cc5db789 Add a cleaner implementation of ISO9660.
Enable it for powerpc and cross-powerpc

Signed-off-by: Laurent Vivier <Laurent@vivier.Eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@626 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-22 09:26:50 +00:00
Blue Swirl
d6aac5ffe2 Reworked version of Forth Source debugger (Mark Cave-Ayland)
This patch implements the following Forth words:

   debug <xt> - Mark word for debugging
   debug-off  - Unmark all words for debugging
   resume     - Return from subordinate Forth interpreter

The source debugger also implements the following commands when it has
been activated:

   Up - Unmark current word for debugging, mark parent and continue
   Down - Mark next word for debugging
   Trace - Continue execution until end of word displaying
           debug information
   Rstack - Display contents of the Rstack
   Forth - Launch subordinate Forth interpreter

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@611 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-15 21:03:51 +00:00
Laurent Vivier
d6365bca24 Fully decode PCI unit name attribute.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@603 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-10 21:39:42 +00:00
Laurent Vivier
9164a49dc8 Implements XCOFF loader (to be able to boot Apple BootX bootloader)
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@581 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-19 21:44:05 +00:00
Blue Swirl
f85f67517b Sparc64: partially revert r515: long long is safer than int64_t
Host headers may define int64_t as different type than long long, especially
on a 64 bit host. This matters with printf formatting.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@555 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-17 16:58:39 +00:00
Blue Swirl
c803a121b7 Sparc64: configure screen size from QEMU command line options
Configure the screen size from QEMU command line options using FW_CFG
interface, like r538 for PPC.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@539 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-08 10:52:59 +00:00
Laurent Vivier
a3970b12b7 Allows to configure screen size from Qemu command line options using FW_CFG
interface.
Only enabled for PPC/QEMU and VGA/VBE.



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@538 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-04 21:08:37 +00:00
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
defe01ae5c extract ofmem module implementation (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@525 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 11:05:16 +00:00
Blue Swirl
d53a95d1f9 add more cell type formatting macros for ppc and sparc64 (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@520 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 11:01:23 +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
ec3b928919 const qualifier for nvram_init parameter (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@518 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 10:58:33 +00:00
Blue Swirl
ebdd7dcc22 Sparc64 cell based types (Igor Kovalenko)
Use int64_t for cell and uint64_t for ucell.
Define printf-style format macros to ease writing cell-type-independend
log traces.


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@515 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-31 11:13:16 +00:00
Blue Swirl
1c324c15e4 Introduce CONFIG_DEBUG_OFMEM option (Igor Kovalenko)
Add CONFIG_DEBUG_OFMEM option to configurations which implement OF memory
manager.

Implement DEBUG_OFMEM macro to be used by debug traces in OF memory manager
code.


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@514 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-31 11:12:18 +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
Igor Kovalenko
02130e8240 Fix regprop int encoding (Igor Kovalenko)
Wrong encoding of "#address-cells" property can lead to a failure
fetching correct value in my-#acells method. According to docs
properties must be encoded with "encode-int". I spent some time
looking at the docs and it is clear that encode-int produces
quad-sized result (of size /l bytes).

This patch fixes pci helpers to encode to 32bit instead of 64bit values,
and correctes my-address and my-unit methods to read 32bit data
to match encode-int rules
modules/bindings.c: also fixed set_int_property and get_int_property
to match encode-int rules

Signed-off-by: Igor Kovalenko <igor.v.kovalenko@gmail.com>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@493 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-22 17:14:10 +00:00
Blue Swirl
8c883ca477 Fix stack protector problems with newer GCC versions
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@490 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-20 18:07:09 +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
Aurelien Jarno
b73bf5229a Add new entries to firmware configuration device
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@478 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-08 09:39:53 +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
Blue Swirl
2da21531b5 Version 1.0
git-svn-id: svn://coreboot.org/openbios/openbios-devel@463 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-01 20:07:47 +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
7fbbf2d6eb Add #defines for PCI classes and subclasses
git-svn-id: svn://coreboot.org/openbios/openbios-devel@439 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-02 17:40:29 +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
d474d768b1 Add mac-io IDE driver
git-svn-id: svn://coreboot.org/openbios/openbios-devel@431 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-30 07:44:48 +00:00
Blue Swirl
18f34eca50 Fix native Sparc32 compile
git-svn-id: svn://coreboot.org/openbios/openbios-devel@428 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-26 17:09:21 +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
037d00c9b5 Add Propolice support
git-svn-id: svn://coreboot.org/openbios/openbios-devel@422 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-24 08:23:33 +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
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
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
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
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
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