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
This openbios-grubfs-ext2fs-block.patch fixes a problem where inode
pointer is truncated to 32bit integer and then sign-extended to 64bit
integer while passing second pointer argument to ext2_rdfsb.
git-svn-id: svn://coreboot.org/openbios/openbios-devel@230 f158a5a8-5612-0410-a976-696ce0be7e32
The current SVN version currently fails to work on machines that have
strict alignment requirements, for example the SPARC target. This is due
to the way the struct fat_bpb in fs/grubfs/fat.h is defined and accessed
(through FAT_CVT_U16) to avoid padding. Some 16 bits fields like
bytes_per_sect are thus accessed unaligned.
The patch below takes the same approach as for other structures in
openbios, it declares the structure as packed, and lets GCC do the right
things to access those unaligned field.
git-svn-id: svn://coreboot.org/openbios/openbios-devel@122 f158a5a8-5612-0410-a976-696ce0be7e32