From owner-p4-projects@FreeBSD.ORG Sun Apr 2 03:53:58 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5998616A423; Sun, 2 Apr 2006 03:53:58 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DE9316A400 for ; Sun, 2 Apr 2006 03:53:58 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACF5D43D45 for ; Sun, 2 Apr 2006 03:53:57 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k323rvl2095942 for ; Sun, 2 Apr 2006 03:53:57 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k323rvRE095939 for perforce@freebsd.org; Sun, 2 Apr 2006 03:53:57 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 2 Apr 2006 03:53:57 GMT Message-Id: <200604020353.k323rvRE095939@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 94432 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Apr 2006 03:53:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=94432 Change 94432 by kmacy@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