Subject: Re: OBP - I'm guilty, I messed with the date...
To: Schwerzmann, Stephan <stephan.schwerzmann@schmid-telecom.ch>
From: Eduardo Horvath <eeh@NetBSD.org>
List: port-sparc64
Date: 04/06/2005 16:15:55
On Wed, Apr 06, 2005 at 03:38:58PM +0200, Schwerzmann, Stephan wrote:
> hello,
>
> (red-faced-and-singing-the-blues)
>
> I did date experiments with an U10: I set the date
> from the unix to 2038-01-19T03:14 an let the box run
> past the overflow...
>
> now the U10 won't boot anymore, not even from CD... :-/
I presume the kernel hangs?
> OBP is able to tell me the proper date (with ist "date" command)
> but I have difficulties to find a OBP command reference telling
> me how to set the date to a more reasonable value (like today)
> directly from the OBP prompt (single command or some forth hack)
>
> help is appreciated...
You could do that. ISTR that U10s use MTK48T-something NVRAM
chips like U1s and U2s.
1) Do a `show-devs' to locate the path to the nvram or eeprom
device node.
2) Locate the path and map the device in by doing:
" <path>" map-device
3) Make a value so you don't forget where you mapped it:
value rtc-regs
4) Now you should be able to locate the clock registers
in the NVRAM by either looking at the sources or scanning
through the contents with the `dump' command.
5) You should be able to patch individual bytes by using:
<val> <addr> c!
Alternatively, you can boot a kernel with `-d' to get to DDB,
put a breakpoint at the end of clock_ymdhms_to_secs(), change
the return value in %o0 to something more appropriate, and
use the date command to set the correct date once you get to
the prompt.
Eduardo