Age | Commit message (Collapse) | Author | Files | Lines |
|
Should not affect behaviour as it just calls ofmem_malloc which takes
size_t as argument anyway. Reported when build with
-Wbuiltin-declaration-mismatch.
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Whilst the NVRAM device node exists under the mac-io device node for Old World
Macs, both itself and the Uninorth device node exist under the root device node
on New World Macs.
Move creation of both device nodes to arch_of_init() for New World machines to
enable the active package and current instance to be set correctly during device
tree construction.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Now that we've removed all references to these binding macros they can be removed
completely.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This macro is designed to bind C functions into Forth words during creation
of the device tree, but only into an existing node and without attempting
to create any missing parent nodes.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Note that as part of this commit we rename the legacy virtio-blk device node
from "virtio-blk" to "scsi" to match up with the QEMU fw path generator.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
For reasons lost in the history of time, the SPARC64 endian accessors were
given the opposite names to their function i.e. out_le32() would use a
standard load whilst out_be32() would use a little-endian load. Switch
them around so that their implementation matches their name (and also that
of all other architectures).
Note that since the references in the inb/inw/inl and outb/outw/outl wrappers
are also swapped around then these accessors for legacy ioports (i.e. little
endian) will still behave exactly the same as before.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This is in preparation for allowing OpenBIOS to detect the difference
between CUDA/PMU hardware and build the device tree accordingly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This is borrowed from OpenHackWare in order to provide hardware data to
the client OS.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This is to enable booting PReP machines in OpenBIOS.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This is required for ensuring that CPU memory is coherent after DMA operations
have completed.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This is to enable us to use its functions for the upcoming DMA functionality.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Rather than have dvma_alloc() store the result of the physical translation
in the specified location, use the fact that we now have contiguous physical
DMA memory to implement dvma_map_in() to perform the translation separately.
This allows us to remove the pointer to the physical address parameter to
dvma_alloc() and instead perform the translation in esp.c by calling
dvma_map_in() separately.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
No driver, but we read the MAC address from the chip and write
it into the device-tree where Linux and MacOS look for it. We
also set the right compatible property for MacOS to pick it up.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This is now handled by the host_ranges property so remove all remaining
references.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
|
|
Implement fw-cfg-read-file Forth word as a simple wrapper around
fw_cfg_read_file().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
These allow OpenBIOS to locate fw_cfg files by name and then read
them via the fw_cfg interface.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Edward Betts <edward@4angle.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Comparing with real device trees, the maximum virtual memory address
available for allocation on sun4u machines is 0xff000000.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
In preparation for applying the ofmem_arch_get_virt_top() restriction to the
virtual memory region, fix up the calculation of the available list tail plus
increase the virtual memory region to cover the IO memory.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Part of commit 070ea60 created a new stack within the virtual image for use by
the startup context. Unfortunately the current implementations of virt_to_phys()
as used by some drivers are incorrect which causes issues with some parts of
OpenBIOS, notably the USB stack.
Revert back to using the initial stack in start.S which ensures a 1:1 mapping
between virtual and physical addresses to avoid such problems.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Now that each loader sets up its own context, there is no need to pass
in the address or set up the context ourselves.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
load should place the file at load-base, whilst init-program should parse
the memory at load-base and set up the context accordingly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
load should place the file at load-base, whilst init-program should parse
the memory at load-base and set up the context accordingly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Add an (arch-go) hook for architectures that need to do their own thing before
starting an image, and switch the callers over to use it.
Also clarify the state-valid check: any non-zero value is considered true.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Also fix up the incorrect x86 prototype which is missing the volatile qualifier.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This enables them to be launched from a native context.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
implementations
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This is taken from a patch submitted earlier by BALATON Zoltan <balaton@eik.bme.hu>.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This helper function returns the full device path for the device with the
given phandle as a string.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1368 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
The fcstack holds a stack of complete CPU states which can be used to enable
re-entrant calls into Forth (e.g. when processing interrupts).
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1360 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Replace "-I" by "-iquote" to only take files from this directory
when '#include "..."' is used ('#include <...>' works as usual).
We need this because on powerpc64 asm/sigcontext.h includes <asm/elf.h> and
tries to include target/include/asm/elf.h instead of /usr/include/asm/elf.h.
We also remove from include/arch/ppc/types/h some useless and conflicting
type definitions.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1358 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Add a new ob_ide_quiesce() function and hook it into QEMU PPC's ciface_quiesce()
routine to properly prepare the drives for transferring control to the operating
system.
Without this OS 9 becomes confused about the initial drive state on boot and
refuses to correctly detect and initialise it.
Based upon an original patch by Cormac O'Brien <cormac@c-obrien.org>.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1353 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Since the previous commit, the value of ofmem_arch_get_phys_top() is now the
same across all architectures. Hence we can now remove this and just use the
physical memory size directly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1338 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This driver is ported from CoreBoot's libpayload and fixed to work on
big endian CPUs (tested on PPC with QEMU). It is enough to support a
USB keyboard on an Apple Keylargo OHCI compliant USB host and makes
OpenBIOS usable on qemu-system-ppc64 with mac99 machine type as well
as allows to emulate PowerMac3,1 better.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1316 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
The mac99 machine is switching to use a flat NVRAM layout. Support
that hint and treat NVRAM as flat when we find it.
We keep the old (broken) shifted-by-1 way of accessing NVRAM around
to be able to use new OpenBIOS binaries on older QEMU versions.
Signed-off-by: Alexander Graf <agraf@suse.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1307 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Removed unused clock_frequency member from struct cpudef which is get
from FW_CFG and added bus-frequency property to complete the frequency
properties. Also added tlb infos to CPU properties.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Alexander Graf <agraf@suse.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1304 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Make sure that we always compile the OFMEM_TRACE macro regardless of whether
CONFIG_DEBUG_OFMEM is set, similar to the way in which the DEBUG macros work
in QEMU. This relies on the fact that the compiler optimiser will work out
that the compile-time "if" test is always true/false and optimise the result
out if is it not required.
This ensures that we always get proper debug argument checking and means that
certain sections of code don't keep giving unused variable warnings when they
only appear in debug codepaths.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1285 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
SparcStation 5 has 1 timer and 1 per-cpu interrupt controller.
SparcStation 10/20 has 4 timers and 4 per-cpu interrupt controllers,
independently from the number of CPUs installed.
Timer and interrupt controller properties are set accordingly. This
is what Sun's OpenBOOT does and having only 1 timer/interrupt declared
on SS5 is necessary for NextSTEP.
Signed-off-by: Olivier Danet <odanet@caramail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1261 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Some bootloaders use the IEEE1275 memory words to allocate blocks of memory
which are less than PAGE_SIZE. With an incorect page size, OFMEM would
allocate entries that were only aligned to 4K. This caused a problem whereby
when memory was reallocated by OpenBIOS, the resulting TLB flush would be
at the wrong address, silently fail, and hence cause a crash when the
reallocated virtual address was first accessed.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1243 f158a5a8-5612-0410-a976-696ce0be7e32
|