• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2 Core types used in Mrc.
3 
4 Copyright (c) 2013-2015 Intel Corporation.
5 
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution.  The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10 
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 
14 **/
15 #ifndef __MRC_CORE_TYPES_H
16 #define __MRC_CORE_TYPES_H
17 
18 typedef char char_t;
19 typedef unsigned char uint8_t;
20 typedef short int16_t;
21 typedef unsigned short uint16_t;
22 typedef int int32_t;
23 typedef unsigned int uint32_t;
24 typedef unsigned char bool;
25 typedef unsigned int size_t;
26 
27 #ifdef ASM_INC
28 // Unfortunately h2inc has issue with long long
29 typedef struct uint64_s
30 {
31   uint32_t lo;
32   uint32_t hi;
33 }uint64_t;
34 #else
35 typedef unsigned long long uint64_t;
36 #endif
37 
38 #ifdef SIM
39 // Native word length is 64bit in simulation environment
40 typedef uint64_t uintn_t;
41 #else
42 // Quark is 32bit
43 typedef uint32_t uintn_t;
44 #endif
45 
46 #define PTR32(a)  ((volatile uint32_t*)(uintn_t)(a))
47 
48 #endif
49 
50