Also use __bexx_to_cpu() to access the fields.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@840 f158a5a8-5612-0410-a976-696ce0be7e32
open_ih() returns -1 on error and 0 is a valid return value.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@839 f158a5a8-5612-0410-a976-696ce0be7e32
Fixes a warning with GCC 4.0.2:
CC target/drivers/vga_load_regs.o
cc1: warnings being treated as errors
../drivers/vga_load_regs.c: In function 'vga_load_regs':
../drivers/vga_load_regs.c:491: warning: 'par.misc' may be used uninitialized in this function
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@835 f158a5a8-5612-0410-a976-696ce0be7e32
CC target/arch/x86/boot.o
../arch/x86/boot.c: In function 'go':
../arch/x86/boot.c:35: error: 'boot_notes' undeclared (first use in this function)
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@834 f158a5a8-5612-0410-a976-696ce0be7e32
hd:,%BOOT or cd:,\ofwboot.xcf. This latter form allows booting NetBSD PPC in a similar manner as described in the
NetBSD documentation.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@833 f158a5a8-5612-0410-a976-696ce0be7e32
Fix more breakage from r828:
For some reason, QEMU/Sparc32 does not set FW_CFG_CMDLINE_SIZE, so
we have to use FW_CFG_KERNEL_CMDLINE instead.
Setup romvec obp_arg.argv[1] and "boot-file" property.
Remove obsolete command line setup code from obio.c.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@832 f158a5a8-5612-0410-a976-696ce0be7e32
Fix NetBSD crash when printing bootpath. Also fix generation of
compatibility paths when the bootpath includes partition
letter (e.g. 'disk:d'). Consider also 'cd' alias of 'cdrom'.
See also r244.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@831 f158a5a8-5612-0410-a976-696ce0be7e32
Replace uchar, uint, ulong, u_char, u_int, u_long, u_int* with
their standard equivalents.
Fixes warnings like these on OpenBSD:
CC target/arch/unix/unix.o
In file included from ../arch/unix/unix.c:29:
../include/config.h:26: warning: redefinition of `ulong'
/usr/include/sys/types.h:56: warning: `ulong' previously declared here
../include/config.h:26: warning: redundant redeclaration of `ulong' in same scope
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@830 f158a5a8-5612-0410-a976-696ce0be7e32
Fix build failure:
LINK openbios-unix
libopenbios.a(load.o)(.text+0xe0): In function `load':
../libopenbios/load.c:58: undefined reference to `elf_boot_notes'
libopenbios.a(load.o)(.text+0xe8):../libopenbios/load.c:58: undefined reference to `elf_boot_notes'
Move elf_boot_notes variable to load.c to make it also available on
Unix build. Also fix a spurious sys_info variable definition.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@829 f158a5a8-5612-0410-a976-696ce0be7e32
IEEE-1275 spec compliance.
This patch implements the following:
1) Fix bootpath/bootargs handling so that default values are read from NVRAM, and allow multiple space-separated values to be
specified.
2) With correct bootargs handling in place, move the ELF loader over to the new libopenbios unified loaders.
3) Remove all the loader code from all architecture directories sine we don't need it anymore.
4) Simplify the boot word so it invokes platform-specific code where required, then calls load and go as per the specification.
Tested on all my available images for SPARC32, SPARC64 and PPC, and compile-tested on x86.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@828 f158a5a8-5612-0410-a976-696ce0be7e32
Remove old hack to jump to loaded code and use switch_to().
Use FLUSH_ALL_KERNEL_WINDOWS macro from Linux.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@827 f158a5a8-5612-0410-a976-696ce0be7e32
Move sys_info to load.c to make it also available on Unix build.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@826 f158a5a8-5612-0410-a976-696ce0be7e32
Also add a little bootscript debugging for those people that may need it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@823 f158a5a8-5612-0410-a976-696ce0be7e32
wrapper means that the debugger now works correctly under PPC.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@822 f158a5a8-5612-0410-a976-696ce0be7e32
to each partition type, since some existing code uses this to detect bootloader code. This fixes the quik bootloader problem for PPC as reported by
Aurelian Jarno.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@821 f158a5a8-5612-0410-a976-696ce0be7e32
special-casing directory actions. This is wrong in that in order to list the contents of a directory, open-dev must return true
for any device which contains a valid filesystem, regardless of whether or not the supplied arguments reference a valid path.
This causes us a problem because in order to implement multiple references in boot-device correctly, we have to fail if we open
a specific device with invalid arguments (such as a non-existent file reference). This patch therefore makes the following changes:
1) Create a static method in each of the filesystem packages to implement dir
2) Enhance the partition/disk handlers to record the phandle of any detected filesystem during open
3) Create a new dir method in the partition/disk handlers which invokes the static dir method for the currently detected
filesystem
Hence we can now open a raw device/partition and invoke dir on its filesystem without having to open a specific file-reference
first. Following shortly is a patch to switch the main dir word over to use this new system.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@816 f158a5a8-5612-0410-a976-696ce0be7e32
migrated to a standard package. Note that with this in place /packages/misc-files is obsolete (it is currently disabled) and
very likely to be removed.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@815 f158a5a8-5612-0410-a976-696ce0be7e32
on Laurent's original patch posted to the list.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@809 f158a5a8-5612-0410-a976-696ce0be7e32
Based on patch by Andreas Färber.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@808 f158a5a8-5612-0410-a976-696ce0be7e32
This patch originally started as a fix for PPC, in that the NVRAM initialiser wasn't been run on startup (this is why printenv
on PPC always showed much much less than on SPARC). However, it also showed up some inconsistent logic for boot device
selection, which must also happen *before* boot is called in order for load to work correctly. With this patch applied, bootpath
and bootargs are set from boot-device and boot-args respectively on startup for SPARC32, SPARC64 and PPC.
Note: there is a small chance SPARC32 may break on some images - please let me know if it does.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@805 f158a5a8-5612-0410-a976-696ce0be7e32
arguments. With these fixes in place we can now switch the boot word to use (encode-bootpath) which means that the bootpath and
bootarg properties are now set exactly the same when executing boot and/or load.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@803 f158a5a8-5612-0410-a976-696ce0be7e32
hierarchy is correct, we can simply pass an ihandle into the loader and it will work correctly regardless of whether it is being
invoked on an entire disk, partition or individual file.
In order to test the new code, start by switching the Fcode loader over to the new infrastructure for testing on SPARC64. Note
this patch also contains a correction to load-base on SPARC which was being set to a value other than 0x4000 which is the
documented default.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@798 f158a5a8-5612-0410-a976-696ce0be7e32
by default.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@796 f158a5a8-5612-0410-a976-696ce0be7e32
<device>,\path\to\file. This fixes all outstanding issues with PPC.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@795 f158a5a8-5612-0410-a976-696ce0be7e32
Fix errors like this:
../fs/hfs/volume.c:612:2: error: no newline at end of file
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@793 f158a5a8-5612-0410-a976-696ce0be7e32
allow the partition handler to identify a valid FS before interposition to /packages/misc-files.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@792 f158a5a8-5612-0410-a976-696ce0be7e32
cdrom -> deblocker -> disk-label -> (misc-files | sun-parts | pc-parts | mac-parts)
to:
cdrom -> deblocker -> disk-label -> (sun-parts | pc-parts | mac-parts) -> misc-files
This makes the overall code much simpler, since instead of passing get-info structures between the different layers to work out
the current device offset, each package can simply maintain its own offsets and bubble them back up to the parent.
There are also many, many bugfixes present is patch, some of which are given below:
- Add debugging in /packages/misc-files, augment debugging in all other disk packages
- Fix alignment issue in /packages/pc-parts so it works correctly on strictly align archs, e.g. SPARC64
- Fix parsing of [<id>,][filename] arguments to load (in preparation for next patch set)
- Fix byte-swapping issues in /packages/mac-parts (in theory it should now work regardless of endian)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@791 f158a5a8-5612-0410-a976-696ce0be7e32