Age | Commit message (Collapse) | Author | Files | Lines |
|
The 'phys' argument to mem_claim() and 'virt' argument to mmu_claim() are now
only popped from the stack if the 'align' argument is provided. Exception
throws have been removed to simplify crossing C <-> Forth boundaries and to
maintain consistency with other architectures.
This patch also fixes two stack diagrams with 'phys' arguments instead of
'virt' ones.
Signed-off-by: Cormac O'Brien <i.am.cormac.obrien@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1344 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This patch adds a ROM node to the PPC device tree as is required by Mac OS 9.
Based on a patch by John Arbuckle <programmingkidx@gmail.com>
Signed-off-by: Cormac O'Brien <i.am.cormac.obrien@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1343 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This patch provides an implementation of the adler32 Forth word as required by
Mac OS 9 and BootX.
Signed-off-by: Cormac O'Brien <i.am.cormac.obrien@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1342 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
The Mac OS 9 CHRP boot script consists of a null-terminated Forth string
followed by a large binary payload. Make sure we correctly determine the size
of the bootscript at this point instead of trying to allocate memory for the
entire binary blob which fails due to insufficient memory.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1341 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
SunOS 4.1.4 maps the DVMA (IOMMU) at address 0xfff00000 (hardcoded).
OpenBIOS shall not use that virtual memory area in order to be
compatible with SunOS.
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@1340 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Make sure that the final address of the range is passed into
ofmem_update_memory_available() for physical ranges, rather than the
physical memory size. This enables us to fix an off-by-one calculation
in the tail entry for the available property.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Olivier Danet <odanet@caramail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1339 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
|
|
ofmem_arch_get_phys_top()
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1337 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Allow a user-defined compiler prefix to be specified via the CROSS_COMPILE
variable when running switch-arch, e.g.
CROSS_COMPILE=powerpc-linux- ./config/scripts/switch-arch ppc
Based upon an original patch by John Arbuckle <programmingkidx@gmail.com>.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1336 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This is to work around a bug in Solaris which appears not to explicitly clear
some of its internal kmem structures (particularly its pagelists) on boot. The
result of this is that Solaris will initially boot fine, until a reboot/reset
is initiated.
When this occurs, the kmem structures contain whatever junk was previously left
in memory during initialisation causing a panic. The fix is to clear physical
memory on startup (as OBP appears to do) so that the kmem intialisation code
behaves correctly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1334 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This is to ensure that a client OS reading the memory lists from the PROM
won't consider its own memory space available.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1333 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Since l1 is a pointer to an array of longs, the increment size should be 1
(element) and not 4 (bytes). While this shouldn't have an effect when booting
an image from fresh, it meant that the L1 page table contained old entries
after a reboot.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1332 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This commit doesn't have any functional changes but removes some debugging
printks accidentally included by a previous commit, plus adds a +1 offset
back onto the size of tail prommap entry to ensure that it is correctly
aligned.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1331 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Add eeprom node to the device tree to make device visible for
the guest OS.
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1330 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Use MMIO for accessing the m48t59 NVRAM chip. This patch is a counterpart
of a QEMU change.
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1329 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Solaris 9 relies on an undocumented feature that calling "child" with
a NULL phandle is equivalent to using the phandle of the device tree
root node.
Make sure that we emulate the same behaviour to avoid a crash when
dereferencing a NULL pointer.
This patch fixes Solaris 9 boot on SPARC32 and is based upon a
proof-of-concept patch submitted by Artyom Tarasenko <atar4qemu@gmail.com>.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1328 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Instead of using hard-coded interrupt mappings for the NE2000 (slot 4) and CMD646
(slot 5) devices, we can now interrogate the device tree after the PCI scan to
locate any devices with interrupt pins and map them accordingly.
This fixes the regression with PCI devices added with QEMU's -device syntax not
having their interrupt pins mapped (particularly virtio devices).
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1327 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Move the PCI interrupt mapping from the pre-scan
pci_host_set_interrupt_map() to the post-scan ob_pci_host_set_interrupt_map()
function.
As a consequence of this we can remove pci_host_set_interrupt_map() since it
is now now longer used.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1326 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Move the openpic interrupt mapping from the pre-scan
pci_host_set_interrupt_map() to the post-scan ob_pci_host_set_interrupt_map()
function.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1325 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Here we move the interrupt initialisation from openpic_init to a new
post-bus scan function called ob_pci_host_set_interrupt_map().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1324 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
pci_config_t
This is in preparation for some further work to set the interrupt map after the PCI
bus has been enumerated.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1323 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This is already covered by the surrounding define.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1322 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
The existing reg property sets the size of the STIP register to 1 byte in
8-bit mode which is likely wrong, and causes NetBSD 6 to fail to detect the
the TCX card in 8-bit mode.
Use the same STIP register size as for 24-bit mode in both 8-bit and 24-bit
modes which is enough to allow NetBSD (including X) to function correctly.
Reported-by: Martin Husemann <martin@duskware.de>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1321 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This is a tidied version of the patch originally posted to the mailing list by
Olivier DANET <odanet@caramail.com>.
- Change a few addresses to match actual hardware
- Remove the "address" property from TCX, because of some almost-bug in NetBSD
when detecting framebuffers (actual TCX has no address property, so it works
by chance on real hardware)
- Add the hardware cursor properties
With this and the corresponding QEMU TCX hardware acceleration patch, the
hardware-assisted NetBSD TCX driver will function under QEMU.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1320 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Rather than use numerical offsets, use the proper register names as used in
the QEMU TCX hardware acceleration patch.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1319 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
The wording of the IEEE1275 specification for the CIF claim and release words
contains the following:
claim
IN: [address] virt, size, align
OUT: [address] baseaddr
Allocates size bytes of memory. If align is zero, the allocated range begins
at the virtual address virt.... The range of physical memory and virtual addresses
affected by this operation will be unavailable for subsequent mapping or allocation
operations until freed by release.
release
IN: [address] virt, size
OUT: none
Frees size bytes of physical memory starting at virtual address virt, making that
physical memory and the corresponding range of virtual address space available for
later use. That memory must have been previously allocated by claim.
Even though the claim word mentions virtual addresses, the implication from the
release word mentioning physical memory is that allocations made by claim must
have phys == virt. So change ofmem_claim() to ensure that addresses allocated via
the CIF claim word always have phys == virt.
This fixes a bug in MorphOS boot where different physical and virtual addresses
cause mixed accesses by the bootloader to fail.
Reported-by: BALATON Zoltan <balaton@eik.bme.hu>
Tested-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@1318 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Make sure that we declare the same range available as set by the virtual-dma
properties hardcoded in sabre_configure().
This register is checked by FreeBSD during boot which panics if it finds a
default (zero) value.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1317 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
|
|
Only add the two ide ports that are emulated by QEMU to the device
tree to avoid clients trying to access the non-existent third one and
fix their names and properties for mac99 to match those used by Apple.
This makes MorphOS able to find and use these.
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@1315 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Apple calls the root node of the device tree "device-tree" and MorphOS
relies on this to decide what properties to get. Make it happy.
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@1314 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This matches the device tree from a real Ultra 5 and prevents NetBSD from
attempting to manipulate the streaming cache.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1313 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Instead of wiring the interrupt pins directly on the device, follow the PCI
bindings specification by storing the PCI interrupt pin on the device and then
using a combination of interrupt-map and interrupt-map-mask properties to
generate the final interrupt pin.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1312 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Also fix up the interrupt-map property to match the altered addresses.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1311 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This is similar to real hardware, otherwise NetBSD allows this property to
override the bus address which inevitably gives the wrong value.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1310 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This is in preparation for making the address attribute optional.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1309 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Some OSs check for this value at boot, particulary NetBSD on SPARC64.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1308 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
|
|
The IDE code waits for some operations to finish within a certain amount of
time. That waiting code delays based on the timebase, but doesn't know about
the frequency of the timebase.
In cases where we know the frequency - like via QEMU's fwcfg interface - base
the calculation on that frequency value.
This fixes issues where OpenBIOS thought it ran into IDE timeouts.
Signed-off-by: Alexander Graf <agraf@suse.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1306 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Do not put exception handler routines between 0x00-0xff as some OSes
use this area for their own purposes and can corrupt them. (In
particular MorphOS writes to 0x80 during boot). This patch frees up
this area by moving the routines that were there higher.
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@1305 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
|
|
Only set the boot-device env variable if it is not yet set, do not
override values set e.g. by -prom-env option of QEMU.
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@1303 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Members of the *BSD family have a restriction that no window spill/fill traps
can occur in the short time between calling SUNW,set-trap-table in OF and
returning back to the caller.
In order to ensure we minimise window spill/fill traps, preserve the entire
window state across the CIF calls (probably similar to OBP) to ensure that
we don't breach this restriction.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1302 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Since OpenBIOS invokes window fill/spill traps during normal operation, make
sure that we defer setting the client trap table until we return control
back to the client.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1301 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Currently the client interface entrypoint uses the existing client stack to
save state before invoking the main C implementation function. Unfortunately
some clients such as OpenBSD have a very small stack available which can be
exhausted by internal OpenBIOS calls.
Reduce the stack space required by just saving the globals onto the existing
stack and instead switching to a separate stack when invoking the OpenBIOS
client interface.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1300 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This brings the behaviour in line with OBP.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1299 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Due to a (bug?) in OpenBSD's pmap_bootstrap(), the kernel attempts to locate
its text segment and size by searching the translations property for continuous
regions in use starting from the kernel load address.
Unfortunately if we have already mapped memory above the kernel load address of
0x1000000 then the kernel extends the text region way beyond the text segement
causing an exception when eventually trying to set non-existent mappings in the
TLB.
Fix this by only mapping 8MB of RAM so that we guarantee that the region above
0x1000000 will always be free, and hence the text/data regions will be discrete
so that the sizing algorithms return the correct answer.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1298 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
SPARC64 *BSDs accidentally call test-method with an ihandle rather than a
phandle which causes OpenBIOS to crash. Work around this by checking to
ensure that the phandle exists within the tree before trying to use it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1297 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
NetBSD attempts to parse the translations property in order to set up the
virtual to physical translations for the kernel. Alter the mode cell to
include the physical address and valid bit so that it represents a real
TTE entry for the given start adddress.
This is confirmed by checking real dumps from prtconf examples, plus the
NetBSD kernel now starts to boot.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1296 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
pointer dereferences
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1295 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
When checking to determine whether to boot a standalone kernel, we would
inadvertently reference a NULL pointer if no path was found. Make sure
subsequent path processing is ignored when not booting a standalone kernel
so we fall through to normal Forth boot.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1294 f158a5a8-5612-0410-a976-696ce0be7e32
|