On Thu, 23 Oct 2008, Michael Schmitz wrote:
Good, so solving the problem should fix it for both. When did the
problem get
introduced - 2.4 or 2.6?
Silly question I guess, but how is the passing done?
On m68k architecture, bootloader passes a list of tags to the kernel, see
set_kernel_bootinfo():
Short answer: bootinfo.
I'm confident the date/time is passed by bootinfo OK, but it then
'disappears'.
Yep, nothing is done with mac_bi_data.boottime, except for printing it
to the kernel log.
I'm pretty sure it was still OK in the 2.2 series - I'm unsure on when it
broke: 2.4 or 2.6?
It seems to be removed in early 2.5 (2.4 has it, my oldest 2.5 is 2.5.5
and that one doesn't have it anymore):
--- a/arch/m68k/mac/misc.c
+++ b/arch/m68k/mac/misc.c
@@ -571,6 +571,26 @@ static void unmktime(unsigned long time, long offset,
return;
}
+/*
+ * Return the boot time for use in initializing the kernel clock.
+ *
+ * I'd like to read the hardware clock here but many machines read
+ * the PRAM through ADB, and interrupts aren't initialized when this
+ * is called so ADB obviously won't work.
+ */
+
+void mac_gettod(int *yearp, int *monp, int *dayp,
+ int *hourp, int *minp, int *secp)
+{
+ /* Yes the GMT bias is backwards. It looks like Penguin is
+ screwing up the boottime it gives us... This works for me
+ in Canada/Eastern but it might be wrong everywhere else. */
+ unmktime(mac_bi_data.boottime, -mac_bi_data.gmtbias * 60,
+ yearp, monp, dayp, hourp, minp, secp);
+ /* For some reason this is off by one */
+ *monp = *monp + 1;
+}
+
/*
* Read/write the hardware clock.
*/
and `mach_gettod' was wired up to 'mac_gettod'.
No idea why it was removed. I should check my mail archives (2002 and
older are on CD).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html