PERFORCE change 92345 for review

Kip Macy kmacy at FreeBSD.org
Fri Feb 24 09:37:44 PST 2006


http://perforce.freebsd.org/chv.cgi?CH=92345

Change 92345 by kmacy at kmacy_storage:sun4v_work on 2006/02/24 17:35:56

	OF_translate_virt never worked - remove it and other code in openfirm_mmu.c

Affected files ...

.. //depot/projects/kmacy_sun4v/src/sys/conf/files.sun4v#6 edit
.. //depot/projects/kmacy_sun4v/src/sys/dev/ofw/openfirm.c#3 edit
.. //depot/projects/kmacy_sun4v/src/sys/dev/ofw/openfirm.h#3 edit
.. //depot/projects/kmacy_sun4v/src/sys/dev/ofw/openfirm_mmu.c#2 delete

Differences ...

==== //depot/projects/kmacy_sun4v/src/sys/conf/files.sun4v#6 (text+ko) ====

@@ -25,7 +25,6 @@
 dev/ofw/ofw_bus_subr.c		standard
 dev/ofw/ofw_console.c		optional	ofw_console
 dev/ofw/openfirm.c		standard
-dev/ofw/openfirm_mmu.c		standard
 dev/ofw/openfirmio.c		standard
 dev/ofw/openpromio.c		standard
 dev/uart/uart_cpu_sparc64.c	optional	uart

==== //depot/projects/kmacy_sun4v/src/sys/dev/ofw/openfirm.c#3 (text+ko) ====

@@ -858,8 +858,8 @@
 		0,
 	};
 
-	args.tba_addr = (cell_t)tba_addr;
-	args.mmfsa_ra = (cell_t)mmfsa_ra;
+	args.tba_addr = p1275_ptr2cell(tba_addr);
+	args.mmfsa_ra = p1275_ptr2cell(mmfsa_ra);
 	openfirmware(&args);
 }
 

==== //depot/projects/kmacy_sun4v/src/sys/dev/ofw/openfirm.h#3 (text+ko) ====

@@ -76,6 +76,29 @@
 
 MALLOC_DECLARE(M_OFWPROP);
 
+#define	p1275_ptr2cell(p)	((cell_t)((uintptr_t)((void *)(p))))
+#define	p1275_int2cell(i)	((cell_t)((int)(i)))
+#define	p1275_uint2cell(u)	((cell_t)((unsigned int)(u)))
+#define	p1275_size2cell(u)	((cell_t)((size_t)(u)))
+#define	p1275_phandle2cell(ph)	((cell_t)((unsigned int)((phandle_t)(ph))))
+#define	p1275_dnode2cell(d)	((cell_t)((unsigned int)((pnode_t)(d))))
+#define	p1275_ihandle2cell(ih)	((cell_t)((unsigned int)((ihandle_t)(ih))))
+#define	p1275_ull2cell_high(ll)	(0LL)
+#define	p1275_ull2cell_low(ll)	((cell_t)(ll))
+#define	p1275_uintptr2cell(i)	((cell_t)((uintptr_t)(i)))
+
+#define	p1275_cell2ptr(p)	((void *)((cell_t)(p)))
+#define	p1275_cell2int(i)	((int)((cell_t)(i)))
+#define	p1275_cell2uint(u)	((unsigned int)((cell_t)(u)))
+#define	p1275_cell2size(u)	((size_t)((cell_t)(u)))
+#define	p1275_cell2phandle(ph)	((phandle_t)((cell_t)(ph)))
+#define	p1275_cell2dnode(d)	((pnode_t)((cell_t)(d)))
+#define	p1275_cell2ihandle(ih)	((ihandle_t)((cell_t)(ih)))
+#define	p1275_cells2ull(h, l)	((unsigned long long)(cell_t)(l))
+#define	p1275_cell2uintptr(i)	((uintptr_t)((cell_t)(i)))
+
+
+
 /*
  * Stuff that is used by the Open Firmware code.
  */


More information about the p4-projects mailing list