The base_address for native bitwidth smaller than host bitwidth
is available only in kernel/bootstrap.c and thus cannot be used
elsewhere.
The bitwidth equality code path will have to be enhanced
for different cell sizes instead.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@939 f158a5a8-5612-0410-a976-696ce0be7e32
Add an ofmem_release() function and stub out the implementation.
Hook it up for ppc and sparc64.
Cc: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@938 f158a5a8-5612-0410-a976-696ce0be7e32
Prefer phys_addr_t for physical addresses.
Resort to uintptr_t where a conversion to pointer occurs,
since the physical address may be larger (e.g., sparc32).
v2:
* Use phys_addr_t.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@933 f158a5a8-5612-0410-a976-696ce0be7e32
Define phys_addr_t type for all architectures.
v2:
* Add comment on PAE for x86, pointed out by Blue.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@932 f158a5a8-5612-0410-a976-696ce0be7e32
Add a uintptr_t cast as an interim solution to resolve errors for ppc64,
where pointer size is larger than cell size.
v2:
* Add comment on potential better fix.
Postpone potential conversion to inline function until investigated.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@931 f158a5a8-5612-0410-a976-696ce0be7e32
These will be needed elsewhere for ppc64.
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@917 f158a5a8-5612-0410-a976-696ce0be7e32
Each console write caused temporary buffer allocation.
Avoid allocations by changing console_draw_str() to use Forth
string parameters, which are usually readily available.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@872 f158a5a8-5612-0410-a976-696ce0be7e32
Move nested extern declarations into header files, or use the
already existing declarations.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@861 f158a5a8-5612-0410-a976-696ce0be7e32
The ePAPR spec requires us to have a /hypervisor node that tells the guest OS
which hypervisor it's running on and which hypercall to use to call into it.
So let's fetch all that information from Qemu's fw_cfg interface and put it
into place, making everyone happy.
Signed-off-by: Alexander Graf <agraf@suse.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@853 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
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
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
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
- sparc64 has PCI memory space at offset, therefore "ranges" property
of host bridge must have different PCI and host memory addresses
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@788 f158a5a8-5612-0410-a976-696ce0be7e32
- refactor scan procedure to start with PCI host controller
- initiate scan of subordinate PCI bus from PCI host and PCI-to-PCI bridges
- find out PCI subordinate bus numbers and write them to bride devices
- automated assignment of "reg", "ranges", and "bus-range" properties
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@786 f158a5a8-5612-0410-a976-696ce0be7e32
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@779 f158a5a8-5612-0410-a976-696ce0be7e32
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@778 f158a5a8-5612-0410-a976-696ce0be7e32
different translation entries described within the OF platform bindings. With thanks to Andreas Färber and Igor Kovalenko.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@772 f158a5a8-5612-0410-a976-696ce0be7e32
to finish the code and test retention after a restart since the OpenBIOS words reset and reset-all don't seem to work at the
moment. However, it enables OpenSolaris boot to get further in the meantime.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@766 f158a5a8-5612-0410-a976-696ce0be7e32
buffer allocated for them.
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@741 f158a5a8-5612-0410-a976-696ce0be7e32
disappears when booting a FC12 test ISO directly. Interestingly enough, if the equivalent "load" and "go" commands are entered
manually then the console output works fine and the ISO can boot?! So there is still an issue with the console not being
initialised correctly somewhere.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@734 f158a5a8-5612-0410-a976-696ce0be7e32
accordingly. Hence since the loaders are currently written in C, it makes more sense to drop down into C and re-use the same
code rather than have a second implementation in Forth.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@726 f158a5a8-5612-0410-a976-696ce0be7e32
architectures are updated to use it. This is required to allow binding of C functions into Forth by libopenbios (i.e. cross
architecture) rather than having to update everything in every arch/*/ initialisation file.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@725 f158a5a8-5612-0410-a976-696ce0be7e32
involves taking the existing parts of the XCOFF loader and putting them into a new loader file xcoff_load.c. Also fix a
dependency order change these changes introduce when building openbios-unix.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@720 f158a5a8-5612-0410-a976-696ce0be7e32
Fixes build:
CC target/arch/sparc64/boot.o
In file included from ../arch/sparc64/boot.c:14:
../include/libopenbios/forth_load.h:22:28: 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@718 f158a5a8-5612-0410-a976-696ce0be7e32
Fixes build:
In file included from ../arch/sparc64/boot.c:12:
../include/libopenbios/aout_load.h:24:27: error: no newline at end of file
In file included from ../arch/sparc64/boot.c:13:
../include/libopenbios/fcode_load.h:22:28: 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@715 f158a5a8-5612-0410-a976-696ce0be7e32
included and built as part of the SPARC64 and SPARC32 builds, it was never actually invoked in the boot sequence. Hence this
patch maintains the existing behaviour in that only X86 builds included the Forth loader.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@712 f158a5a8-5612-0410-a976-696ce0be7e32