Commit Graph

892 Commits

Author SHA1 Message Date
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
0f885c07be Revert commit of local change (sparc-elf / sparc-linux-gnu )
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@585 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-20 20:18:15 +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
1f31d2f057 When "load" is used, correctly set bootpath and bootargs.
Signed-off-by: Laurent Vivier <Laurent@Vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@583 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-20 19:32:30 +00:00
Laurent Vivier
ebf7e3f6da According to IEEE Std 1275-1994, "CORE REQUIREMENTS AND PRACTICES",
Annexe H.8, "User interface name changes", "select-dev" and
"unselect-dev" have been obsoleted and replaced by "open-dev" and 
"device-end".
But some scripts (like BootX) are using the obsoleted name, so we need 
to
define them.

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@582 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-20 04:20:48 +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
38283e32ac Use the load method to load and execute CHRP script.
This adds a better support of Apple BootX script.
However, "init-program" and "go" are always missing to be able to really boot with BootX.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@576 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-01 23:44:24 +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
a58190e204 Define load-base to follow memory mapping defined in the BootX source
comments.

This as been reported by Steven Noonan.



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@573 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-29 21:09:21 +00:00
Laurent Vivier
3e457210bd Implement "$=" to compare two strings (needed by BootX)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@572 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-29 20:42:22 +00:00
Laurent Vivier
2db781a446 Replace yaboot_startup() by newworld_boot() which implements generic
CHRP boot method.
It finds the CHRP bootscript using the file attribute 'tbxi' and 
the blessed directory.

This method allows to boot easily Fedora (the bitness detection is done
by the script and yaboot is called with the according yaboot.conf) but
openSUSE is broken (you have to use "boot cd:,\suseboot\yaboot")
Debian works well (as usual...).
The openSUSE needs the missing forth words: "load" and "go".
The MacOS bootloader (BootX) is also loaded automatically but forth 
script is too complex to be executed correctly.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@571 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-29 15:43:00 +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
a3e861a2cf Use -fno-strict-aliasing flag for all filesystems imported from GRUB.
Otherwise, they won't compile with gcc 4.4.  Fixing the code would
require massive changes, which is not practical for the code taken from
another project.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@569 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-23 12:40:24 +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
ee130e0452 Show version.fs and openbios-version.h generation
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@567 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-23 12:40:20 +00:00
igor.v.kovalenko
f13fecfb60 v1 Preliminary support for softint handler with trap to bug on other irqs
v0->v1: removed extra instructions

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@566 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-22 06:04:00 +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
igor.v.kovalenko
6433c74bf7 Enable timer after trap table is initialized
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@563 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-21 19:15:55 +00:00
igor.v.kovalenko
b26b3c4391 Save locked tlb space by aligning to 512k pages.
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@562 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-21 19:15:46 +00:00
Blue Swirl
e56cc95fb0 Some gcc versions need __negti2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@561 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-20 19:10:04 +00:00
Blue Swirl
bc770eddac Fix OpenBSD boot
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@560 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-19 19:44:40 +00:00
Laurent Vivier
1be70e1bca We can select cpu using unit number instead of name,
for instance we can use "dev /cpus/@0" instead of "dev 
/cpus/PowerPC,750". This notation is used in Fedora bootscript
to know if the CPU is 64-bit or 32-bit: it looks at "64-bit" property
of first available CPUS ("@0").

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@559 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-17 21:57:04 +00:00
Blue Swirl
aea3404ef2 Add STGit files to .gitignore
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@558 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-17 16:58:48 +00:00
Blue Swirl
468ce9442b Sparc32/64: omit less useful FS modules etc. to reduce size
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@557 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-17 16:58:45 +00:00
Blue Swirl
9162f1b584 Introduce quiet build
Make forthstrap quiet by default. Use generic rules when possible, unify
the rules and cleanup white space. Use ld flag --whole-archive to avoid
some local rule use. We can also remove some hacks introduced to avoid
missing symbols.

Fix problems brought in by ld flag --whole-archive:
 * x86: fix missing nvram symbols
 * PPC: disable misc.S build for qemu (conflicts with our libgcc)

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@556 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-17 16:58:42 +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
2da0b806ed Sparc64: omit less useful FS modules to reduce size
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@554 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-17 16:58:35 +00:00
igor.v.kovalenko
11bb993385 Do not call close-deblocker since ob_pci_open did not open it.
Fix an issue with ob_pci_close; it calls close-deblocker method without
deblocker being open. This leads to multiple references to wrong cells,
including ones in zero page.

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@553 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-13 19:11:02 +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
3fbece06c9 Re-enable HFS (with HFS+)
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@551 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-12 17:29:51 +00:00
Laurent Vivier
f4d5a4625d For powerpc, use HFSPlus instead of HFS.
Later, this will allow to boot like a real NewWorld OpenFirmware:

boot hd:,\\:tbxi

Where "\\" is the default (blessed) system folder (defined by the 
filesystem, generally "/System/Library/CoreServices" on MacOS X), and
 ":tbxi" the  first file with the "tbxi" file attribute ("BootX" on 
MacOS X)

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@550 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-11 20:47:13 +00:00
Laurent Vivier
95c05fe1ff Author: Pavel Roskin <proski@gnu.org>
Rewrite hfs_get_ushort() and hfs_get_uint() as inline functions so that
their arguments are checked.  Use __be16_to_cpu and __be32_to_cpu to
byte-swap the result as needed.



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@549 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-11 20:31:50 +00:00
Laurent Vivier
6271aeb3ee Author: Pavel Roskin <proski@gnu.org>
Check that the script is run from the top-level directory.  Check that
the config file is available for every specified architecture.



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@548 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-11 20:27:17 +00:00
Laurent Vivier
d64b1c2c98 Author: Pavel Roskin <proski@gnu.org>
CONFIG_OFMEM and CONFIG_OFMEM_MALLOC_ALIGN are defined in
cross-ppc_config.xml, but not in ppc_config.xml, so copy them.
Likewise, copy those setting from cross-sparc64_config.xml to
sparc64_config.xml.


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@547 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-11 20:23:43 +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
Steven Noonan
4636eeeedf There are numerous places where using 'ELF_DPRINTF' does not make
sense, because the loader does not use ELF binaries or is not
directly involved in loading them.

Created a generic SUBSYS_PRINTF macro, as well as loader-specific
ELF_DPRINTF, CHRP_DPRINTF, and YABOOT_DPRINTF macros.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@545 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-10 19:57:43 +00:00
Steven Noonan
a734a346f2 try_chrp_script() now accepts a third parameter which indicates the
script to be loaded and parsed. It will also terminate parsing on
the '</chrp-boot>' tag, which makes locating embedded data after
the script easier.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>

(laurent: remove XCOFF placeholder)



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@544 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-10 19:50:04 +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
Laurent Vivier
bf92aa1fbf quik_startup() uses now encode_bootpath() instead of calling
find_dev()/set_property().



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@541 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-08 21:56:26 +00:00
Blue Swirl
9ae360c5da Fix leakage of AS_FLAGS between targets
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@540 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-08 14:40:36 +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