[OpenBIOS] [RFC 3/3] SPARC32/64: Mimic Sun's OBP behaviour if a divide by zero occurs.

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Fri Jan 11 12:19:27 CET 2013


On 11/01/13 11:05, Artyom Tarasenko wrote:

> Actually from this article I don't see that exception is happening in
> the Firmware.
> I'm very surprised, but our tests on RS/6000 (PReP) and Beige Rev 1
> (thanks dreadbit for testing that!) show that PPC firmware allows
> division by zero:
>
> 0>  1 0 /  ok
> 1>  0 0 /  ok
> 2>  . 0  ok
> 1>  . 0  ok
> 0>
>
> It would be interesting to know what happens on a CHRP platform, can
> anyone check?

Hi Artyom,

I guess it must depend on whether or not the divide by zero trap is 
enabled - at least definitely in the C portion of OpenBIOS, a divide by 
zero will definitely trap on QEMU's PPC implementation.

I have a slightly less invasive patch than my last which I shall post to 
the list in a moment.


ATB,

Mark.



More information about the OpenBIOS mailing list