From da4c4c5ee32dc553c207ad78995cddf836420749 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Thu, 31 Aug 2006 21:28:36 +0000 Subject: Fix handling of 64-bit quantities in Open Firmware's client interface. Spotted by tsi@, and shamelessly stolen from his diff. Fixes several UltraSPARC-III machines wich have more than one memory bank filled. ok deraadt@ --- sys/arch/sparc64/include/openfirm.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/arch/sparc64/include') diff --git a/sys/arch/sparc64/include/openfirm.h b/sys/arch/sparc64/include/openfirm.h index 9b8433a9617..53bc42d29b6 100644 --- a/sys/arch/sparc64/include/openfirm.h +++ b/sys/arch/sparc64/include/openfirm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: openfirm.h,v 1.5 2004/08/08 21:04:44 miod Exp $ */ +/* $OpenBSD: openfirm.h,v 1.6 2006/08/31 21:28:34 kettenis Exp $ */ /* $NetBSD: openfirm.h,v 1.8 2001/07/20 00:07:14 eeh Exp $ */ /* @@ -42,6 +42,11 @@ typedef u_int64_t cell_t; #define HDL2CELL(x) (cell_t)(u_int)(int)(x) #define ADR2CELL(x) (cell_t)(x) +#define HDQ2CELL_HI(x) (cell_t)(0) +#define HDQ2CELL_LO(x) (cell_t)(x) + +#define CELL2HDQ(hi, lo) (lo) + int OF_test (char *service); int OF_test_method (int handle, char *method); int OF_getproplen (int handle, char *prop); -- cgit v1.2.3