Commit Graph

93 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Laurent Vivier
b0b0192262 load: manage file size smaller than 512 bytes
Allow to load bootinfo scripts of haiku and FreeBSD.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@593 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-02 22:35:59 +00:00
Laurent Vivier
1e01b24657 client interface: add verbosity in traces
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@592 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-02 22:17:40 +00:00
Laurent Vivier
7d35d36bd4 mac-parts: better management of comma.
from "PowerPC Microprocessor CHRP binding", "11.1.2. Open Method Algorithm":

"If the argument string contains a comma, or if the argument string begins with a decimal digit, the 
partition component is deemed to be present."

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@588 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-21 23:00:42 +00:00
Laurent Vivier
428b4b807f Manage state-valid.
"go" can be done only if init-program has set state-valid to true.

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@587 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-21 22:44:21 +00:00
Blue Swirl
89f31fbead Fix accidental system header use in r584
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@586 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-21 15:30:50 +00:00
Laurent Vivier
719271835f Add bootinfo-loader.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@584 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-20 20:15:46 +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
Laurent Vivier
dbc694c83f call elf_loader_init() only for PPC
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@580 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-18 23:32:59 +00:00
Laurent Vivier
7999deeeb6 Add missing file from r578
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@579 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-18 23:01:28 +00:00
Laurent Vivier
1a93a83480 Allows to boot openSUSE from install CD-ROM
Implements "init-program" using loader packages
Write a first loader package: elf-loader

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@578 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-18 22:59:30 +00:00
Laurent Vivier
39e3ce79f3 Allow "boot hd:,%BOOT" to work again (and thus Quik).
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@577 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-02 22:25:44 +00:00
Laurent Vivier
95a04cec0e Implement load method
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@575 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-30 23:39:55 +00:00
Laurent Vivier
0ab0524962 Remove useless openSUSE hack.
This hack was needed because we were using the IBM bootscript (ppc/bootinfo.txt)
with an HFS+ filesystem (whereas bootscript was using ISO9660 partition number)

The newworld_boot() function uses now the Apple bootscript (suseboot/os-chooser)
with the correct partition number.
 
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@574 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-30 23:37:42 +00:00
Laurent Vivier
1ced7923e7 For mac-parts, when no partition number is provided, open the first HFS
partition (type is "Apple_HFS").

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@570 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-29 15:24:49 +00:00
Blue Swirl
b6c69cc18e Fix gcc 4.4 warnings about strict aliasing
Rather than cast char arrays to other types, use correct types and cast
them to char pointers when needed.

Author: Pavel Roskin <proski@gnu.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@568 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-23 12:40:22 +00:00
Blue Swirl
ab4082359b Allow NULL dlabel path argument without accessing page zero.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@565 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-22 06:03:40 +00:00
Blue Swirl
19e066a8a5 Allow NULL string argument without accessing page zero.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@564 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-22 06:03:20 +00:00
Laurent Vivier
6a16562087 This patch allows to boot from bootsector of first bootable partition
using "boot hd:%BOOT"

As explained in:

"PowerPC Microprocessor Common Hardware Reference Platform (CHRP)
System binding to:
IEEE Std 1275-1994 Standard for Boot (Initialization, Configuration)
Firmware
Revision: 1.8"

"Chapter 11.1.2. Open Method Algorith"

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@552 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-12 19:55:31 +00:00
Laurent Vivier
4639e7efb0 This patch modifies disk-label.c to not allow to read beyond
the selected partition limits.

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@546 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-10 20:18:27 +00:00
Laurent Vivier
b1070a239f Add DPRINTF() to disk-label.c
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@543 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-08 22:42:52 +00:00
Laurent Vivier
2df8b7381b If the partition type is the mac partition type, this patch allows to
not select the partition to boot from but to boot from the first 
bootable partition.

"PowerPC Microprocessor Common Hardware Reference Platform (CHRP)
System binding to:
IEEE Std 1275-1994 Standard for Boot (Initialization, Configuration) 
Firmware
Revision: 1.8"

"Chapter 11.1.2. Open Method Algorith"

"[...] If the partition component is present, it selects the desired 
partition, where partition 0 refers to the entire disk, partition 1 
refers to the first partition, partition 2 to the second, and so forth. 
If the partition component is absent and the disk has an FDISK or Mac 
partition, the first "bootable" partition is used. [...]"



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@542 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-08 22:00:10 +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
98bf05ae40 Fix compile when CONFIG_DEBUG_SUN_PARTS is defined
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@529 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 12:28:24 +00:00
Blue Swirl
0f5e36481c extract ofmem module implementation (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@526 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 11:06:13 +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
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
ffc2bb1fda sparc64 video.pal fix memory corruption (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@503 f158a5a8-5612-0410-a976-696ce0be7e32
2009-06-13 07:36:56 +00:00
Blue Swirl
a6c558cbf2 Improve client interface debugging
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@501 f158a5a8-5612-0410-a976-696ce0be7e32
2009-06-06 09:58:11 +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
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
Laurent Vivier
14e9b11e1f Set disk-label information when no partition map is used
git-svn-id: svn://coreboot.org/openbios/openbios-devel@448 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-05 21:37:26 +00:00
Laurent Vivier
21f5eb3c1a disk-label: retrieve block-size on open
git-svn-id: svn://coreboot.org/openbios/openbios-devel@447 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-05 21:33:23 +00:00
Laurent Vivier
838e276b6a set blocksize when partition number is 0
git-svn-id: svn://coreboot.org/openbios/openbios-devel@445 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-05 20:19:50 +00:00
Laurent Vivier
15c56bea6f Allows to use disk (like CD-ROM) without partition map but with filesystem
on the full disk. We accept partition number 0 (which identifies the full
disk) and partition number 1 (we can see the disk as only one partition).

This is needed to boot openSUSE install CD which uses
"&device;:1,\suseboot\yaboot.ibm" as its boot path.

There is a Mac partition map on the CD, but
partition 1 is the partition map itself, and thus is not usable by a filesystem.
So we can guess, openFirmware must use ISO9660 instead of HFS and thus
to not use the Mac partition map, but the whole CD for the partition #1.

Disk openSUSE-ppc.iso: 135 MB, 135593984 bytes
4 heads, 32 sectors/track, 2069 cylinders
Units = cylinders of 128 * 512 = 65536 bytes

                                  Device Boot      Start         End      Blocks   Id  System 
openSUSE-ppc.iso1               1           1          48   Apple_partition_map
openSUSE-ppc.iso2               1        2066      132160   Apple_HFS



git-svn-id: svn://coreboot.org/openbios/openbios-devel@443 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-05 00:16:54 +00:00
Laurent Vivier
6e727d8f4b mac-parts: block-size returns value found in partition map
git-svn-id: svn://coreboot.org/openbios/openbios-devel@440 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-03 20:33:37 +00:00
Stefan Assmann
1a4b1e4f3d Fix fs->vol_name handling
This patch checks wether fs->vol_name exists and handles the
case where it doesn't exist. That fixes the lockup that occurs
when trying to run qemu-system-ppc -cdrom <iso> -boot d

Signed-off-by: Stefan Assmann <sassmann@suse.de>


git-svn-id: svn://coreboot.org/openbios/openbios-devel@430 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-29 19:56:41 +00:00
Blue Swirl
78ca85bba5 Fix console escape code problems with NetBSD 4.0 and Debian 3.1r1
git-svn-id: svn://coreboot.org/openbios/openbios-devel@427 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-25 20:37:01 +00:00