aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-06-21ppc: fix stack usage in mmu_claim, mem_claimCormac O'Brien1-17/+17
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
2015-06-21ppc: add ROM node to device treeCormac O'Brien1-0/+8
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
2015-06-21ppc: add Adler-32 checksum capabilityCormac O'Brien1-0/+57
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
2015-06-21bootinfo_load.c: stop parsing CHRP boot script when NULL is reachedMark Cave-Ayland1-0/+6
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
2015-05-12SPARC32: Reduce OpenBIOS reserved spaceOlivier Danet1-1/+1
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
2015-05-12OFMEM: fix off-by-one calculation in available property tail calculationMark Cave-Ayland1-3/+3
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
2015-05-12OFMEM: remove ofmem_arch_get_phys_top() implementationMark Cave-Ayland5-25/+3
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
2015-05-12SPARC32: reserve top of physical memory directly rather than with ↵Mark Cave-Ayland1-1/+3
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
2015-05-12switch-arch: Add non-standard compiler prefix supportMark Cave-Ayland1-1/+7
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
2015-03-11SPARC32: clear physical memory upon startupMark Cave-Ayland1-0/+37
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
2015-03-11SPARC32: mark pre-loaded kernel image memory as being in useMark Cave-Ayland1-1/+6
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
2015-03-11SPARC32: fix initialisation of L1 page tableMark Cave-Ayland1-1/+1
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
2015-03-11SPARC32: minor tidy-up for boot.cMark Cave-Ayland1-4/+1
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
2015-03-09SPARC64: add an eeprom node to the device treeArtyom Tarasenko1-0/+20
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
2015-03-09SPARC64: use MMIO for NVRAM accessArtyom Tarasenko1-23/+8
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
2014-12-01package.fs: fix "child" word being called with a NULL phandleMark Cave-Ayland1-0/+4
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
2014-11-14SPARC64: fix interrupt mapping for PCI slotsMark Cave-Ayland1-17/+38
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
2014-11-14pci.c: move SPARC64 PCI interrupt mapping to post-PCI-bus scanMark Cave-Ayland1-36/+22
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
2014-11-14pci.c: move PPC openpic interrupt mapping to post-PCI-bus scanMark Cave-Ayland1-32/+20
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
2014-11-14macio.c: move openpic interrupt map initialisation to after PCI bus scanMark Cave-Ayland2-40/+54
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
2014-11-14pci.c: rework pci_host_set_interrupt_map() to use phandle_t rather than ↵Mark Cave-Ayland1-5/+3
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
2014-11-14pci.c: remove unneeded CONFIG_PPC defineMark Cave-Ayland1-2/+0
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
2014-10-21tcx.fs: fix size of STIP register in 8-bit modeMark Cave-Ayland1-4/+3
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
2014-09-24tcx.fs: add support for hardware accelerationMark Cave-Ayland1-4/+8
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
2014-09-24tcx.fs: update reg offsets to use proper register namesMark Cave-Ayland1-66/+66
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
2014-09-24OFMEM: change ofmem_claim() to always allocate addresses where phys == virtMark Cave-Ayland1-2/+2
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
2014-09-24SPARC64: configure the Sabre PCI TAS registerMark Cave-Ayland1-0/+18
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
2014-08-25Add USB OHCI + HID driverBALATON Zoltan17-1/+3046
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
2014-08-25macio ide: Fix dev tree entries for macio ide portsBALATON Zoltan2-8/+16
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
2014-08-25arch/ppc/qemu: Rename root node for Macs to match AppleBALATON Zoltan1-1/+2
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
2014-08-17SPARC64: add empty no-streaming-cache property to Sabre nodeMark Cave-Ayland1-0/+3
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
2014-08-04SPARC64: switch to using interrupt-map property for interrupt pinsMark Cave-Ayland1-17/+26
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
2014-08-04SPARC64: build ebus ranges property from PCI BARsMark Cave-Ayland1-5/+32
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
2014-08-04pc_serial.c: don't add address property to SPARC64 serial portsMark Cave-Ayland1-0/+2
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
2014-08-04pc_serial.c: move address initialisation to a separate init wordMark Cave-Ayland1-10/+11
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
2014-08-04pci.c: add generation of pci node available propertyMark Cave-Ayland1-1/+18
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
2014-07-13Mac99: Support flat NVRAMAlexander Graf2-15/+17
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
2014-05-30PPC: Pass real tbfreq to udelayAlexander Graf2-7/+7
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
2014-05-28arch/ppc/qemu: Moved exception handlers from beginning of RAMBALATON Zoltan1-19/+13
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
2014-05-25arch/ppc/qemu: Clean up and add more cpu infosBALATON Zoltan2-14/+43
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
2014-05-23arch/ppc/qemu: do not override boot-device if already setBALATON Zoltan1-17/+21
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
2014-05-23SPARC64: preserve window state when invoking CIF functionsMark Cave-Ayland1-8/+163
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
2014-05-23SPARC64: defer set_trap_table effect until CIF exitMark Cave-Ayland2-3/+19
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
2014-05-23SPARC64: reduce client interface stack usageMark Cave-Ayland1-21/+46
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
2014-05-23SPARC64: mark PROM memory allocation TTEs as privilegedMark Cave-Ayland1-4/+4
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
2014-05-12SPARC64: only map 8MB RAM on startupMark Cave-Ayland1-1/+1
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
2014-05-12ciface.fs: handle buggy callers to test-methodMark Cave-Ayland1-5/+20
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
2014-05-12SPARC64: fix up translations property mode to make it a valid TTEMark Cave-Ayland1-2/+2
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
2014-05-12SPARC64: Remove zero page mapping from MMU to enable detection of NULL ↵Mark Cave-Ayland1-1/+1
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
2014-05-12SPARC64: fix NULL pointer reference when attempting kernel bootMark Cave-Ayland1-19/+21
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