Age | Commit message (Collapse) | Author | Files | Lines |
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|