| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Apple OF has parse-1hex, parse-2hex, parse-3hex words that may be used
by FCode ROMs so add these for compatibility
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
| |
Instead of reimplementing it several times use parse-nhex to decode
two hex numbers,
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
| |
Add parse-nhex word reusing existing parse-ints and use that in
parse-hex instead of an independent implementation. The parse-nhex
name matches Apple OF, while SLOF calls the same operation
hex-decode-unit so adding this word increases compatibility with other
OF implementations.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
| |
Some device trees can contain large chunks of binary data that result
in .properties output to get lost in the dump of all binary bytes. Put
an upper limit of the bytes dumped.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a GitHub push action that builds OpenBIOS for all of the currently
supported architectures (amd64, sparc32, sparc64, ppc and x86) and a new
GitHub release consisting of an output zip file containing debug and release
binaries, along with the source in .tar.gz and .zip formats.
A release build is triggered by pushing a tag beginning with "v" indicating a
version number in contrast to pushing a branch.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a GitHub push action that builds OpenBIOS for all of the currently
supported architectures (amd64, sparc32, sparc64, ppc and x86) and generates
an output zip file containing debug and release binaries.
The output zip file is stored both as a build artifact (which has a maximum
lifetime of 90 days) and for upstream OpenBIOS builds a "latest" release is
added to the repository.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
| |
This is a GitHub manual action that generates a container image from
docker/Dockerfile.builder and pushes the result to
ghcr.io/openbios/openbios-builder:master for public use.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces a new Dockerfile.builder file that can be used by docker
build to generate a container that can build OpenBIOS based upon Debian
11.2 and the crosstool compilers from kernel.org.
The installed cross-compilers allow the building of SPARC32, SPARC64 and
PPC binaries.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent versions of GDB (and probably older ones too, but not checked) crash
with and abort when loading the non-stripped 32-bit PPC QEMU build[1]. This
is due to a bug in GDB on reading stab symbols. The only place in OpenBIOS
where stab symbols are generated is in libgcc/crtsavres.S, which was copied
from the linux kernel[2].
Symbols that were defined in the stabs section are still able to be seen in
GDB after stabs removal. There does not appear to be a loss in debugging
functionality.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=28900
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/include/asm/ppc_asm.h?h=v5.17-rc4#n211
Signed-off-by: Glenn Washburn <development@efficientek.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
| |
Modern gcc compilers will fail to build x86 OpenBIOS failing with the error
message "libc/misc.c:20: multiple definition of `errno_int'" during link.
Since the accompanying comment mentions that the reason for adding the
definition is to allow compilation to succeed on OS X, surround it with
suitable #if defined(__APPLE__) ... #endif guards.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
| |
Modern 64-bit compilers with a gcc multilib-capable toolchain are easily able
to build x86 OpenBIOS. If the build is not gcc multilib-capable then the
build typically fails with the message "fatal error: sys/cdefs.h: No such file
or directory".
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
| |
Instead of using a constant frequency for all CPUs, use the processor timebase
frequency provided by QEMU. This fixes issues where delays from
ciface_milliseconds were not corresponding to elapsed time as given by the real
time clock on certain platforms, eg. QEMU's mac99 machine.
Signed-off-by: Glenn Washburn <development@efficientek.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An extra byte is written after the CUDA_GET_TIME command causing the
command to return an incorrect time. Running QEMU with CUDA debug
messages on yields these messages:
1177318@1642469573.070752:cuda_packet_receive length 3
1177318@1642469573.070768:cuda_packet_receive_data [0] 0x01
1177318@1642469573.070771:cuda_packet_receive_data [1] 0x03
1177318@1642469573.070773:cuda_packet_receive_data [2] 0xfb
1177318@1642469573.070776:cuda_receive_packet_cmd handling command
GET_TIME CUDA: GET_TIME: wrong parameters 2
Fix the outgoing command length to remove the extra byte.
Signed-off-by: Glenn Washburn <development@efficientek.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the processors from the 7450 family to pass the initial
PVR verification. Enables 7441, 7445, 7447, 7447a, 7450, 7451, 7455,
7457 and 7457a.
This should be used along with a QEMU that includes commit 1da666cd8e
("target/ppc: Disable software TLB for the 7450 family").
With Linux 5.15:
$ cd buildroot
$ make qemu_ppc_mac99_defconfig
$ make
$ qemu-system-ppc -m 1G -M mac99,via=pmu -cpu 7450 \
-kernel ./output/images/vmlinux \
-append root=/dev/sda \
-drive file=./output/images/rootfs.ext2,format=raw \
-net nic,model=sungem -net user -serial mon:stdio -nographic
>> =============================================================
>> OpenBIOS 1.1 [Jan 10 2022 13:27]
>> Configuration device id QEMU version 1 machine id 1
>> CPUs: 1
>> Memory: 1024M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,G4
(...)
Booting Linux via __start() @ 0x01000000 ...
(...)
Welcome to Buildroot
buildroot login:
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
Replace Qemu -> QEMU.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
| |
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a long-standing bug in the CUDA implementation of the reset-all and
power-off words whereby an extra byte is written after the CUDA_RESET_SYSTEM
and CUDA_POWERDOWN commands.
This extra byte used to be ignored in QEMU until commits 017da0b568 ("cuda:
port POWERDOWN command to new framework") and 54e894442e ("cuda: port
RESET_SYSTEM command to new framework") added a check which rejects the
command if the command length is incorrect.
Fix the outgoing command length to remove the extra byte which allows the
reset-all and power-off words to work in QEMU once again.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/624
|
|
|
|
|
|
|
|
|
| |
According to the ESCC datasheet all register values are undetermined until an
explicit reset command is sent. This is required to fix an issue with QEMU's
ESCC device to ensure that the registers are set to default values if the
default power-on values are changed.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
| |
This will be needed to allow uart_init_line() to reset the correct port.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
| |
In order to use inclusive terminology, rename pci_xbox_blacklisted()
as pci_xbox_ignore_device(), and remove an obvious comment.
Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
| |
LSI SCSI on PReP is the unique particular case where we use
fixed IRQ routing. All other cases use regular IRQ swizzling.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
Simplify using the is_apple() macro.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
| |
In commit ce7fa4d29b we adapted to match QEMU (invalid) code.
Now than QEMU has been fixed and handle the 4 IRQs, update the
OF device tree again.
Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Debian ports images have now switched from using yaboot to grub as their
bootloader. Recent versions of these images will hang rather than boot under
QEMU despite there being no obvious changes to the boot process.
Further investigation reveals that the second stage grub bootloader appears
to use low memory whilst loading the kernel/initrd from disk: unfortunately
the OpenBIOS vector table lives within the first few pages of physical RAM
and so grub writes over the vector table (in particular overwriting the MMU
fault handlers) causing them to fail next time they are executed which
causes the hang.
Fortunately just before this stage of the bootloader executes, it uses the
CIF to request the contents of the /memory node "available" property. It
seems that the low memory locations used by grub are taken from the start
of the available range, so we can simply increase the number of RAM pages
reserved at the bottom of RAM to ensure that the area chosen by the bootloader
doesn't conflict with the vector table.
This patch raises the start of available memory from 0x1000 to 0x4000 which
allows grub to boot successfully in my tests. According to dumps of device trees
taken from real PPC Macs there are already several examples where the start of
available memory is set to 0x3000 or 0x4000, so as this is already present on
real hardware it should not cause any regressions.
Finally it is worth noting that even in the earlier grub images I could see
write accesses to low memory that would overwrite the vector table: I think
that until recently we were lucky that they happened to avoid anything that
was critical to allow the kernel to load and boot.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
| |
OpenBSD uses the addr word to retrieve the address of several framebuffer
variables during initialisation. Provide an implementation of addr which
allows OpenBSD to initialise the framebuffer correctly on SPARC32 and SPARC64.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QEMU commit c9b7d9ec21 "virtio: increase virtqueue size for virtio-scsi and
virtio-blk" increased the number of queue descriptors from 128 to 256 which
caused OpenBIOS to fail when booting from a virtio-blk device under
qemu-system-ppc due to a memory overflow.
Update the virtio-blk driver so that it uses a maximum of 128 descriptor
entries (the previous value) to fix the issue, and also ensure that any
further increases in virtqueue size will not cause the same failure.
Note that this commit also fixes the vring_area size calculation which was
incorrectly based upon the number of virtqueues, and not the number of
descriptor entries.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In qemu 9d7bd0826f2d19f88631ad7078662668148f7b5f, the behavior of vring
processing was changed to not run whenever bus-mastering is disabled.
Since we were never enabling it in the first place, OpenBIOS was no longer
able to access virtio disks on qemu.
Fix this by enabling bus-mastering before initializing.
Signed-off-by: Brandon Bergren <git@bdragon.rtk0.net>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
| |
The previous attempt to fix this was wrong in that I misinterpreted what SILO was
doing: whilst it detects a free region of memory for the kernel/initrd, it simply
maps the areas at fixed addresses rather than allocating them.
Fixes: f633f31 "SPARC32: mark initrd memory as mapped and in use before booting kernel"
Fixes: c87d0eb "SPARC32: mark kernel memory as mapped"
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
| |
The previous attempt to fix this was wrong in that I misinterpreted what SILO was
doing: whilst it detects a free region of memory for the kernel/initrd, it simply
maps the areas at fixed addresses rather than allocating them.
Fixes: 3464681 "SPARC64: mark initrd memory as mapped and in use before booting kernel"
Fixes: c21c366 "SPARC64: mark kernel memory as mapped and in use before booting kernel"
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
| |
It is now possible to locate IDE drives by searching the device tree for "block"
type devices containing a C drive instance variable. Rewrite ob_ide_quiesce() to
locate and quiesce IDE drives using this method which finally enables us to
remove the global IDE channels list and its remaining ide_add_channel() function.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
| |
Rather than iterate over the global IDE channels list, use instance variables to
hold the relevant pointers. This allows us to remove ide_seek_channel() since
it is no longer necessary for each IDE device to iterate over the global list
in order to locate the drive/channel information.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
| |
volatile
Otherwise the compiler may not understand that a read from the assigned buffer
is comming from memory-mapped IO space and fail to update accordingly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
To help reading property listing also format assigned-addresses
property the same way as reg was already formatted.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
|
|
|
|
|
|
|
| |
This simplifies the open word by avoiding having to locate and read the value
of the _vdev property.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
It is also possible to remove the global_lsi variable by adding a pointer to
the parent lsi_private_t instance within sd_private_t.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
This simplifies the open word by avoiding having to locate and read the value
of the address property.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
Instead use an instance value and initialise the C instance parameter within
the open word.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
This is to ensure that the my-space and my-address words are set correctly
for any PCI devices that wish to execute FCode.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
Since the correct current instance is now being set during probe, there is no
need to explicitly set it whilst creating the device.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
Since the correct active package is now being set during probe, there is no
need to explicitly find the parent node before creating the device.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
| |
Now that all PCI devices have been converted to new-device...finish-device we can
set both the active package and current instance to the root device node before
probe, giving all child devices a correct active package and instance chain during
creation.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
| |
probe
Now that all PCI devices have been converted to new-device...finish-device we can
set both the active package and current instance to the root device node before
probe, giving all child devices a correct active package and instance chain during
creation.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
| |
Now that all PCI devices have been converted to new-device...finish-device we can
set both the active package and current instance to the root device node before
probe, giving all child devices a correct active package and instance chain during
creation.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Whilst the NVRAM device node exists under the mac-io device node for Old World
Macs, both itself and the Uninorth device node exist under the root device node
on New World Macs.
Move creation of both device nodes to arch_of_init() for New World machines to
enable the active package and current instance to be set correctly during device
tree construction.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
As part of this separation we can also move "update-nvram" directly to the
NVRAM node bindings.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
Now that we've removed all references to these binding macros they can be removed
completely.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
| |
The ob_pci_initialize() function can be removed as it is empty, whilst
ob_pci_empty_node is no longer required since the existing fallback code
will always apply the ob_pci_simple_node bindings if no callback is
configured.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
| |
Moving the setup of PCI devices to within a new-device...finish-device sequence
as part of the conversion further enables us to move the PCI host bridge
configuration logic from ob_pci_init() to ob_configure_pci_device() where it
belongs.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
| |
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
| |
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|