aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2024-04-16Change malloc to take size_t as argumentAmadeusz Sławiński1-1/+1
Should not affect behaviour as it just calls ofmem_malloc which takes size_t as argument anyway. Reported when build with -Wbuiltin-declaration-mismatch. Signed-off-by: Amadeusz Sławiński <amade@asmblr.net> 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-Ayland1-0/+2
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-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-18nvram: convert to use BIND_NODE_METHODS() macroMark Cave-Ayland1-1/+3
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-08-18libopenbios: introduce BIND_NODE_METHODS() macroMark Cave-Ayland1-0/+8
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-02-08SPARC32: mark initrd memory as mapped and in use before booting kernelMark Cave-Ayland1-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-Ayland2-0/+11
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>
2018-08-31SPARC64: fix endian naming of architecture in_*() and out_*() functionsMark Cave-Ayland2-21/+20
For reasons lost in the history of time, the SPARC64 endian accessors were given the opposite names to their function i.e. out_le32() would use a standard load whilst out_be32() would use a little-endian load. Switch them around so that their implementation matches their name (and also that of all other architectures). Note that since the references in the inb/inw/inl and outb/outw/outl wrappers are also swapped around then these accessors for legacy ioports (i.e. little endian) will still behave exactly the same as before. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2018-06-09ppc: add fw_cfg interface for passing VIA/ADB configuration from QEMUMark Cave-Ayland2-0/+11
This is in preparation for allowing OpenBIOS to detect the difference between CUDA/PMU hardware and build the device tree accordingly. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2018-05-26libopenbios: add PReP boot partition loader for PPCMark Cave-Ayland1-0/+24
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2018-05-26ppc: add PReP residual data blockMark Cave-Ayland1-0/+116
This is borrowed from OpenHackWare in order to provide hardware data to the client OS. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2018-05-26pci: add driver for LSI 53C810 SCSI controllerMark Cave-Ayland2-0/+7
This is to enable booting PReP machines in OpenBIOS. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2018-05-26pci: add AMD PCNET information to PCI databaseMark Cave-Ayland1-0/+3
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2018-05-26SPARC32: implement dvma_sync() function for synchronising DMA memoryMark Cave-Ayland1-0/+1
This is required for ensuring that CPU memory is coherent after DMA operations have completed. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2018-05-26SPARC32: move pgtsrmmu.h from arch/sparc32 to include/arch/sparc32Mark Cave-Ayland1-0/+223
This is to enable us to use its functions for the upcoming DMA functionality. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2018-05-26SPARC32: implement dvma_map_in() for DMA IOVA to phys translationMark Cave-Ayland1-1/+2
Rather than have dvma_alloc() store the result of the physical translation in the specified location, use the fact that we now have contiguous physical DMA memory to implement dvma_map_in() to perform the translation separately. This allows us to remove the pointer to the physical address parameter to dvma_alloc() and instead perform the translation in esp.c by calling dvma_map_in() separately. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-09-06pci: add Intel e1000 network device to PCI databaseMark Cave-Ayland1-0/+1
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-09-06pci: add SUN hme network deviceMark Cave-Ayland1-0/+1
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-09-06pci: add basic support for Apple SunGEMMark Cave-Ayland1-0/+1
No driver, but we read the MAC address from the chip and write it into the device-tree where Linux and MacOS look for it. We also set the right compatible property for MacOS to pick it up. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-07-12arch: remove rbase and rlen from pci_arch_t for all PCI architecturesMark Cave-Ayland1-2/+0
This is now handled by the host_ranges property so remove all remaining references. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-07-12pci: move memory type enum from drivers/pci.c to include/drivers/pci.hMark Cave-Ayland1-0/+7
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-07-12pci: define pci_range_t typedef and add it to pci_arch_t structMark Cave-Ayland1-0/+10
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-07-12pc_kbd: add optional mouse device support for 8042 devicesMark Cave-Ayland1-2/+2
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-06-08Remove obsolete email addressesStefan Reinauer2-2/+2
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-04-20fw_cfg: implement fw-cfg-read-file Forth wordMark Cave-Ayland1-0/+1
Implement fw-cfg-read-file Forth word as a simple wrapper around fw_cfg_read_file(). Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-04-20fw_cfg: add fw_cfg_find_file() and fw_cfg_read_file() functionsMark Cave-Ayland1-0/+15
These allow OpenBIOS to locate fw_cfg files by name and then read them via the fw_cfg interface. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-02-10Fix spelling mistakesEdward Betts6-6/+6
Signed-off-by: Edward Betts <edward@4angle.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-10-23SPARC64: set upper bound for virtual memory allocationsMark Cave-Ayland1-0/+2
Comparing with real device trees, the maximum virtual memory address available for allocation on sun4u machines is 0xff000000. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-10-23SPARC32: fixup available memory list and modify ofmem_arch_get_virt_top()Mark Cave-Ayland1-1/+1
In preparation for applying the ofmem_arch_get_virt_top() restriction to the virtual memory region, fix up the calculation of the available list tail plus increase the virtual memory region to cover the IO memory. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-10-22ppc: don't use virtual image stack for startup contextMark Cave-Ayland1-1/+1
Part of commit 070ea60 created a new stack within the virtual image for use by the startup context. Unfortunately the current implementations of virt_to_phys() as used by some drivers are incorrect which causes issues with some parts of OpenBIOS, notably the USB stack. Revert back to using the initial stack in start.S which ensures a 1:1 mapping between virtual and physical addresses to avoid such problems. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-09-11libopenbios: remove address parameter from start_elf()Mark Cave-Ayland1-1/+1
Now that each loader sets up its own context, there is no need to pass in the address or set up the context ourselves. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-09-11xcoff: implement load/init-program as per IEEE-1275 specificationMark Cave-Ayland1-1/+1
load should place the file at load-base, whilst init-program should parse the memory at load-base and set up the context accordingly. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-09-11bootcode: implement load/init-program as per IEEE-1275 specificationMark Cave-Ayland1-0/+2
load should place the file at load-base, whilst init-program should parse the memory at load-base and set up the context accordingly. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-09-11libopenbios: move go() function into libopenbiosMark Cave-Ayland1-0/+2
Add an (arch-go) hook for architectures that need to do their own thing before starting an image, and switch the callers over to use it. Also clarify the state-valid check: any non-zero value is considered true. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-09-11libopenbios: move prototypes for start_elf() and __context into libopenbiosMark Cave-Ayland1-0/+3
Also fix up the incorrect x86 prototype which is missing the volatile qualifier. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-09-11libopenbios: add context wrappers for Fcode/Forth payloadsMark Cave-Ayland1-0/+3
This enables them to be launched from a native context. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-09-11libopenbios: introduce arch_init_program() in preparation for per-arch ↵Mark Cave-Ayland1-0/+1
implementations Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-09-09pci: add PCI database entry for rtl8139 network cardMark Cave-Ayland1-0/+1
This is taken from a patch submitted earlier by BALATON Zoltan <balaton@eik.bme.hu>. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-07-08ppc: add new context handlerMark Cave-Ayland1-1/+1
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-01-04libopenbios: introduce new get_path_from_ph() helper functionMark Cave-Ayland1-0/+1
This helper function returns the full device path for the device with the given phandle as a string. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1368 f158a5a8-5612-0410-a976-696ce0be7e32
2015-12-29SPARC64: introduce new Forth context stack (fcstack) for CPU contextsMark Cave-Ayland1-1/+1
The fcstack holds a stack of complete CPU states which can be used to enable re-entrant calls into Forth (e.g. when processing interrupts). Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1360 f158a5a8-5612-0410-a976-696ce0be7e32
2015-11-06bootstrap: don't include files from target/include as system includesLaurent Vivier1-8/+0
Replace "-I" by "-iquote" to only take files from this directory when '#include "..."' is used ('#include <...>' works as usual). We need this because on powerpc64 asm/sigcontext.h includes <asm/elf.h> and tries to include target/include/asm/elf.h instead of /usr/include/asm/elf.h. We also remove from include/arch/ppc/types/h some useless and conflicting type definitions. Signed-off-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1358 f158a5a8-5612-0410-a976-696ce0be7e32
2015-10-23ppc: add ob_ide_quiesce() and call it from the PPC CIF quiesce wordMark Cave-Ayland1-0/+1
Add a new ob_ide_quiesce() function and hook it into QEMU PPC's ciface_quiesce() routine to properly prepare the drives for transferring control to the operating system. Without this OS 9 becomes confused about the initial drive state on boot and refuses to correctly detect and initialise it. Based upon an original patch by Cormac O'Brien <cormac@c-obrien.org>. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1353 f158a5a8-5612-0410-a976-696ce0be7e32
2015-05-12OFMEM: remove ofmem_arch_get_phys_top() implementationMark Cave-Ayland1-1/+0
Since the previous commit, the value of ofmem_arch_get_phys_top() is now the same across all architectures. Hence we can now remove this and just use the physical memory size directly. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1338 f158a5a8-5612-0410-a976-696ce0be7e32
2014-08-25Add USB OHCI + HID driverBALATON Zoltan2-0/+9
This driver is ported from CoreBoot's libpayload and fixed to work on big endian CPUs (tested on PPC with QEMU). It is enough to support a USB keyboard on an Apple Keylargo OHCI compliant USB host and makes OpenBIOS usable on qemu-system-ppc64 with mac99 machine type as well as allows to emulate PowerMac3,1 better. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1316 f158a5a8-5612-0410-a976-696ce0be7e32
2014-07-13Mac99: Support flat NVRAMAlexander Graf1-0/+1
The mac99 machine is switching to use a flat NVRAM layout. Support that hint and treat NVRAM as flat when we find it. We keep the old (broken) shifted-by-1 way of accessing NVRAM around to be able to use new OpenBIOS binaries on older QEMU versions. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1307 f158a5a8-5612-0410-a976-696ce0be7e32
2014-05-25arch/ppc/qemu: Clean up and add more cpu infosBALATON Zoltan1-0/+1
Removed unused clock_frequency member from struct cpudef which is get from FW_CFG and added bus-frequency property to complete the frequency properties. Also added tlb infos to CPU properties. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1304 f158a5a8-5612-0410-a976-696ce0be7e32
2014-04-04OFMEM: redefine OFMEM_TRACE macro so that it always compilesMark Cave-Ayland1-2/+8
Make sure that we always compile the OFMEM_TRACE macro regardless of whether CONFIG_DEBUG_OFMEM is set, similar to the way in which the DEBUG macros work in QEMU. This relies on the fact that the compiler optimiser will work out that the compile-time "if" test is always true/false and optimise the result out if is it not required. This ensures that we always get proper debug argument checking and means that certain sections of code don't keep giving unused variable warnings when they only appear in debug codepaths. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1285 f158a5a8-5612-0410-a976-696ce0be7e32
2014-02-16SPARC32: properly handle SS-5, SS-10 and SS-20 timers/interruptsOlivier Danet1-1/+1
SparcStation 5 has 1 timer and 1 per-cpu interrupt controller. SparcStation 10/20 has 4 timers and 4 per-cpu interrupt controllers, independently from the number of CPUs installed. Timer and interrupt controller properties are set accordingly. This is what Sun's OpenBOOT does and having only 1 timer/interrupt declared on SS5 is necessary for NextSTEP. 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@1261 f158a5a8-5612-0410-a976-696ce0be7e32
2013-12-16SPARC64: increase PAGE_SHIFT to 13 (8K page size)Mark Cave-Ayland1-1/+1
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