-/* $OpenBSD: sparc64.h,v 1.11 2008/07/10 08:57:05 kettenis Exp $ */
+/* $OpenBSD: sparc64.h,v 1.12 2008/08/09 21:06:05 kettenis Exp $ */
/* $NetBSD: sparc64.h,v 1.3 2000/10/20 05:47:03 mrg Exp $ */
/*
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);
+uint64_t prom_set_sun4v_api_version(uint64_t, uint64_t, uint64_t, uint64_t *);
/*
* Debug
-/* $OpenBSD: ofw_machdep.c,v 1.28 2008/07/10 08:57:05 kettenis Exp $ */
+/* $OpenBSD: ofw_machdep.c,v 1.29 2008/08/09 21:06:05 kettenis Exp $ */
/* $NetBSD: ofw_machdep.c,v 1.16 2001/07/20 00:07:14 eeh Exp $ */
/*
return (time_t)args.time;
}
+uint64_t
+prom_set_sun4v_api_version(uint64_t api_group, uint64_t major,
+ uint64_t minor, uint64_t *supported_minor)
+{
+ static struct {
+ cell_t name;
+ cell_t nargs;
+ cell_t nreturns;
+ cell_t api_group;
+ cell_t major;
+ cell_t minor;
+ cell_t status;
+ cell_t supported_minor;
+ } args;
+
+ args.name = ADR2CELL("SUNW,set-sun4v-api-version");
+ args.nargs = 3;
+ args.nreturns = 2;
+ args.api_group = api_group;
+ args.major = major;
+ args.minor = minor;
+ args.status = -1;
+ args.supported_minor = -1;
+
+ openfirmware(&args);
+
+ *supported_minor = args.supported_minor;
+ return (uint64_t)args.status;
+}
+
#ifdef DEBUG
int ofmapintrdebug = 0;
#define DPRINTF(x) do { if (ofmapintrdebug) printf x; } while (0)