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 Sparc64 with GCC 4.6.0 20100925 produced a few warnings:
../arch/sparc64/context.c: In function 'start_main':
../arch/sparc64/context.c:49:9: error: variable 'retval' set but not used [-Werror=unused-but-set-variable]
../packages/disk-label.c: In function 'dlabel_load':
../packages/disk-label.c:183:8: error: variable 'buf' set but not used [-Werror=unused-but-set-variable]
../drivers/floppy.c: In function 'collect_interrupt':
../drivers/floppy.c:378:13: error: variable 'status' 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@882 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
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
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
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
the source files into a structure whereby it is easier to find the relationship between a forth package word and its C
implementation, while also creating a libopenbios library into which more common code from the arch/ tree can eventually be
moved.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@685 f158a5a8-5612-0410-a976-696ce0be7e32