aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-01-16Revert configuration change from previous commit.Mark Cave-Ayland1-1/+1
Accidentally manged to leave CONFIG_DEBUG_CONSOLE_VIDEO set to false from testing. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1092 f158a5a8-5612-0410-a976-696ce0be7e32
2013-01-16video.c: Fix compilation when CONFIG_DEBUG_CONSOLE_VIDEO is set to false.Olivier DANET2-1/+3
The dac[] global for the palette exists only when CONFIG_DEBUG_CONSOLE_VIDEO is defined. 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@1091 f158a5a8-5612-0410-a976-696ce0be7e32
2013-01-16video.c: Fix incorrect sized type in fill_rect().Olivier DANET1-1/+1
256 colour framebuffers are arrays of chars, not short integers. 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@1090 f158a5a8-5612-0410-a976-696ce0be7e32
2013-01-13mac-parts.c: Update bootpath to reflect the chosen partition if unspecified.Mark Cave-Ayland1-1/+31
When not booting from a specified partition, bootpath doesn't contain the selected partition id. Since this is parsed by BootX in order to locate the Mach kernel, update it accordingly. Otherwise BootX falls back to its default behaviour of scanning the first 3 partitions in order to find the kernel and fails on early Darwin/OS X images. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1089 f158a5a8-5612-0410-a976-696ce0be7e32
2013-01-13Switch partition argument parsing to use left-parse-string as per CHRP bindings.Mark Cave-Ayland3-109/+63
As suggested in the PPC CHRP bindings, use the Forth left-parse-string word to parse the arguments passed to open in the mac-parts, sun-parts and pc-parts packages. This results is a much less complicated and more robust argument parser. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1088 f158a5a8-5612-0410-a976-696ce0be7e32
2013-01-13PPC: Mimic Apple's OpenFirmware behaviour if a divide by zero occurs.Mark Cave-Ayland2-1/+8
As reported by Amadeusz Sławiński using a real Mac, if anything is divided by zero then we should return zero rather than invoke a manual trap: 0 > 2 0 / ok 1 > u. 0 ok This resolves a bug in BootX which (un)intentionally divides by zero during boot. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1087 f158a5a8-5612-0410-a976-696ce0be7e32
2013-01-12mac-parts.c: Add Apple_Bootstrap to partition types considered for Mac boot.Mark Cave-Ayland1-0/+1
When falling back to Mac rather than CHRP boot, allow Apple_Bootstrap partitions to be considered. This fixes booting from CD images with a New World Apple_Bootstrap partition, such as FreeBSD. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1086 f158a5a8-5612-0410-a976-696ce0be7e32
2013-01-11PPC: Fix filll word used by BootXMark Cave-Ayland1-7/+8
As pointed out by Segher, the length parameter is specified in bytes rather than cells. The behaviour when the number of bytes is not an exact multiple of a long word is to round up to the next long word, as verified on real Mac hardware. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Olivier DANET <odanet@caramail.com> Tested-by: John Arbuckle <programmingkidx@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1085 f158a5a8-5612-0410-a976-696ce0be7e32
2013-01-07Ignore any attempts to emit a character to stdout when stdout is set to 0.Mark Cave-Ayland1-2/+5
When booting in standard (non-verbose) mode, BootX sets the stdout package handle to zero to suppress output, yet still continues to invoke the underlying emit word. This would cause OpenBIOS to become confused, often getting stuck in a tight loop. This patch checks the value of stdout before calling the underlying emit word, and simply returns if stdout is not set. Based upon an original patch by William Hahne <will07c5@gmail.com>. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1084 f158a5a8-5612-0410-a976-696ce0be7e32
2013-01-07adb_kbd.c: Implement dummy get-key-map word for the ADB keyboard package.Mark Cave-Ayland1-0/+27
This word is used by some bootloaders to detect keypresses at startup e.g. to enable verbose boot. The current implementation simply returns an empty array (indicating no keys are pressed) as the key/bitmap mapping is unknown; however this allows bootloaders which make use of the word to execute. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1083 f158a5a8-5612-0410-a976-696ce0be7e32
2013-01-07PPC: Fix mapping of OpenBIOS ROM in RAM copy within OFMEMMark Cave-Ayland1-3/+9
The OpenBIOS ROM in RAM copy was being incorrectly mapped in OFMEM as part of the 1:1 physical to virtual mapping used for OpenBIOS housekeeping at the top of RAM. Change the existing 1:1 mapping to handle everything up to the ROM in RAM copy, and then add a separate virtual mapping for the OpenBIOS ROM in RAM address space. This ensures that the OpenBIOS address space mapping is now recorded in the MMU translations property, and hence presented to client kernels to be incorporated in their existing mapping list before taking control of the MMU. With this patch applied, my NetBSD 5 test ISO is now able to complete a substantial part of its kernel boot. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1082 f158a5a8-5612-0410-a976-696ce0be7e32
2013-01-06PPC: Fix next slot evictionAlexander Graf1-10/+27
This patch fixes next slot eviction in the MMU code when our HTAB is full. The basic problem behind this is that the next slot id is stored in .bss which is automatically resolved to an address that resides in a r/o area. This is not an issue usually, because in virtual addressing mode OpenBIOS swizzles accesses to the r/o ROM area to the r/w shadow in RAM. But since the MMU code runs in real mode, this logic doesn't apply. The solution is simple: Access the global variable using its shadowed address, not the ROM address. Based upon an original patch by Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1081 f158a5a8-5612-0410-a976-696ce0be7e32
2012-12-13video.c: Place framebuffer address in frame-buffer-adrWilliam Hahne1-0/+3
BootX gets the framebuffer address to provide to Mac OS from the frame-buffer-adr value. This value was previously just set to null. This is in agreement with section 3.8.4.4 of the IEE1275 specification. Signed-off-by: William Hahne <will07c5@gmail.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1080 f158a5a8-5612-0410-a976-696ce0be7e32
2012-12-13mac-parts.c: Fix detection of wrapped HFS+ volumes.William Hahne1-1/+1
The code for checking for a wrapped HFS+ volume looks at the wrong offset. The offset of the magic number for the wrapped volume is 0x7c, but vol is declared as a uint16 meaning the correct array index to check is 0x3e (see http://developer.apple.com/library/mac/#technotes/tn/tn1150.html). Signed-off-by: William Hahne <will07c5@gmail.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1079 f158a5a8-5612-0410-a976-696ce0be7e32
2012-12-09PPC: Implement filll (fill long) word for QEMU/PPC as required by BootX.John Arbuckle1-0/+18
Based upon an original patch by John Arbuckle <programmingkidx@gmail.com>. Signed-off-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@1078 f158a5a8-5612-0410-a976-696ce0be7e32
2012-12-07Redefine "to" word in device.fs to allow the current package to be set like ↵Mark Cave-Ayland2-4/+19
a standard value. BootX appears to be able to want to change the current package phandle by executing Forth statements in the form "<value> to active-package". This won't work correctly in OpenBIOS, since changing packages requires calling the active-package! word to perform additional housekeeping such as changing wordlists. The proposed solution here is to redefine "to" at the end of device.fs so that if package support is included, we perform an additional check on the destination xt to see if it matches that of active-package. If it does, then we manually invoke the active-package! word to select the new package. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1077 f158a5a8-5612-0410-a976-696ce0be7e32
2012-12-07Rework mac-parts.c to use CHRP-compliant partition search, followed by Apple ↵Mark Cave-Ayland1-78/+113
OF partition search. The confusion from the previous refactoring of mac-parts.c came from the fact that it must support searching for a boot partition using the algorithm specified in the OF CHRP bindings supplement, as well as Apple's brute-force partition-type search. This patch corrects mac-parts.c so that it will first attempt to find a CHRP boot partition, and if it does not exist or fails to boot, fall back to the first partition that would be considered valid by Apple's OF if one exists. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1076 f158a5a8-5612-0410-a976-696ce0be7e32
2012-11-29PPC: Rework assignment of keyboard devalias.Mark Cave-Ayland1-5/+30
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1075 f158a5a8-5612-0410-a976-696ce0be7e32
2012-11-29Add a default "decode-unit" word for devices that don't implement their own.Mark Cave-Ayland1-17/+22
When a device does not implement its own "encode-unit" word, OpenBIOS currently supplies a default implementation that encodes a hex string to a single cell. This commit does the same for "decode-unit" ensuring that it is also possible to open a device path containing a unit address generated by a device that doesn't implement its own "encode-unit" word. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1074 f158a5a8-5612-0410-a976-696ce0be7e32
2012-11-24PPC: Add keyboard device alias as a duplicate of stdin.Mark Cave-Ayland1-0/+8
This is required when attempting to boot Mac OS X. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1073 f158a5a8-5612-0410-a976-696ce0be7e32
2012-11-24Fix dir cd:,\ (no partition specified) when reading from Mac partitions.Mark Cave-Ayland1-4/+3
The existing checks in mac-parts,c were wrong; regardless of whether or not we have an argument string specified, if a partition is not specified then we must still search for the first valid partition. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1072 f158a5a8-5612-0410-a976-696ce0be7e32
2012-11-24Improve dir word by reducing complexity and adding some more diagnostics.Mark Cave-Ayland2-24/+5
Since the OF path resolution algorithm automatically passes anything following a ':' as an argument to the specified device, we don't need to bother with handling this ourselves. As a side effect, the auxiliary word split-path-device is no longer needed as we can isolate the path by doing a simple split on ','. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1071 f158a5a8-5612-0410-a976-696ce0be7e32
2012-11-23The spin word is set by BootX when Mac OS X is booting.John Arbuckle1-0/+10
Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1070 f158a5a8-5612-0410-a976-696ce0be7e32
2012-11-23PPC32: Enable local variables for the PPC32 build.Mark Cave-Ayland1-0/+1
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1069 f158a5a8-5612-0410-a976-696ce0be7e32
2012-11-23Implementation of Forth local variables for OpenBIOS.Mark Cave-Ayland3-0/+211
Some bootloaders, particularly OS X, execute Forth strings that make use of Forth local variables. This patch provides an implementation that allows OpenBIOS to execute such code. A couple of examples are included below: : diff.squares { A B -- A*A-B*B } A A * B B * - ; : myword { ; cat dog } 4 -> cat 5 -> dog cat \ cat's value pushed onto stack ( - cat) dog \ dog's value pushed onto stack (cat - cat dog ) + cr ." Total animals = " . cr ; Since the Forth locals stack and temporary dictionary take up extra space, the locals implementation is protected by a new CONFIG_LOCALS build variable. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1068 f158a5a8-5612-0410-a976-696ce0be7e32
2012-10-21amd64: Fix compilation from last commit to implement "dir" word for HFS+Mark Cave-Ayland1-1/+1
filesystem. UInt64 is always defined as long long, so use %lld in the printf format string rather than PRId64 which can change size depending upon platform. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1067 f158a5a8-5612-0410-a976-696ce0be7e32
2012-10-07Add initial implementation of "dir" word for HFS+ filesystems.Mark Cave-Ayland1-4/+137
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1066 f158a5a8-5612-0410-a976-696ce0be7e32
2012-10-07Fix HFS+ display for non-ASCII characters.Mark Cave-Ayland1-1/+4
Replace any non-ASCII characters with a ? to prevent display errors when converting from Unicode filenames. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1065 f158a5a8-5612-0410-a976-696ce0be7e32
2012-10-07Fix bug related to opening backup volumes in libhfsp's volume_open().Mark Cave-Ayland1-2/+11
The existing code in hfsp_volume.c tries to locate the alternate volume header at the block vol->maxblocks - 2. Currently for unwrapped HFS+ volumes, vol->maxblocks is never set from the main volume header once it is located and so it tries to find the backup volume at the (dummy) block 3 which inevitably fails. On a secondary note until towards the end of the function, volume_open() assumes the block size is 512 bytes. Therefore once we determine the size of the volume from the main volume header in blocks, we need to convert it from the block size indicated in the volume header to a fixed 512 byte block size in order for the alternate volume header to be located correctly. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1064 f158a5a8-5612-0410-a976-696ce0be7e32
2012-08-20ppc qemu: Increase PCI hole for heathrowAlexander Graf1-1/+1
The heathrow machine needs more PCI hole space than we provide. Increase its range by a bit. IIUC this still doesn't reflect the actual hole size, but neither do the Mac99 machines. We should probably compare values with the real hardware again. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1063 f158a5a8-5612-0410-a976-696ce0be7e32
2012-08-19fix ppc builds with ppc64 compiler and ppc64 linkerBlue Swirl2-3/+4
Need to specify ppc object code output arch (gcc/as -m32) and 32-bit C run-time (ldscript arch) when using ppc64 compiler and linker. Signed-of-by: Kenneth Salerno <kennethsalerno@yahoo.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1062 f158a5a8-5612-0410-a976-696ce0be7e32
2012-06-09Identify virtio-net devicesArtyom Tarasenko2-0/+9
Identify virtio network device in PCI probe. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1061 f158a5a8-5612-0410-a976-696ce0be7e32
2012-05-20Replace 'Qemu' by 'QEMU'Stefan Weil5-7/+7
The official product name is written 'QEMU'. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Andreas Färber <afaerber@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1060 f158a5a8-5612-0410-a976-696ce0be7e32
2012-05-19Sparc64: fix interrupt propertiesBlue Swirl5-1/+45
Add interrupt-map and interrupt-mask properties to host and ebus bridges and sprinkle interrupt properties to various devices. Based on hacks by Artyom Tarasenko. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1059 f158a5a8-5612-0410-a976-696ce0be7e32
2012-05-19pci: identify virtio-scsi devicesBlue Swirl2-1/+21
Identify virtio SCSI device in PCI probe. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1058 f158a5a8-5612-0410-a976-696ce0be7e32
2012-05-12Sparc32: avoid problems with SMP tableBlue Swirl1-0/+11
Check CPU ID if we're running on boot CPU. If so, don't use SMP table information since it may contain uninitialized or garbage values. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1057 f158a5a8-5612-0410-a976-696ce0be7e32
2012-04-28SPARC32: Swap Forth machine memory allocation over to OFMEM memory pool.Mark Cave-Ayland2-10/+19
Instead of using our internal memory pool to run the Forth machine, allocate the memory using OFMEM. This enables us to dramatically increase the memory available to Forth clients whilst reducing the memory requirement for the resulting image. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1056 f158a5a8-5612-0410-a976-696ce0be7e32
2012-04-28SPARC64: Swap Forth machine memory allocation over to OFMEM memory pool.Mark Cave-Ayland2-10/+20
Instead of using our internal memory pool to run the Forth machine, allocate the memory using OFMEM. This enables us to dramatically increase the memory available to Forth clients whilst substantially reducing the memory requirement for the resulting image. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1055 f158a5a8-5612-0410-a976-696ce0be7e32
2012-04-28SPARC64: Remove majority of the video initialisation hack.Mark Cave-Ayland4-30/+23
Now that we have OFMEM, as long as we have a PCI bus then we can configure the address of the framebuffer automatically without having an architecture-specific hack. The only thing we need to do is override the virtual address from the OFMEM phys == virt default. Similarly we can remove all reference to the video memory variables _vmem and _evmem since the memory is allocated outside of the OpenBIOS image. This commit also fixes another couple of issues: switch video.c to use virtual instead of physical addresses for architectures that require it (the default is the existing behaviour where phys_addr == virt_addr) and also correct the framebuffer size calculation which was also adding the framebuffer start address to size of the framebuffer to be mapped. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1054 f158a5a8-5612-0410-a976-696ce0be7e32
2012-04-28Remove architecture-specific routines from ofmem.h.Mark Cave-Ayland10-81/+85
This cleans up the OFMEM interface by allowing us to keep all of the architecture-specific code in separate header files; in particular ofmem_sparc32.h and ofmem_sparc64.h. PPC doesn't reference the variables from ofmem.h outside of ofmem.c, so simply redefine them as static variables. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1053 f158a5a8-5612-0410-a976-696ce0be7e32
2012-04-28SPARC64: Move ofmem_arch_map_pages()/ofmem_arch_unmap_pages() intoMark Cave-Ayland4-158/+160
ofmem_sparc64.c with all the other architecture-specific code. Note that we also take some of the ITLB/DTLB helpers with us. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1052 f158a5a8-5612-0410-a976-696ce0be7e32
2012-04-28SPARC64: Refactor tte-data code in preparation for moving architecture-specificMark Cave-Ayland3-53/+64
code to ofmem_sparc64.c. Note we also change pgmap@ so it explicitly searches for a TTE entry using architecture-specific code, plus add the code to detect whether a page is marked as locked or not into the main page mapping function. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1051 f158a5a8-5612-0410-a976-696ce0be7e32
2012-04-28SPARC32: Move ofmem_arch_map_pages() into ofmem_sparc32.c with all the otherMark Cave-Ayland3-89/+85
architecture-specific code. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1050 f158a5a8-5612-0410-a976-696ce0be7e32
2012-04-28Rename ofmem_arch_early_map_pages() to ofmem_arch_map_pages().Mark Cave-Ayland7-11/+11
This OFMEM call does actually map the page for the architectures that require it, so let's change its name so that we now have a symmetrical ofmem_arch_map_pages() and ofmem_arch_unmap_pages() API. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1049 f158a5a8-5612-0410-a976-696ce0be7e32
2012-03-17pci: fix BAR setupBlue Swirl2-3/+10
A change in QEMU on how PCI bridges are setup revealed a bug in OpenBIOS PCI setup. On Sparc64, the BARs just happened to get somewhat correct values by accident before the commit but not after the change. Don't use arch->io_base for PCI I/O port BARs. Fix Sparc64 PCI memory base. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1048 f158a5a8-5612-0410-a976-696ce0be7e32
2011-08-20ESP: clear Unit Attention condition after resetBlue Swirl1-6/+49
In recent QEMU, SCSI devices are in Unit Attention condition after reset and this made Read Capacity command fail. Fix by sending a Test Unit Ready command to the devices first. Also avoid division by zero if block size is 0 when Read Capacity fails. Thanks to Paolo Bonzini for analysis. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1047 f158a5a8-5612-0410-a976-696ce0be7e32
2011-08-08Make select-dev and unselect-dev compatible with OBP.Bob Breuer3-21/+25
From the 1275 errata for section H.8, select-dev and unselect-dev are pre Open Firmware, but not the same as open-dev/device-end. Make them Sun OBP compatible by pulling the functionality for select-dev/ unselect-dev out of (and simplifying) begin-package/end-package. For the Sun OBP definition of begin-package/end-package, along with descriptions and example usage, see the "Debugging and Testing FCode Programs" chapter of "Writing FCode 3.x Programs". Signed-off-by: Bob Breuer <breuerr@mc.net> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1046 f158a5a8-5612-0410-a976-696ce0be7e32
2011-07-14Fix Fcode table initialisation on SPARC32.Mark Cave-Ayland2-2/+2
Increase the Forth machine memory to 128K (also requiring a corresponding increase in OFMEM to 384K) to allow enough space for the Fcode tables to be initialised, and hence allow Fcode to be executed under SPARC32. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> Acked-by: Bob Breuer <breuerr@mc.net> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1045 f158a5a8-5612-0410-a976-696ce0be7e32
2011-06-17ppc: only clear MSR_SF when clearing high MSR bitsAlexander Graf1-1/+1
We are pretty aggressive now with how we clear the high MSR bits, clearing all of them when we find a 64-bit CPU. As Segher points out, this is not always a good idea though. There might be bits set that can be crucial for operation. Hence we should only clear MSR_SF, as that's the bit we're interested in. Reported-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1044 f158a5a8-5612-0410-a976-696ce0be7e32
2011-06-17ppc: fix mtmsr for SF settingAlexander Graf1-8/+32
When running openbios-ppc32 on a ppc64 VM, we need to unset SF on every interrupt to ensure that things still work. So far we've been using mtmsr for this operation, but according to the spec mtmsr doesn't set any bit above 32bit, so we were merely exploiting a bug in qemu before. This patch adds a runtime check on MSR_SF to see if we're running on a 64-bit capable CPU. If so, we use mtmsrd, which can set the high 32bits of MSR. CC: Andreas Färber <andreas.faerber@web.de> CC: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Alexander Graf <agraf@suse.de> --- v1 -> v2: - use segher's awesome MSR_SF detection git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1043 f158a5a8-5612-0410-a976-696ce0be7e32