diff options
author | marius <marius@FreeBSD.org> | 2007-06-16 22:30:38 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2007-06-16 22:30:38 +0000 |
commit | 1d8fcccf39baa1853feed8bcf07dcbbc33fb8ca8 (patch) | |
tree | 7d3a3ac3dac3ebe991bc08e938d51887a251ec6a /sys/dev/ofw | |
parent | 9dc384d0c45a6842645cbbd69b5525ebe511113b (diff) | |
download | FreeBSD-src-1d8fcccf39baa1853feed8bcf07dcbbc33fb8ca8.zip FreeBSD-src-1d8fcccf39baa1853feed8bcf07dcbbc33fb8ca8.tar.gz |
- Restore the machine independency of sys/dev/ofw/openfirm.{c,h} by
moving OF_set_mmfsa_traptable() (SUNW,set-trap-table with the two
arguments used here is specific to sun4v) to MD code.
- In sys/dev/ofw/openfirm.h remove prototypes for unimplemented
functions and unused Solaris compatibility macros.
Diffstat (limited to 'sys/dev/ofw')
-rw-r--r-- | sys/dev/ofw/openfirm.c | 31 | ||||
-rw-r--r-- | sys/dev/ofw/openfirm.h | 31 |
2 files changed, 0 insertions, 62 deletions
diff --git a/sys/dev/ofw/openfirm.c b/sys/dev/ofw/openfirm.c index b2f251c..53f6021 100644 --- a/sys/dev/ofw/openfirm.c +++ b/sys/dev/ofw/openfirm.c @@ -807,34 +807,3 @@ OF_chain(void *virt, u_int size, entry(0, 0, openfirmware, arg, len); } #endif - - -/* - * Extensions added for sun4v support - * - */ - -/* - * This interface allows the client to safely take over the %tba by - * the prom's service. The prom will take care of the quiescence of - * interrupts and handle any pending soft interrupts. - * This call also sets the MMU fault status area for the cpu. - */ -void -OF_set_mmfsa_traptable(void *tba_addr, uint64_t mmfsa_ra) -{ - static struct { - cell_t name; - cell_t nargs; - cell_t nreturns; - cell_t tba_addr; - cell_t mmfsa_ra; - } args = { - (cell_t)"SUNW,set-trap-table", - 2, - }; - - args.tba_addr = (cell_t)tba_addr; - args.mmfsa_ra = mmfsa_ra; - openfirmware(&args); -} diff --git a/sys/dev/ofw/openfirm.h b/sys/dev/ofw/openfirm.h index d28c817..a8c0633 100644 --- a/sys/dev/ofw/openfirm.h +++ b/sys/dev/ofw/openfirm.h @@ -74,27 +74,6 @@ typedef unsigned int phandle_t; #include <sys/types.h> #include <sys/malloc.h> -#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))) - MALLOC_DECLARE(M_OFWPROP); /* @@ -111,7 +90,6 @@ void OF_init(int (*openfirm)(void *)); /* Generic functions */ int OF_test(char *); -void OF_helloworld(void); void OF_printf(const char *, ...); /* Device tree functions */ @@ -151,18 +129,9 @@ void OF_chain(void *, u_int, /* User interface functions */ int OF_interpret(char *, int, ...); -#if 0 -void *OF_set_callback(void *); -void OF_set_symbol_lookup(void *, void *); -#endif /* Time function */ int OF_milliseconds(void); -/* sun4v additions */ -void OF_set_mmfsa_traptable(void *tba_addr, uint64_t mmfsa_ra); -int OF_translate_virt(vm_offset_t va, int *valid, vm_paddr_t *physaddr, int *mode); -vm_paddr_t OF_vtophys(vm_offset_t va); - #endif /* _KERNEL */ #endif /* _OPENFIRM_H_ */ |