aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-10-22ide: locate drives by iterating over the device tree during ob_ide_quiesce()Mark Cave-Ayland1-22/+8
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>
2019-10-22ide: use instance values to hold C drive and channel structuresMark Cave-Ayland2-27/+15
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>
2019-10-17escc: explicitly mark variable containing incoming keyboard character as ↵Mark Cave-Ayland1-1/+1
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>
2019-10-12admin/devices.fs: Format assigned-addresses propertyBALATON Zoltan1-1/+1
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>
2019-08-18virtio: use instance value to initialise C instance parameterMark Cave-Ayland1-35/+11
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>
2019-08-18lsi: use instance value to hold sd_private_t pointerMark Cave-Ayland1-17/+25
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>
2019-08-18pc_kbd: use instance value to initialise C instance parameterMark Cave-Ayland1-9/+7
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>
2019-08-18pc_serial: remove separate init wordMark Cave-Ayland1-8/+5
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>
2019-08-18pci: call set-args before configuring PCI device nodesMark Cave-Ayland1-0/+21
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>
2019-08-18pci: remove explicit setting of my-self from PCI devicesMark Cave-Ayland2-9/+0
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>
2019-08-18pci: remove explicit find-device from PCI devicesMark Cave-Ayland13-51/+0
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>
2019-08-18x86: set active package and current instance to root device node before probeMark Cave-Ayland1-1/+8
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>
2019-08-18SPARC64: set active package and current instance to root device node before ↵Mark Cave-Ayland2-3/+6
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>
2019-08-18ppc: set active package and current instance to root device node before probeMark Cave-Ayland1-0/+6
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>
2019-08-18ppc: move New World uninorth and nvram device node creation to the root deviceMark Cave-Ayland5-7/+14
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>
2019-08-18nvram: ensure that NVRAM configuration is separate from NVRAM node creationMark Cave-Ayland2-4/+2
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>
2019-08-18libopenbios: remove REGISTER_NAMED_NODE and REGISTER_NAMED_NODE_PHANDLE macrosMark Cave-Ayland1-11/+0
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>
2019-08-18pci: remove ob_pci_initialize() and ob_pci_empty_nodeMark Cave-Ayland1-15/+0
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>
2019-08-18pci: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland1-53/+43
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>
2019-08-18virtio: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland1-4/+2
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18lsi: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland1-2/+5
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18lsi: don't change active package when setting device aliasMark Cave-Ayland1-6/+5
When generating the DT based upon the active package and current instance, we cannot change either when setting the alias. Instead look up the phandle and then set the properties directly. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18nvram: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland3-7/+37
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18usbhid: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland1-6/+14
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18pmu: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland1-48/+107
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18macio: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland1-50/+61
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18cuda: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland1-61/+100
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18escc: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland1-42/+72
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18adb: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland3-40/+82
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18ide: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland1-49/+80
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18floppy: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland1-31/+40
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18pc_serial: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland1-8/+14
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18pc_kbd: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland1-11/+14
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18libopenbios: introduce BIND_NODE_METHODS() macroMark Cave-Ayland2-0/+18
This macro is designed to bind C functions into Forth words during creation of the device tree, but only into an existing node and without attempting to create any missing parent nodes. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18ppc: reduce size of Forth dictionary to 384KMark Cave-Ayland1-2/+2
gcc 9 emits a fatal error when building OpenBIOS for ppc because the size of the generated image is greater than the available ROM area when building with -O0. Reduce the size of the Forth dictionary from 512K to 384K to allow sufficient space for generating OpenBIOS images suitable for debugging. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18all: gcc 9 build fixesMark Cave-Ayland6-8/+8
Fix up warnings generated by building with -Werror under gcc 9. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-06-26SPARC64: use serial console when QEMU is launched with -vga noneMark Cave-Ayland1-2/+11
If no display device has been installed in the DT e.g. passing -vga none into the QEMU command line then fall back to using the serial console as already occurs when launching QEMU in -nographic mode. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-06-26SPARC32: use serial console when QEMU is launched with -vga noneMark Cave-Ayland1-0/+8
If no display device has been installed in the DT e.g. passing -vga none into the QEMU command line then fall back to using the serial console as already occurs when launching QEMU in -nographic mode. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-06-26sbus: don't use internal fallback TCX driver with QEMUMark Cave-Ayland2-2/+16
OpenBIOS SPARC32 has always maintained a fallback option of an internal TCX driver if an FCode driver cannot be located on the TCX card itself. Since QEMU's TCX adapter has supported FCode payloads for a long time then we only require this logic for non-QEMU builds. Otherwise we unintentionally install the fallback driver and device node even if the framebuffer card hasn't been installed into the machine. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-02-08SPARC64: mark initrd memory as mapped and in use before booting kernelMark Cave-Ayland3-0/+14
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-02-08SPARC64: mark kernel memory as mapped and in use before booting kernelMark Cave-Ayland1-1/+7
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-02-08SPARC32: mark initrd memory as mapped and in use before booting kernelMark Cave-Ayland3-0/+14
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-02-08SPARC32: mark kernel memory as mappedMark Cave-Ayland1-1/+2
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-02-01SPARC32: fix obp_arg.argv when no kernel command line specifiedMark Cave-Ayland1-8/+8
Make sure that obp_arg.argv is set to an empty string if no command line is passed from QEMU. Otherwise the kernel will panic on startup when trying to access it. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-01-01SPARC32: divide physical memory reg property into SIMM-sized rangesMark Cave-Ayland3-7/+15
Currently the /memory node reg property is set to a single range encompassing the entire physical RAM of the machine. This seems to cause issues with Solaris when booting on QEMU SS-10 and SS-20 machines whereby having just a single entry causes the top of physical memory to be calculated incorrectly and triggers a panic on boot. Instead copy the behaviour of OBP which is to divide the reg property into a set of ranges representing the physical SIMM arrangement in the machine, which fixes the error and allows Solaris to boot under the QEMU SS-10 and SS-20 machines. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2018-10-0540p: change residual data model name to IBM PPS Model 6015Mark Cave-Ayland1-1/+1
With the corresponding QEMU patches applied, it is now possible to change the reported firmware name to that of a real 40p machine and boot to a working userspace with the Linux sandalfoot zImage.
2018-10-0540p: update interrupt routing code to match QEMUMark Cave-Ayland2-5/+24
Note that whilst guest OSs should be relying on residual data rather than the OF device tree to determine the hardware, we still update the interrupt properties to match the new code in QEMU for consistency. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2018-08-3140p: fix up generation of interrupt propertiesMark Cave-Ayland1-8/+7
Since support for QEMU's 40p machine has been added there is now the possibility of having a PPC architecture where !is_newworld() and !is_oldworld() are both true. Fix up a couple of instances in this logic that were preventing the generation of interrupt properties in the device tree for 40p machines. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
2018-08-31config: enable virtio-blk driver for default PPC and SPARC64 buildsMark Cave-Ayland2-0/+2
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2018-08-31drivers: add virtio-1.0 virtio-blk driverMark Cave-Ayland8-3/+1012
Note that as part of this commit we rename the legacy virtio-blk device node from "virtio-blk" to "scsi" to match up with the QEMU fw path generator. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>