Debian Codegraph @

common/paf-hwcap.h

raw
1 /* PAFlib hardware capability handling.
2 *
3 * Copyright IBM Corp. 2013
4 *
5 * The MIT License (MIT)
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 * THE SOFTWARE.
24 *
25 * Contributors:
26 * IBM Corporation, Adhemerval Zanella - Initial implementation.
27 */
28
29 #ifndef _PAF_HWCAP_H
30 # define _PAF_HWCAP_H
31
32 #include <stdint.h>
33 #include "paf-common.h"
34
35 #ifndef PPC_FEATURE_ARCH_2_05
36 # define PPC_FEATURE_ARCH_2_05 0x00001000 /* ISA 2.05 */
37 #endif
38 #ifndef PPC_FEATURE_ARCH_2_06
39 # define PPC_FEATURE_ARCH_2_06 0x00000100 /* ISA 2.06 */
40 #endif
41 #ifndef PPC_FEATURE2_ARCH_2_07
42 # define PPC_FEATURE2_ARCH_2_07 0x80000000 /* ISA 2.07 */
43 #endif
44 #ifndef PPC_FEATURE2_HAS_EBB
45 # define PPC_FEATURE2_HAS_EBB 0x10000000 /* Event Base Branching */
46 #endif
47 #ifndef PPC_FEATURE2_HAS_DSCR
48 # define PPC_FEATURE2_HAS_DSCR 0x20000000 /* Data Stream Control Register */
49 #endif
50 #ifndef PPC_FEATURE_NO_TB
51 #define PPC_FEATURE_NO_TB 0x00100000 /* 601/403gx have no timebase */
52 #endif
53
54 struct hwcap_t
55 {
56 uint32_t hwcap1;
57 uint32_t hwcap2;
58 #define PAFPLATLEN 64
59 char platform[PAFPLATLEN];
60 };
61
62 int __paf_get_hwcap (struct hwcap_t *hwcap) attribute_hidden;
63
64 #endif