Commit Graph

632 Commits

Author SHA1 Message Date
Alexander Graf
b2036c0313 PPC: Fix interrupt numbers
We changed several interrupt numbers in Qemu to better reflect real
world hardware. Also, since we're now using proper interrupt maps, we
need to make sure we specify interrupts in the way the respective map
requires it.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@680 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-22 18:52:28 +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
Alexander Graf
63e7a89932 PPC: Increase instruction cache size
A real 970FX has more icache, so we should reflect that.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@677 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-22 18:52:23 +00:00
Blue Swirl
37f12143ba Add "reg" property to kb_ps2, fix device_type
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@676 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-07 20:25:32 +00:00
Blue Swirl
a20a8cc176 Fix wrong device_type for non-PCI bridge devices, like EBUS
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@675 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-07 20:25:30 +00:00
Igor V. Kovalenko
91857d3a8c pathres: consistently encode unit address on 64bit target
This change fixes node unit address matching on arch
where cell is not 4 byte integer (tested with sparc64.)

Since we encode "reg" property chunks with encode-int
we need to use the same encoding while preparing unit
phys addr for comparison at path resolution time.

- (exact-match): calculate phys addr length using 4 byte
  member encoding with /l* not cells

- find-child: encode phys addr components similar to
  encode-int with 4 byte stores

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@674 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-03 17:54:14 +00:00
Blue Swirl
305168fb73 sparc64: implement reset
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@673 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-31 12:16:46 +00:00
Blue Swirl
dec920ff08 Sparc64: Add interrupt properties to Sabre
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@672 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-30 20:58:40 +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
dc3b5cc5f2 Sparc64: more generic method for display and keyboard selection
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@669 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-24 13:38:28 +00:00
Blue Swirl
01e48a6f39 Sparc64: fix native Unix version build
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@668 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-23 14:43:02 +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
9e7cb441f2 ESP: fix breakage by r667, status getting erased by interrupt register read
Reading the interrupt status register clears also status register, therefore
the interrupt status must be read only after reading the status.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@666 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-16 10:35:58 +00:00
Blue Swirl
d3aebe27d3 ESP: fix spurious guest interrupts during boot
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@665 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-16 08:47:39 +00:00
Blue Swirl
2478d67d9e Sparc64: fix Sabre properties
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@664 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-10 18:26:34 +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
Blue Swirl
592138f390 Sparc64: clear timer interrupt disable bit (NPT bit when reading tick)
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@662 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-05 20:49:50 +00:00
Blue Swirl
0b0411515c Make auto-boot default again
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@661 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-03 08:58:56 +00:00
Blue Swirl
fdf932f477 Fix non-Sparc64 architecture breakage by r657
Build broke with:
  GEN   openbios.dict
 undefined word.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@660 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-03 08:58:55 +00:00
Mark Cave-Ayland
83425bf953 Add Fcode as a suitable executable payload for init-program.
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@659 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-03 03:44:01 +00:00
Mark Cave-Ayland
567e51cb1d Include the /packages/elf-loader module for SPARC64 which is required by the Fcode contained within the Milax ramdisk.
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@658 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-02 12:49:30 +00:00
Mark Cave-Ayland
301d419d4c Add Stefan's hack for load-base to allow it to be referenced as a value from within Fcode bootloaders such as Milax.
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@657 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-02 12:43:59 +00:00
Mark Cave-Ayland
8c7efc5939 Add load-base NVRAM variable for SPARC64.
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@656 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-01 18:21:18 +00:00
Mark Cave-Ayland
46f2ccaf6d Change the new-device word so that subsequent words within a new device are added to the public wordlist and not
the private wordlist by default. This is required for executing Milax Fcode which defines package words which need to be externally 
visible.

