[OpenBIOS] [PATCH] Tick counter
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Tue Feb 11 21:02:33 CET 2014
On 11/02/14 00:43, Olivier Danet wrote:
> I had tested with NextSTEP, which, afaik, is the only user of this damn
> counter...
>
> In OpenBIOS, the CPU "PSR.PIL" register masked all interrupts.
> Here is a version which enable the interrupt level 14, used by the timer.
> It is not optimal because the psr_get/set functions are also declared in
> arch/sparc32/psr.h, maybe it should be moved to include/arch/sparc32...
Aha so that was the part I was missing! Please find attached a squashed
reworked version of your patch which makes the following changes:
- Fixes up psr.h and friends so we can use the constants/functions that
are already there
- Change obp_ticks from int32_t obp_ticks to uint32_t *obp_ticks (this
is so we can reference it in Forth too)
- Add an implementation of get-msecs in Forth which is surrounded by
[IFDEF] CONFIG_SPARC32 ... [THEN] guards which references the value from
the above pointer
This appears to work for me, and most importantly it doesn't appear to
affect Solaris 8 boot (which is good, as Solaris is generally the most
sensitive OS when changing things in OpenBIOS).
Welcome to OpenBIOS v1.1 built on Feb 11 2014 19:37
Type 'help' for detailed information
0 > get-msecs u. 1bd0 ok
0 > get-msecs u. 2ada ok
0 > get-msecs u. 389a ok
0 >
Can you test on NextStep and let me know if it looks okay to you too?
ATB,
Mark.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openbios-sparc32-timer.patch
Type: text/x-diff
Size: 8885 bytes
Desc: not available
URL: <http://www.openfirmware.info/pipermail/openbios/attachments/20140211/dce12180/attachment.bin>
More information about the OpenBIOS
mailing list