-/* $OpenBSD: sparc64.h,v 1.10 2008/07/07 14:46:18 kettenis Exp $ */
+/* $OpenBSD: sparc64.h,v 1.11 2008/07/10 08:57:05 kettenis Exp $ */
/* $NetBSD: sparc64.h,v 1.3 2000/10/20 05:47:03 mrg Exp $ */
/*
void prom_start_cpu(int cpu, void *func, long arg);
void prom_start_cpu_by_cpuid(int cpu, void *func, long arg);
const char *prom_serengeti_set_console_input(const char *);
+time_t prom_opl_get_tod(void);
/*
* Debug
-/* $OpenBSD: ofw_machdep.c,v 1.27 2008/07/07 14:46:18 kettenis Exp $ */
+/* $OpenBSD: ofw_machdep.c,v 1.28 2008/07/10 08:57:05 kettenis Exp $ */
/* $NetBSD: ofw_machdep.c,v 1.16 2001/07/20 00:07:14 eeh Exp $ */
/*
return (const char *)args.old;
}
+time_t
+prom_opl_get_tod(void)
+{
+ static struct {
+ cell_t name;
+ cell_t nargs;
+ cell_t nreturns;
+ cell_t stick;
+ cell_t time;
+ } args;
+
+ args.name = ADR2CELL("FJSV,get-tod");
+ args.nargs = 0;
+ args.nreturns = 2;
+
+ if (openfirmware(&args) == -1)
+ return (time_t)-1;
+
+ return (time_t)args.time;
+}
+
#ifdef DEBUG
int ofmapintrdebug = 0;
#define DPRINTF(x) do { if (ofmapintrdebug) printf x; } while (0)