Hello,
I'm trying to improve the emulation of new world Macs (mac99) in QEMU and
noticed that OpenBIOS does not support usb keyboards thus it currently
cannot be used with qemu-system-ppc64 -machine mac99 and still uses an ADB
keyboard for new world G4 mac that usually have USB keyboards. Because of
this I have looked at adding a usb driver to OpenBIOS.
I was looking for other open source drivers to adapt but most I could find
were GPLv3 (Grub), LGPLv3 (SeaBios) which are incompatible with the
current OpenBIOS license or too difficult to adapt (Linux). This mostly
left the driver in Coreboot's libpayload library
(http://review.coreboot.org/gitweb?p=coreboot.git;a=tree;f=payloads/libpaylo…)
which is BSD licensed that I gave a try. It wasn't too difficult to port
to OpenBIOS but when I tried to use it it turned out that it does not
handle the device being little endian on a big endian host and thus does
not work correctly with ppc (but it might work on little endian hosts, I
didn't test that; Coreboot libpayload seems to only support x86 and
armv7.)
Fixing this is a bit tedious that I don't feel like doing now, I'd rather
work on other problems towards my goal of running MorphOS on QEMU instead
but I'd like to share the results so far in case someone wants to look at
it, has any idea how to easily fix the endianness problem or maybe help
with finishing it. Or if someone knows about another simple boot time
driver that could be adapted instead and works correctly on big endian
hosts please let me know.
The current work in progress version can be found here:
http://goliat.eik.bme.hu/~balaton/openbios-usbhid-driver-wip.tar.xz
Any comments/help are welcome.
Regards,
BALATON Zoltan
This patchset is a result of my work to get the *BSD kernels to boot under QEMU
SPARC64, and should be applied on top of the timer patchset previously posted.
With these patches applied we now get the following:
- NetBSD kernels start and enumerate PCI devices but panic due to
missing device properties
- Old OpenBSD kernels start and enumerate PCI devices but panic due
to missing device properties
- New OpenBSD kernels trap soon after trap table takeover (possible
window fill/spill issue?)
- FreeBSD kernels start and die during PCI device enumeration similar
to above but seem to stop console output after trap table takeover?
The first four patches fix bugs which enable us to unmap page zero on SPARC64
to catch NULL dereferences (in line with all other architectures) and helped further
reveal the bugs fixed by the subsequent patches.
Mark Cave-Ayland (7):
pc_serial.c: fix up missing address property
pc_kbd.c: fix up reg property and missing address property
SPARC64: fix NULL pointer reference when attempting kernel boot
SPARC64: Remove zero page mapping from MMU to enable detection of
NULL pointer dereferences
SPARC64: fix up translation property mode to make it a valid TTE
ciface.fs: handle buggy callers to test-method
SPARC64: only map 8MB RAM on startup
openbios-devel/arch/sparc64/boot.c | 40 ++++++++++++++-------------
openbios-devel/arch/sparc64/ofmem_sparc64.c | 6 ++--
openbios-devel/drivers/pc_kbd.c | 15 +++++++++-
openbios-devel/drivers/pc_serial.c | 6 ++++
openbios-devel/forth/system/ciface.fs | 25 +++++++++++++----
5 files changed, 64 insertions(+), 28 deletions(-)
--
1.7.10.4
This patchset came out of the work from a following SPARC64 patchset and
contains a basic SPARC64 timer implementation based upon the %tick register.
In addition to this, there is some extra refactoring to enable get-msecs
to work across all platforms, and then finally a patch to use this to realise
an implementation of the milliseconds CIF service.
Mark Cave-Ayland (5):
SPARC64: fixup 100Hz timer interval
SPARC64: increment ms counter at obp_tick_pointer on every timer
interrupt
SPARC64: add basic get-msecs implementation
other.fs: rework get-msecs word so it can be shared cross-platform
ciface.fs: implement milliseconds service
openbios-devel/arch/sparc64/entry.S | 2 +-
openbios-devel/arch/sparc64/openbios.c | 6 ++++++
openbios-devel/arch/sparc64/vectors.S | 20 ++++++++++++++++++--
openbios-devel/forth/device/other.fs | 21 +++++++++------------
openbios-devel/forth/system/ciface.fs | 5 +++--
5 files changed, 37 insertions(+), 17 deletions(-)
--
1.7.10.4