qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] Enabling Debugging?


From: Jd Lyons
Subject: Re: [Qemu-ppc] Enabling Debugging?
Date: Wed, 1 Feb 2017 14:16:59 -0500


On Feb 1, 2017, at 12:00 PM, address@hidden wrote:

On Tue, 31 Jan 2017, Jd Lyons wrote:
I?m trying to find out why Mac OS X Server 1.2v3, and all the other 
versions of OS X Server from 1.x, don?t have any input( KBD/Mouse ). I 
got Sever installed, if you give it the right OF tweeks and a 
pre-partitioned drive image, it will install, without any input from the 
user.

I can boot it, after it installs, from the HD image, but I can?t use it 
, b/c no keyboard and mouse. So, I?m trying to figure out how to debug 
that. It doesn?t hang, or crash, it just sits there, waiting for input.

It registers the ADB kbd/m on startup, in verbose mode, so I?m not sure 
where the trouble is.

That?s with the g3beige target machine, with the mac99 target machine, 
it either hangs upon the start of [MPC} or it Kernel Panics. I?ll look

I know nothing about g3beige but it could be that the emulation is not 
complete or some difference makes OS X not find the hardware. To solve it 
you would need to find what OS X tries to do and what's different on QEMU. 
Instead of running in a debugger you might first try enabling debug 
#defines or traces in the parts you are interested in (ADB in this case) 
then use a debugger when you already know what are you looking for.

On mac99 I've found that these patches to OpenBIOS were necessary to 
get USB working (also the other two mentioned in the commit message):
https://www.coreboot.org/pipermail/openbios/2017-January/009867.htm

Thanks for the reply, sorry, 404 error on the above link.

There was also a 4th patch:
https://www.coreboot.org/pipermail/openbios/2016-November/009827.html
but that was already merged. The problem was with IRQ routing and setting 
up the pci parameters of the card due to missing/wrong info in the device 
tree which caused the OS to poke the wrong memory addresses.

into that later. tho I do have a question, for anyone that knows, why 
does Qemu put and ADB on mac99( G4 Agp Graphics )?

The Sawtooth didn?t have an ADB bus, that I remember, I think the G3 B&W

The mac99 in QEMU is not any real Macintosh, it's just some machine 
assembled from the parts we have emulation for which is somewhat 
resembling a G4 AGP but it's not yet there. It started as G4 PCI before 
but was updated to get more OSes running on it. It is just enough to get 
some OS running but not claiming to be even close to real hardware at this 
point. The OSes just run on it because they have drivers and detect the 
devices irrespective of the machine even if no such real machine exists. 
But sometimes this does not work and the OS can get confused. There are 
some unmerged patches by Benjamin Herrenschmidt to bring it closer to the 
G4 AGP which is the mac99p in his WIP tree.


How do I find Ben’s brach, I know dumb question, but, I’ve always had trouble getting git to download a brach, and I have no clue where the bench is.

I tried passing -usb -device usb-hub,bus=usb-bus.0,port=1 -device 
usb-mouse,bus=usb-bus.0,port=1.2 -device usb-kbd,bus=usb-bus.0,port=1.1 
to Qemu, and they did register in the Kernel, when Server boots in 
verbose mode, but they don?t work either.( g3beige boot will hang if USB 
kb/mouse are on different buses ).

I also tried, -usb -device usb-host,hostbus=4,hostaddr=1, altho that 
isn?t recommend by lsusb, it does work in Mac OS 9.2.1 and OS X 10.2/3.

When passing through a device make sure no driver is attached to it in the 
host otherwise the two drivers talking to it (on host and in the guest) 
would surely make bad things happen. This may be the reason lsusb not 
recommending it.

It hands the wireless receiver from my KB/M to the guest OS. Tho, when I 
give any input to OS X Sever, after the USB drivers load, the OS X 
Server freezes.

Did the G3 beige had USB? If not maybe there is no driver in the OS or the 
driver meant for other machines does not expect the hardware QEMU is 
emulating. For mac99 just -device usb-kbd -device usb-mouse should be 
enough but Mac OS X Server 1.2v3 may have a limitation with USB itself. 
I've found this searching for this OS version:

"Detects USB devices on only one of your computer's USB ports at a time. 
To use a USB mouse, connect it to your keyboard or only connect a USB hub 
to one of your computer's port and plug all of your devices on the hub.”

It seems that v1.x of Sever is hardcoded to create a ADBKbd and mouse, likely if it detects Via-Cuda, or add in the device tree, I bet USB kbd/m won’t even work on Server v1.x, on a real Beige G3. I removed the ADB keyboard and mouse from the device tree, and Sever still listed them in a verbose boot. I’m not sure if it’s BootX or the Kernel, but the adb kbd is address@hidden, and the mouse is address@hidden in Qemu, and I think it it may need to be address@hidden for Server v1.x. That’s the only thing I can think of, why it’s not working.






Regards,
BALATON Zoltan

Thanks, Balaton.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]