Commit Graph

749 Commits

Author SHA1 Message Date
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
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
Laurent Vivier
02d95dc3cd Revert commit r624 (breaks ppc and sparc64 boot)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@625 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-22 09:04:27 +00:00
Stefan Reinauer
5bd8b39a36 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 might / will need some more work, but get this in so more people can test
easily.

From Mark Cave-Ayland and me.



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@624 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 19:09:04 +00:00
Stefan Reinauer
99f0be82ab Another nice patch from Mark Cave-Ayland:
This patch corrects a couple of (minor) bugs in the Forth source 
debugger; firstly the number of wordlists is held in #order, rather than 
#vocs which is the total number of wordlists which can be held 
simultaneously.

Secondly, the initial interruptforth setting in kernel/bootstrap.c is 
actually wrong, but since this is reset by enterforth() it is not needed 
anyway. Hence this line can simply be removed.



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@623 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 19:04:41 +00:00
Stefan Reinauer
937bd232c7 findsemis_wordlist is only used by findsemis() so let's remove it from the
"API"

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@622 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 19:03:46 +00:00
Stefan Reinauer
c10134fb2d - drop commented out functions, they're in others.fs already
- fix another stack diagram typo


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@621 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 18:54:38 +00:00
Stefan Reinauer
51fb2e19c3 improve x@ and x! functions, at least x@ reads back what x! wrote, now.
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@620 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 16:37:41 +00:00
Stefan Reinauer
6708a79d0f actually print value of a (lit)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@619 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 15:58:55 +00:00
Stefan Reinauer
b1cb73b506 fix ms
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@618 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 15:42:28 +00:00
Stefan Reinauer
7c14e1eac7 - hook up new 64bit words into fcode table.
- dummy implementations for peek, poke, ms and get-msecs


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@617 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 15:40:53 +00:00
Stefan Reinauer
d5714f89ac Add 64bit extensions from 12756d5
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@616 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 15:38:29 +00:00
Stefan Reinauer
3ec68ea878 workaround: fix long broken "make run" at least for the case that there's only
one target 

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@615 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 15:30:52 +00:00
Stefan Reinauer
7176a93f04 fix typo
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@614 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 11:14:10 +00:00
Stefan Reinauer
7dbe5e6507 This patch replaces the string definitions in nvram.fs by the
simpler version s" that does not contain a complex parser for
" "(0a) type of strings.

Also use handle-text in " instead of the hand crafted version. This fixes 
strings in "see".

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@613 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-17 16:54:24 +00:00
Blue Swirl
8bd4ea05c8 Document the debugger
Add a description of the debug syntax and run-time use, with an
example of a debugging session.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@612 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-15 21:19:59 +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
d61aaf0df5 Disable traces commited in previous commit by error
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@610 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-12 01:15:02 +00:00
Laurent Vivier
515a3c6eb3 Implement Client Interface method "test-method" defined in
"PowerPC Microprocessor CHRP binding", Chapter 10.5.2.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@609 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-12 01:11:04 +00:00
Laurent Vivier
17c415b87f Client interface clean-up
Allow to not display client interface calls to read/write/seek to
have clearer traces.

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@608 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-12 00:57:32 +00:00
Laurent Vivier
8fd9a7d4af Add "64-bit" property for PowerPC 970fx.
(allows Fedora bootloader to load the good kernel, 32-bit or 64-bit)

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@607 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-10 22:13:54 +00:00
Laurent Vivier
b45c197d16 Define methods get-time and set-time of /pci/mac-io/via-cuda/rtc.
We can now have date&time from our openbios command line interface...

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@606 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-10 21:57:00 +00:00
Laurent Vivier
739db05755 Remove broken and useless cuda unit decode/encode methods.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@605 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-10 21:52:40 +00:00
Laurent Vivier
dbe983062e Define methods to decode/encode mac-io units.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@604 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-10 21:50:36 +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
92e6599c92 Correctly encode strings of bootpath and bootargs properties.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@602 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-10 21:34:21 +00:00
Laurent Vivier
a1cc7db948 Move "bind_func("poweroff", ppc32_poweroff)" from ob_cuda_initialize()
to cuda_init() because it is a global word and if it is binded into 
the node initialization it breaks some other words ("decode-unit", 
"encode-unit").

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@601 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-09 19:39:26 +00:00
Laurent Vivier
5398f1f5e3 Correct typo
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@600 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-08 23:43:19 +00:00
Laurent Vivier
657daacde8 ppc/qemu: correctly manage property "available" of package "/memory"
Instead of hardcoding values during init, call ofmem_register() with "/memory" phandle.

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@599 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-07 21:53:45 +00:00
Laurent Vivier
1eb7d7b54a Client Interface: manage arguments number overflow
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@598 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-06 21:59:24 +00:00
Laurent Vivier
0dd8e42f39 ADB: Manage arrow keys and more.
Manage more keyboard keys by emiting escape sequences.
This allows to manage key up, key down, key left, key right, home, end ...
(F1 to F16, HELP, ... are not tested)

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@597 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-06 21:23:32 +00:00
Laurent Vivier
ec767f4ec3 Allow to move on command line and in history using the arrow keys.
(with -nographic)

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@596 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-05 21:39:58 +00:00