1/** 2 * \file 3 * \brief Not sure where to put these definitions 4 */ 5 6/* 7 * Copyright (c) 2010, ETH Zurich. 8 * All rights reserved. 9 * 10 * This file is distributed under the terms in the attached LICENSE file. 11 * If you do not find this file, copies can be found by writing to: 12 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. 13 */ 14 15#ifndef ARCH_ARM_BARRELFISH_KPI_UNKNOWN_H 16#define ARCH_ARM_BARRELFISH_KPI_UNKNOWN_H 17 18#ifndef IN_KERNEL 19 20#include <barrelfish/sys_debug.h> 21 22// XXX: this code shouldn't be in the KPI, and it should be living behind a clean portability layer! 23// required for lib/lwip/src/barrelfish/idc_barrelfish.c 24 25#include <assert.h> 26 27static inline void mfence(void) 28{ 29 assert(!"mfence() NYI for ARM"); 30} 31 32static inline void cache_flush_range(void *base, size_t len) 33{ 34 assert(!"cache_flush_range() NYI for ARM"); 35} 36 37 38static inline uint64_t rdtsc(void) 39{ 40 uint64_t timestamp; 41 errval_t err; 42 43 // temporary solution, this should be a direct timer read 44 err = sys_debug_hardware_global_timer_read(×tamp); 45 assert(err_is_ok(err)); 46 return timestamp; 47} 48 49 50#endif 51 52#endif // ARCH_ARM_BARRELFISH_KPI_UNKNOWN_H 53