c1bb2e3246
Pull the latest headers for Xen which allow us to add support for ARM and use new features in FreeBSD. This is a verbatim copy of the xen/include/public so every headers which don't exits anymore in the Xen repositories have been dropped. Note the interface version hasn't been bumped, it will be done in a follow-up. Although, it requires fix in the code to get it compiled: - sys/xen/xen_intr.h: evtchn_port_t is already defined in the headers so drop it. - {amd64,i386}/include/intr_machdep.h: NR_EVENT_CHANNELS now depends on xen/interface/event_channel.h, so include it. - {amd64,i386}/{amd64,i386}/support.S: It's not neccessary to include machine/intr_machdep.h. This is also fixing build compilation with the new headers. - dev/xen/blkfront/blkfront.c: The typedef for blkif_request_segmenthas been dropped. So directly use struct blkif_request_segment Finally, modify xen/interface/xen-compat.h to throw a preprocessing error if __XEN_INTERFACE_VERSION__ is not set. This is allow us to catch any file where xen/xen-os.h is not correctly included. Submitted by: Julien Grall <julien.grall@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3805 Sponsored by: Citrix Systems R&D
116 lines
3.3 KiB
C
116 lines
3.3 KiB
C
/******************************************************************************
|
|
* gcov.h
|
|
*
|
|
* Coverage structures exported by Xen.
|
|
* Structure is different from Gcc one.
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to
|
|
* deal in the Software without restriction, including without limitation the
|
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
* sell copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
* DEALINGS IN THE SOFTWARE.
|
|
*
|
|
* Copyright (c) 2013, Citrix Systems R&D Ltd.
|
|
*/
|
|
|
|
#ifndef __XEN_PUBLIC_GCOV_H__
|
|
#define __XEN_PUBLIC_GCOV_H__ __XEN_PUBLIC_GCOV_H__
|
|
|
|
#define XENCOV_COUNTERS 5
|
|
#define XENCOV_TAG_BASE 0x58544300u
|
|
#define XENCOV_TAG_FILE (XENCOV_TAG_BASE+0x46u)
|
|
#define XENCOV_TAG_FUNC (XENCOV_TAG_BASE+0x66u)
|
|
#define XENCOV_TAG_COUNTER(n) (XENCOV_TAG_BASE+0x30u+((n)&0xfu))
|
|
#define XENCOV_TAG_END (XENCOV_TAG_BASE+0x2eu)
|
|
#define XENCOV_IS_TAG_COUNTER(n) \
|
|
((n) >= XENCOV_TAG_COUNTER(0) && (n) < XENCOV_TAG_COUNTER(XENCOV_COUNTERS))
|
|
#define XENCOV_COUNTER_NUM(n) ((n)-XENCOV_TAG_COUNTER(0))
|
|
|
|
/*
|
|
* The main structure for the blob is
|
|
* BLOB := FILE.. END
|
|
* FILE := TAG_FILE VERSION STAMP FILENAME COUNTERS FUNCTIONS
|
|
* FILENAME := LEN characters
|
|
* characters are padded to 32 bit
|
|
* LEN := 32 bit value
|
|
* COUNTERS := TAG_COUNTER(n) NUM COUNTER..
|
|
* NUM := 32 bit valie
|
|
* COUNTER := 64 bit value
|
|
* FUNCTIONS := TAG_FUNC NUM FUNCTION..
|
|
* FUNCTION := IDENT CHECKSUM NUM_COUNTERS
|
|
*
|
|
* All tagged structures are aligned to 8 bytes
|
|
*/
|
|
|
|
/**
|
|
* File information
|
|
* Prefixed with XENCOV_TAG_FILE and a string with filename
|
|
* Aligned to 8 bytes
|
|
*/
|
|
struct xencov_file
|
|
{
|
|
uint32_t tag; /* XENCOV_TAG_FILE */
|
|
uint32_t version;
|
|
uint32_t stamp;
|
|
uint32_t fn_len;
|
|
char filename[1];
|
|
};
|
|
|
|
|
|
/**
|
|
* Counters information
|
|
* Prefixed with XENCOV_TAG_COUNTER(n) where n is 0..(XENCOV_COUNTERS-1)
|
|
* Aligned to 8 bytes
|
|
*/
|
|
struct xencov_counter
|
|
{
|
|
uint32_t tag; /* XENCOV_TAG_COUNTER(n) */
|
|
uint32_t num;
|
|
uint64_t values[1];
|
|
};
|
|
|
|
/**
|
|
* Information for each function
|
|
* Number of counter is equal to the number of counter structures got before
|
|
*/
|
|
struct xencov_function
|
|
{
|
|
uint32_t ident;
|
|
uint32_t checksum;
|
|
uint32_t num_counters[1];
|
|
};
|
|
|
|
/**
|
|
* Information for all functions
|
|
* Aligned to 8 bytes
|
|
*/
|
|
struct xencov_functions
|
|
{
|
|
uint32_t tag; /* XENCOV_TAG_FUNC */
|
|
uint32_t num;
|
|
struct xencov_function xencov_function[1];
|
|
};
|
|
|
|
/**
|
|
* Terminator
|
|
*/
|
|
struct xencov_end
|
|
{
|
|
uint32_t tag; /* XENCOV_TAG_END */
|
|
};
|
|
|
|
#endif /* __XEN_PUBLIC_GCOV_H__ */
|
|
|