PERFORCE change 94432 for review
Kip Macy
kmacy at FreeBSD.org
Sun Apr 2 03:53:58 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=94432
Change 94432 by kmacy at kmacy_storage:sun4v_work on 2006/04/02 03:53:03
add hvio_peek
fix broken include
Affected files ...
.. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/bus.h#3 edit
.. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/hypervisor_api.h#5 edit
.. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/hypervisorvar.h#5 edit
Differences ...
==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/bus.h#3 (text+ko) ====
@@ -836,10 +836,14 @@
bus_space_peek_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
u_int8_t *a)
{
+
+ int error;
+ uint64_t error_flag;
-
__BUS_DEBUG_ACCESS(h, o, "peek", 1);
- return (0);
+ error = hvio_peek(h, o, 1, &error_flag, (uint64_t *)a);
+ /* XXX map HV errors to BSD errors */
+ return (error);
}
static __inline int
@@ -847,9 +851,12 @@
u_int16_t *a)
{
-
+ int error;
+ uint64_t error_flag;
+
__BUS_DEBUG_ACCESS(h, o, "peek", 2);
- return (0);
+ error = hvio_peek(h, o, 2, &error_flag, (uint64_t *)a);
+ return (error);
}
static __inline int
@@ -857,8 +864,13 @@
u_int32_t *a)
{
+ int error;
+ uint64_t error_flag;
+
+ __BUS_DEBUG_ACCESS(h, o, "peek", 4);
+ error = hvio_peek(h, o, 4, &error_flag, (uint64_t *)a);
+ return (error);
- __BUS_DEBUG_ACCESS(h, o, "peek", 4);
return (0);
}
==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/hypervisor_api.h#5 (text+ko) ====
@@ -38,6 +38,9 @@
#ifndef _ASM
+typedef uint64_t devhandle_t;
+
+
extern uint64_t hv_mmu_map_perm_addr(void *, int, uint64_t, int);
extern uint64_t hv_mmu_unmap_perm_addr(void *, int, int);
extern uint64_t hv_set_ctx0(uint64_t, uint64_t);
@@ -47,6 +50,7 @@
#endif /* SET_MMU_STATS */
extern uint64_t hv_cpu_qconf(int queue, uint64_t paddr, int size);
+extern uint64_t hv_cpu_mondo_send(int n, vm_paddr_t cpu_list_ra);
extern uint64_t hv_cpu_yield(void);
extern uint64_t hv_cpu_state(uint64_t cpuid, uint64_t *cpu_state);
@@ -88,6 +92,9 @@
extern uint64_t hvio_intr_setstate(uint64_t sysino, int intr_state);
extern uint64_t hvio_intr_gettarget(uint64_t sysino, uint32_t *cpuid);
extern uint64_t hvio_intr_settarget(uint64_t sysino, uint32_t cpuid);
+extern uint64_t hvio_peek(uint64_t dev_hdl, uint64_t r_addr, uint64_t size,
+ uint64_t *err_flag, uint64_t *data);
+
extern void hv_magic_trap_on(void);
extern void hv_magic_trap_off(void);
==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/hypervisorvar.h#5 (text+ko) ====
@@ -199,6 +199,8 @@
};
#endif /* SET_MMU_STATS */
+typedef uint64_t devhandle_t;
+
#endif /* _ASM */
/*
@@ -287,7 +289,6 @@
#define HVIO_FIRE_PERFREG_PCIE_LNK_CNT1 14
#define HVIO_FIRE_PERFREG_PCIE_LNK_CNT2 15
-#include "opt_simulator.h"
#ifdef SIMULATOR
#define MAGIC_TRAP_ON ta 0x77
More information about the p4-projects
mailing list