Пример #1
0
uint32_t
ofw_milliseconds()
{
	struct {
		ofw_cell_t	service;
		ofw_cell_t	n_args;
		ofw_cell_t	n_returns;
		ofw_cell_t	ms;
	} args = {
		.service = (ofw_cell_t)"milliseconds",
		.n_args    = 0,
		.n_returns = 1,
	};

	ofw_entry(&args);
	return args.ms;
}
Пример #2
0
static void
sun4u_startcpu(phandle_t cpu, void *func, u_long arg)
{
	static struct {
		cell_t	name;
		cell_t	nargs;
		cell_t	nreturns;
		cell_t	cpu;
		cell_t	func;
		cell_t	arg;
	} args = {
		(cell_t)SUNW_STARTCPU,
		3,
	};

	args.cpu = cpu;
	args.func = (cell_t)func;
	args.arg = (cell_t)arg;
	ofw_entry(&args);
}