1*b09de0b3SRuslan Bukin#- 2*b09de0b3SRuslan Bukin# Copyright (c) 2018 Ruslan Bukin <br@bsdpad.com> 3*b09de0b3SRuslan Bukin# All rights reserved. 4*b09de0b3SRuslan Bukin# 5*b09de0b3SRuslan Bukin# This software was developed by SRI International and the University of 6*b09de0b3SRuslan Bukin# Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 7*b09de0b3SRuslan Bukin# ("CTSRD"), as part of the DARPA CRASH research programme. 8*b09de0b3SRuslan Bukin# 9*b09de0b3SRuslan Bukin# Redistribution and use in source and binary forms, with or without 10*b09de0b3SRuslan Bukin# modification, are permitted provided that the following conditions 11*b09de0b3SRuslan Bukin# are met: 12*b09de0b3SRuslan Bukin# 1. Redistributions of source code must retain the above copyright 13*b09de0b3SRuslan Bukin# notice, this list of conditions and the following disclaimer. 14*b09de0b3SRuslan Bukin# 2. Redistributions in binary form must reproduce the above copyright 15*b09de0b3SRuslan Bukin# notice, this list of conditions and the following disclaimer in the 16*b09de0b3SRuslan Bukin# documentation and/or other materials provided with the distribution. 17*b09de0b3SRuslan Bukin# 18*b09de0b3SRuslan Bukin# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19*b09de0b3SRuslan Bukin# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20*b09de0b3SRuslan Bukin# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21*b09de0b3SRuslan Bukin# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 22*b09de0b3SRuslan Bukin# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23*b09de0b3SRuslan Bukin# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24*b09de0b3SRuslan Bukin# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25*b09de0b3SRuslan Bukin# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26*b09de0b3SRuslan Bukin# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27*b09de0b3SRuslan Bukin# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28*b09de0b3SRuslan Bukin# SUCH DAMAGE. 29*b09de0b3SRuslan Bukin# 30*b09de0b3SRuslan Bukin# 31*b09de0b3SRuslan Bukin 32*b09de0b3SRuslan Bukin#include <machine/bus.h> 33*b09de0b3SRuslan Bukin#include <arm64/coresight/coresight.h> 34*b09de0b3SRuslan Bukin 35*b09de0b3SRuslan BukinINTERFACE coresight; 36*b09de0b3SRuslan Bukin 37*b09de0b3SRuslan BukinMETHOD int init { 38*b09de0b3SRuslan Bukin device_t dev; 39*b09de0b3SRuslan Bukin}; 40*b09de0b3SRuslan Bukin 41*b09de0b3SRuslan BukinMETHOD int enable { 42*b09de0b3SRuslan Bukin device_t dev; 43*b09de0b3SRuslan Bukin struct endpoint *endp; 44*b09de0b3SRuslan Bukin struct coresight_event *event; 45*b09de0b3SRuslan Bukin}; 46*b09de0b3SRuslan Bukin 47*b09de0b3SRuslan BukinMETHOD void disable { 48*b09de0b3SRuslan Bukin device_t dev; 49*b09de0b3SRuslan Bukin struct endpoint *endp; 50*b09de0b3SRuslan Bukin struct coresight_event *event; 51*b09de0b3SRuslan Bukin}; 52*b09de0b3SRuslan Bukin 53*b09de0b3SRuslan BukinMETHOD int read { 54*b09de0b3SRuslan Bukin device_t dev; 55*b09de0b3SRuslan Bukin struct endpoint *endp; 56*b09de0b3SRuslan Bukin struct coresight_event *event; 57*b09de0b3SRuslan Bukin}; 58