On ppc64, cell size is 32 bits but pointers are 64-bit.
Thus, direct casts result in warnings, treated as errors.
Use [u]intptr_t cast or cell2pointer and pointer2cell macros as necessary.
v2:
* Drop changes related to physical addresses since physical addresses may be
wider than pointers (e.g., 36 bits on sparc32, as pointed out by Blue).
* Drop changes to cell2pointer() and pointer2cell() for now.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@922 f158a5a8-5612-0410-a976-696ce0be7e32
Compiling PPC with GCC 4.6.0 20100925 produced a few warnings:
../fs/hfs/block.c: In function 'reuse':
../fs/hfs/block.c:304:11: error: variable 'chain' set but not used [-Werror=unused-but-set-variable]
../fs/iso9660/iso9660_mount.c: In function 'iso9660_name':
../fs/iso9660/iso9660_mount.c:18:16: error: variable 'uh' set but not used [-Werror=unused-but-set-variable]
Fix the warnings by avoiding write-only variables.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@884 f158a5a8-5612-0410-a976-696ce0be7e32
Make seek_name() compare the path component in a case-insensitive way.
Should fix an issue reported by Mark.
Cc: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Cc: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@865 f158a5a8-5612-0410-a976-696ce0be7e32
There's a mixup of 0 and -1. Don't return failure if iso9660_open() succeeded. Don't return success in case
iso9660_open() or iso9660_mount() failed.
This resolves both a hang when trying to boot cd:,\\:tbxi and failure to boot either cd:,\ppc\bootinfo.txt
or cd:,\ppc\chrp\bootfile.exe despite present on the AIX 6.1 disk.
Cc: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@864 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
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
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
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
Fix clang warnings:
../kernel/dict.c:289:2: warning: Value stored to 'len' is never read
len -= sizeof(dictionary_header_t);
../packages/cmdline.c:181:8: warning: Value stored to 'buf' during its
initialization is never read
char *buf = ci->buf;
../libopenbios/elf_info.c:126:2: warning: Value stored to 'name' is never read
name = addr;
../libopenbios/elf_load.c:277:5: warning: Value stored to 'addr' is never read
addr += pad;
../drivers/ide.c:209:3: warning: Value stored to 'err' is never read
err = ob_ide_pio_readb(drive, IDEREG_ERROR);
../drivers/ide.c:219:17: warning: Value stored to 'old_cdb' during its initialization is never read
unsigned char old_cdb = cmd->cdb[0];
../drivers/ide.c:222:4: warning: Value stored to 'old_cdb' is never read
old_cdb = cmd->old_cdb;
../drivers/pci.c:103:2: warning: Value stored to 'ss' is never read
ss = 0;
../drivers/pci.c:100:2: warning: Value stored to 'dev' is never read
dev = 0;
../drivers/pci.c:212:2: warning: Value stored to 'bus' is never read
bus = (hi >> 16) & 0xFF;
../drivers/pci.c:953:4: warning: Value stored to 'rev' is never read
rev = pci_config_read8(addr, PCI_REVISION_ID);
../packages/video.c:331:2: warning: Value stored to 's' is never read
s = video.fb.mphys - s;
../packages/video.c:330:2: warning: Value stored to 'size' is never read
size = ((video.fb.h * video.fb.rb + s) + 0xfff) & ~0xfff;
../fs/hfsplus/btree.c:229:5: warning: Value stored to 'p' is never read
p = btree_readhead(&bt->head, p);
../fs/hfsplus/volume.c:149:2: warning: Value stored to 'p' is never read
p = volume_readfork(p, &vh->start_file );
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@751 f158a5a8-5612-0410-a976-696ce0be7e32
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
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
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
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
Yaboot relies on the read function from openbios to stop reading at the
end of a file. This patch makes sure to not read beyond the end of the
file. This fixes the boot of debian-installer using a CD-ROM.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://coreboot.org/openbios/openbios-devel@373 f158a5a8-5612-0410-a976-696ce0be7e32
Fix warnings that would be caused by gcc flag -Wwrite-strings and
-Wmissing-prototypes. Also fix most PPC specific warnings.
git-svn-id: svn://coreboot.org/openbios/openbios-devel@288 f158a5a8-5612-0410-a976-696ce0be7e32