As a consequence, it is now possible to remove lots of "external" words used building the device tree since this is now the 
default.


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@655 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-01 18:17:15 +00:00
Blue Swirl
4d0214e2bf Sparc64: fix Linux error about inconsistent console also for serial console
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@654 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-30 10:54:52 +00:00
Blue Swirl
f5dbe735cd Sparc64: fix Linux error about inconsistent console
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@653 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-30 09:49:40 +00:00
Blue Swirl
e979d432cc Map VGA buffer at client accessible location (Igor Kovalenko)
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@652 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-30 09:49:38 +00:00
Igor V. Kovalenko
c0b4bb8002 sparc64: claim memory mapped by startup code
- claim both physical and virtual address ranges
  while walking boot memory mappings

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@651 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-29 17:36:05 +00:00
Blue Swirl
8fde0b100a Postpone mapping of the memory
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@650 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-29 17:36:03 +00:00
Blue Swirl
9b72f2cd0a Fix a typo
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@649 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-28 10:24:32 +00:00
Blue Swirl
2b5a61fc6c Map VGA buffer only during PCI probe
Also pass physical addresses instead of bus addresses to VGA init.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@648 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-28 10:15:33 +00:00
Alexander Graf
5e50d351e8 I accidently set props[0] twice instead of going through both elements.
Signed-off-by: Alexander Graf <agraf@suse.de>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@647 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-21 09:57:53 +00:00
Alexander Graf
181acb9043 When running qemu in -M mac99 mode, interrupts failed on me all the
time.

I finally managed to track things down and it seems like we're missing 
some properties in several devices.

While at it, I also bumped the ESCC IRQs to 0x24 / 0x25, as that's what 
qemu now maps them on.

This patch (plus the qemu set) gets PPC64 Linux booting with 
console=ttyPZ0.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@646 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-18 23:38:08 +00:00
Alexander Graf
6b497163c8 I usually compile openbios on PowerPC for PowerPC. Apparently I'm the
only onedoing that, as that (really easy) case got broken by the cross 
compilation overhaul.

Let's allow host = target gcc configurations again.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@645 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-18 20:41:51 +00:00
Laurent Vivier
bef737dcb3 Autodetect cross-compiler name.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@644 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-10 00:23:02 +00:00
Michael S. Tsirkin
1f94ed5998 VGA adapters need to claim memory and i/o
transactions even if they do not have any
i/o or memory bars. E.g. PCI spec, page 297,
gives an example of such a device:

    Programming interface 0000 0000b
    VGA-compatible controller. Memory
    addresses 0A 0000h through 0B
    FFFFh. I/O addresses 3B0h to 3BBh
    and 3C0h to 3DFh and all aliases of
    these addresses.

While bios could check for these devices and special-case them, it is
easier to fix this by enabling i/o and memory space unconditionally:
devices that do not support it will just ignore this setting.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@643 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-10 00:17:17 +00:00
Mark Cave-Ayland
3ef33eb736 Correct Forth data stack when the alarm word is used (the implementation is currently missing, but we'll worry about that a bit
later). This allows us to proceed further with SPARC64 boot.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@642 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-09 18:44:01 +00:00
Mark Cave-Ayland
7253d7b0af Revert r638, apply previous patch to extend control flow stack items to 2 data stack items, and fix the Fcode evaluator to use
this new information to correctly resolve destination (b<mark) references. See the email archives for further discussion on why 
this is required.

Hopefully this should finally resolve the Fcode backward branch problem; at least all previous incorrect resolutions now appear 
correct and the Fcode evaluator no longer crashes or gets stuck in a loop while attempting to boot Milax.



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@641 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-09 01:09:48 +00:00
igor.v.kovalenko
384b8c7614 Revert r639, fix mem_claim (Igor Kovalenko) and mem_release
Signed-off-by: igor.v.kovalenko@gmail.com
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@640 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-05 10:13:17 +00:00
Blue Swirl
3068b8763d Sparc64: fix mmu_map
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@639 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-04 22:01:12 +00:00
Mark Cave-Ayland
dbc5a9c3ba Fix backwards Fcode branches (bbranch and b?branch).
According to the specification, the destination for a backwards Fcode branch must be resolved from the bottom rather than the 
top of the cstack. The existing version of the code was simply doing a swap, and so nesting any branches within a backward branch 
would fail since the wrong destination would be resolved from the stack.

This patch adds a new cstack-startdepth variable to keep track of the cstack base location within an execution context 
(setup-tmp-comp and execute-tmp-comp) and alters the backward branches to make use of it.

