Age | Commit message (Collapse) | Author | Files | Lines |
|
Some bootloaders use the IEEE1275 memory words to allocate blocks of memory
which are less than PAGE_SIZE. With an incorect page size, OFMEM would
allocate entries that were only aligned to 4K. This caused a problem whereby
when memory was reallocated by OpenBIOS, the resulting TLB flush would be
at the wrong address, silently fail, and hence cause a crash when the
reallocated virtual address was first accessed.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1243 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Since OFMEM was originally based upon the PPC architecture (with 4K page size),
there are still some places that use hardcoded values to calculate alignment.
Replace these with equivalents that use the current architecture PAGE_SIZE.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1242 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This commit moves the declaration of PAGE_SHIFT (the number of bits in a page)
into architecture-specific header files. This is required for a subsequent
commit to ensure that OFMEM can correctly unmap pages on architectures where
PAGE_SHIFT != 12 (4K page size).
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1241 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@1240 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Add arm32 to the whitelist for handling lack of int128 type variants.
Otherwise we get errors like:
/target/include/asm/types.h:79:1: error: unknown type name ‘__int128_t’
typedef __int128_t dcell;
This may introduce issues building on aarch64 but I have no way to test.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1239 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
When booting from a device with no arguments (such as "disk"), the resulting
partition id string would be NULL causing an exception when setting up the
romvec slice identifier. In the case where no slice is specified, we simply
set the partition to 0 in order to preserve existing behaviour.
This fixes booting from hard disk on QEMU as reported by Paul Wilhelm and
Aurelien Jarno.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1238 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
The load() API was incorrect in that it did not push the resulting loaded
file size onto the Forth stack. This caused a stack underflow in the Forth
$load word, except for devices which were interposed (such as those with
partition arguments).
Fix the load() function so that the resulting size is pushed onto the Forth
stack as per the load package method description in IEEE1275. Since the
loaders access load-base directly then currently the address argument is
dropped.
This exposed another bug whereby disk-label would explicitly drop the address
parameter from the stack for non-interposed packages. Remove this as it is
now consistently handled in load() for all cases.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1237 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Trying to compile OpenBIOS for SPARC32 on a SPARC machine, I get a
SIGBUS within forthstrap, more precisely accessing reloc_table in
load_dictionary. This table is not aligned because the dictionnary
head as a size which is not a multiple of 4.
This is due to the file QEMU,tcx.bin which is being encoded, and which
has a size which is not a multiple of 4. Fix that by adding some padding
after the encoded data.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1236 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
The default PPC configuration now includes a PC keyboard driver for PReP
machines, and adds it as a device node in the ISA bridge. This provides
a working keyboard in graphical mode for PReP machines.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1235 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This is its real home according to device tree samples that I can find.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1234 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Here we simply allow the ISA bridge to be detected during PCI bus enumeration
and implement a stub callback so that devices can be added later.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1233 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This patch follows on from the previous patchsets and provides a basic PReP
serial console when launched under QEMU with -nographic. This is done by
including the PC serial driver as part of the PPC binary build and setting
up a prep_console_ops structure for use when PReP architecture is detected.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: Andreas Färber <afaerber@suse.de>
CC: Hervé Poussineau <hpoussin@reactos.org>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1232 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
In order to allow architectures to support both ESCC and PC serial, add an
escc_ prefix to the ESCC serial functions so that they can both co-exist
within the same binary.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: Andreas Färber <afaerber@suse.de>
CC: Hervé Poussineau <hpoussin@reactos.org>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1231 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Some architectures require different console configurations depending upon the
machine type. This commit moves the console handlers into a struct _console_ops
structure held within libopenbios and switches all our supported architectures
over to use it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: Andreas Färber <afaerber@suse.de>
CC: Hervé Poussineau <hpoussin@reactos.org>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1230 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
PCI devices having memory BARs are now accessed at the right address.
This at least fixes the QEMU video card, which is now able to display
the OpenBIOS prompt.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Acked-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1229 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This patch corrects the PCI configuration and data IO port addresses, along
with detection of the Raven PCI bridge. With this in place, we can now
enumerate a PReP PCI bus.
Reported-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1228 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1227 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Instead of using two different variables to track the absolute values of the
PCI memory base and the host memory base, change the host memory base to be
an offset which is added to the PCI memory base during conversion. As a
consequence of this, the code in pci_bus_addr_to_host_addr() can be unified
to be consistent across all architectures.
Note that this commit also renames arch->host_mem_base to arch->host_pci_base
in order to better describe its function.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1226 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This patch corrects two long-standing bugs with PPC PCI configuration space
access. Firstly fix the calculation of PCI configuration space addresses by
the PCI_ADDR macro; this was incorrectly using arch->cfg_base which is the
mapped address and has nothing to do with the PCI configuration space
address. Instead just set bit 31 to initiate a configuration cycle as per the
PCI specification.
Secondly, fix pci_config_read32() and pci_config_write32() which were
incorrectly adding the register offset to the PCI IO dataport address causing
them to write into unknown address space for registers > 0. It appears that
this only worked purely by coincidence with QEMU due to the way in which the
configuration address was calculated for an oversized PCI configuration IO
dataport MemoryRegion.
Reported-by: Hervé Poussineau <hpoussin@reactos.org>
CC: Hervé Poussineau <hpoussin@reactos.org>
CC: Andreas Färber <afaerber@suse.de>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1225 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
PReP does not have MacIO, so don't call its functions arch_*.
Instead, dispatch from arch_* functions to macio_* functions
via is_apple().
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1224 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Change the SBus logic so that we first probe each slot and attempt to execute any
FCode if present. Only if no FCode is found do we fall back to the internal
(hardwired) device node generation.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1223 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@1222 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Signed-off-by: Bob Breuer <breuerr@mc.net>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1221 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Implement a trivial data fault handler for SPARC32 to skip over a faulting
instruction when the ignore_dfault variable is non-zero.
Signed-off-by: Bob Breuer <breuerr@mc.net>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1220 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Add hooks for hardware specific fault handlers for the peek and poke commands.
Signed-off-by: Bob Breuer <breuerr@mc.net>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1219 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Add a simple TLB flush to handle the case where a virtual address is
reallocated by OFMEM and now points to a different physical address.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1218 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Since the VBE initialisation is now done as part of the Forth driver, this can
now be completely removed. The tiny bit of code remaining for ROM detection is
moved into pci.c.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1217 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Since all of the colour state is now held in Forth, remove the hack
that was video_set_color(). Anything that needs to change the pallette
(including MOL) can just call "color!" on the driver package.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1216 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Finally we can now fix up setup_video() so that it has no knowledge of fixed
addresse but simply refers to the underlying Forth variables as per the
specification. Touch up various places as a result of this, but we can now
remove the bogus openbios-video-addr and just use frame-buffer-adr instead.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1215 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@1214 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
appropriate
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1213 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Implement a C wrapper around the Forth probe-self word and test it by moving
TCX package properties to tcx.fs.
Note that the probe-self-sbus word is currently hard-coded to invoke the TCX
driver FCode - this is only temporary and will be replaced when we have a
working cpeek implementation.
Also remove the creation of the SUNW,tcx package from tree.fs since this is
now done as part of probe-self-sbus.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1212 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
As these pass requests up the instance chain, make sure we do the real work
in the IOMMU map-in and map-in words too.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1211 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This means we can remove this code from vga_vbe_init() and move it
in to the generic display system. As part of this, we alter the
"input" and "output" words so that they update the stdin/stdout
handles under /chosen.
While we are here, fix up the various architectures so that they
don't call "input" and "output" themselves - this is now handled
by the Forth console.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1210 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Previously the romvec stdin/stdout ihandles were configured so that they were
set to the current stdin and stdout paths at initialisation time. Unfortunately
as stdin/stdout can be changed with the input and output words, they can end
up pointing to invalid ihandles causing a crash when trying to output to the
console.
Fix this by pointing the romvec structure to the address of the stdin/stdout
variables so that they are always in sync. Similarly we also resolve the
text path stdin/stdout variables at boot time to ensure that they will never
be stale.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1209 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@1208 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Here we move the code to map the PCI framebuffer into Forth. This is done by
introducing a "pci-map-in" word on the /pci node to enable Forth code to
perform memory-mapping as required.
This is a slight departure from the specification which requires a "map-in"
word, but this is because the OpenBIOS PCI bus enumerator *always* configures
BARs regardless of whether or not an FCode payload is detected. In order to
avoid having to rewrite the bus enumeration code in Forth, we instead create
a "pci-bar>pci-region" word which takes the BAR register as a parameter and
returns the configured BAR bus address and size. This can then be passed to
the "pci-map-in" word in order to do the work.
Finally with this in place, we can remove the mapping that takes place in
vga_vbe_init().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1207 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This now leaves just the MOL code in packages/molvideo.c and so now we no
longer have a mixture of MOL and non-MOL methods in this packages. As a
result of this, we can now conditionally build molvideo.c only if CONFIG_MOL
is defined.
(Note: I have no way of testing this as I gather that OpenBIOS was pulled from
MOL due to compatibility issues at some point in the past. Perhaps one day
someone will try and update and see what happens?)
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1206 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This includes the low-level VGA register accesses and also the package
properties.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1205 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
The kernel implementation for the above words is incorrect because the
value/reg parameters are the wrong way around.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1204 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@1203 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Similar to ofmem_release_phys() and ofmem_release_virt(), create a new
function to release memory claimed with ofmem_claim_io().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1202 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This means that when we call the OFMEM release functions, we actually return
the memory range back to the pool for re-use rather than constantly
allocating a new range every time.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1201 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Bring these up to date so that they now work with the current version of the
code.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1200 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Fixing up the generation of bootpath in r1167 exposed a bug since the romvec
parameters were set depending upon hard-coded values of certain aliases in
bootpath. As aliases are now expanded beforehand, the code to set the
old-style parameters was no longer being called.
Rework the code to set these parameters based upon device name instead,
and while we're there change the code to use the my-* words to get
their information rather than string parsing.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1199 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Annex B.2 of the IEEE1275 specification mentions that this code moves the
cursor one position to the left on the current line (i.e. it shouldn't
attempt to redraw any characters).
Remove the character redraw code to bring in line with the specification
which also has the side-effect of fixing the spinner used by quik.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1198 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
NULL is defined as a no-op, so make sure that we detect it and exit (term-emit)
immediately. Otherwise we fall through to the default code which redraws the
character and advances the column by 1.
This fixes the staggered line output that appear in quik.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1197 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
When processing a control code, make sure we exit (term-emit) immediately
rather than falling through to the end of the function. Otherwise we still
call draw-character and advance the column as per normal character codes.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1196 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Now that the second half of the display rework is complete, the qemu-video-*
words are no longer QEMU-specific. This is because we now initialise the
defaults to the value of the VGA_DEFAULT_* constants and only attempt to
override them with the values supplied by the QEMU firmware interface if
built with CONFIG_QEMU enabled.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1195 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Currently we cannot read the FCode from the card, so for the moment simply
execute the bytecode directly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1194 f158a5a8-5612-0410-a976-696ce0be7e32
|