1*1bb92983SJerome Forissier /* SPDX-License-Identifier: BSD-2-Clause */ 2883c4be3SJerome Forissier /* 3883c4be3SJerome Forissier * Copyright (c) 2016, Linaro Limited 4883c4be3SJerome Forissier * All rights reserved. 5883c4be3SJerome Forissier * 6883c4be3SJerome Forissier * Redistribution and use in source and binary forms, with or without 7883c4be3SJerome Forissier * modification, are permitted provided that the following conditions are met: 8883c4be3SJerome Forissier * 9883c4be3SJerome Forissier * 1. Redistributions of source code must retain the above copyright notice, 10883c4be3SJerome Forissier * this list of conditions and the following disclaimer. 11883c4be3SJerome Forissier * 12883c4be3SJerome Forissier * 2. Redistributions in binary form must reproduce the above copyright notice, 13883c4be3SJerome Forissier * this list of conditions and the following disclaimer in the documentation 14883c4be3SJerome Forissier * and/or other materials provided with the distribution. 15883c4be3SJerome Forissier * 16883c4be3SJerome Forissier * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17883c4be3SJerome Forissier * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18883c4be3SJerome Forissier * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19883c4be3SJerome Forissier * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20883c4be3SJerome Forissier * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21883c4be3SJerome Forissier * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22883c4be3SJerome Forissier * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23883c4be3SJerome Forissier * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24883c4be3SJerome Forissier * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25883c4be3SJerome Forissier * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26883c4be3SJerome Forissier * POSSIBILITY OF SUCH DAMAGE. 27883c4be3SJerome Forissier */ 28883c4be3SJerome Forissier 29883c4be3SJerome Forissier #ifndef __GPROF_PTA_H 30883c4be3SJerome Forissier #define __GPROF_PTA_H 31883c4be3SJerome Forissier 32883c4be3SJerome Forissier #include <stdbool.h> 33883c4be3SJerome Forissier #include <stddef.h> 34883c4be3SJerome Forissier #include <stdint.h> 35883c4be3SJerome Forissier #include <tee_api_types.h> 36883c4be3SJerome Forissier 37883c4be3SJerome Forissier TEE_Result __pta_gprof_send(void *buf, size_t len, uint32_t *id); 38883c4be3SJerome Forissier TEE_Result __pta_gprof_pc_sampling_start(void *buf, size_t len, size_t offset, 39883c4be3SJerome Forissier size_t scale); 40883c4be3SJerome Forissier TEE_Result __pta_gprof_pc_sampling_stop(uint32_t *rate); 41883c4be3SJerome Forissier void __pta_gprof_fini(void); 42883c4be3SJerome Forissier #endif /* __GPROF_PTA_H */ 43