With this patch in place, Milax under Qemu doesn't crash anymore but sits in an infinite loop reading sectors from the CDROM.


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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@638 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-03 15:47:39 +00:00
Mark Cave-Ayland
ba52470cce In the IEEE 1275-1994 specification the parameters for Client Interface calls
are not in forth stack order but in reversed (heh!) order. Our implementation
confused this.

This second patch is fairly straightforward; probably the only unexpected part is
the need to rename the existing /openprom/client-services "claim" and
"release" words to "cif-claim" and "cif-release" respectively. This is
because we need to use the "claim" and "release" words in
forth/system/ciface.fs to reverse the argument order before calling the real
underlying words.

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@637 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-02 10:44:35 +00:00
Laurent Vivier
5e57ac49a0 dir command cleanup
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@635 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-26 01:47:36 +00:00
Laurent Vivier
fc0e681a57 Correct command line history management when we move forward (ctrl-n or
arrow down).

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@634 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-23 21:43:09 +00:00
Laurent Vivier
6345741116 Implements dir method for HFS filesystem.
0 > dir cd:\ 
    393216 2009-02-15 17:11:17 .disk\
    131072 2009-02-15 17:10:53 css\
       984 2009-02-07 19:35:37 dedication.txt
     65536 2009-02-15 17:11:18 dists\
   1966080 2009-02-15 17:11:18 doc\
     65536 2009-02-15 17:10:54 etc\
    458752 2009-02-15 17:11:18 install\
     45447 2009-02-15 17:11:17 md5sum.txt
    917504 2009-02-15 17:10:53 pics\
     65536 2009-02-15 17:11:18 pool\
    131072 2009-02-15 17:11:18 ppc\
      8921 2009-02-15 17:11:17 README.html
    119979 2009-02-14 20:52:19 README.mirrors.html
     60194 2009-02-14 20:52:19 README.mirrors.txt
       379 2009-02-15 17:10:54 README.source
      5468 2009-02-15 17:11:17 README.txt

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@633 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-22 10:21:43 +00:00
Laurent Vivier
62e794e351 Implements dir method for ext2 filesystem.
0 > dir hd:3,\ 
      4096 2009-08-05 22:20:53 .\
      4096 2009-08-05 22:20:53 ..\
     16384 2009-02-20 10:56:01 lost+found\
      4096 2009-02-20 10:56:59 boot\
      4096 2009-11-10 21:44:03 etc\
      4096 2009-02-20 10:57:14 media\
        11 2009-02-20 10:57:14 cdrom
      4096 2007-03-07 23:22:28 selinux\
      4096 2009-02-20 11:12:18 var\
      4096 2009-02-20 11:12:19 usr\
      4096 2008-05-21 08:44:38 sys\
     12288 2009-08-05 22:30:50 lib\
      4096 2009-08-05 22:31:05 sbin\
      4096 2009-02-20 13:00:26 bin\
     40960 2009-02-20 14:32:18 dev\
      4096 2009-02-20 14:30:57 home\
      4096 2006-10-28 13:49:35 mnt\
      4096 2006-10-28 13:49:35 proc\
      4096 2009-05-18 12:40:32 root\
      4096 2009-11-10 21:44:15 tmp\
      4096 2009-02-20 12:30:21 lib64\
      4096 2009-02-20 11:12:17 srv\
      4096 2009-02-20 11:12:18 opt\
      4096 2009-02-20 11:12:18 initrd\
   5349268 2009-02-20 11:51:46 initrd.img-2.6.18-6-powerpc
   4405754 2008-12-13 09:58:03 vmlinux-2.6.18-6-powerpc

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@632 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-22 10:07:23 +00:00
Laurent Vivier
7c3091927c Implements dir method for ISO9660 filesystem.
0 > dir cd:\ 
      2048 2007-02-01 13:50:07 .\
      2048 2007-02-01 13:50:07 ..\
      2048 2007-02-01 13:54:13 ppc\
 ok
0 > dir cd:\ppc 
      2048 2007-02-01 13:54:13 .\
      2048 2007-02-01 13:50:07 ..\
       190 2007-02-01 13:54:13 bootinfo.txt
      2048 2007-02-01 13:51:11 chrp\

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@631 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-22 10:03:00 +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
8d752aaf26 Change link edition order to move libc after libfs, allowing libfs to
use functions from libc.

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@629 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-22 09:53:54 +00:00