]> git.proxmox.com Git - mirror_edk2.git/blob - QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/core_types.h
QuarkSocPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / QuarkSocPkg / QuarkNorthCluster / MemoryInit / Pei / core_types.h
1 /** @file
2 Core types used in Mrc.
3
4 Copyright (c) 2013-2015 Intel Corporation.
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9 #ifndef __MRC_CORE_TYPES_H
10 #define __MRC_CORE_TYPES_H
11
12 typedef char char_t;
13 typedef unsigned char uint8_t;
14 typedef short int16_t;
15 typedef unsigned short uint16_t;
16 typedef int int32_t;
17 typedef unsigned int uint32_t;
18 typedef unsigned char bool;
19 typedef unsigned int size_t;
20
21 #ifdef ASM_INC
22 // Unfortunately h2inc has issue with long long
23 typedef struct uint64_s
24 {
25 uint32_t lo;
26 uint32_t hi;
27 }uint64_t;
28 #else
29 typedef unsigned long long uint64_t;
30 #endif
31
32 #ifdef SIM
33 // Native word length is 64bit in simulation environment
34 typedef uint64_t uintn_t;
35 #else
36 // Quark is 32bit
37 typedef uint32_t uintn_t;
38 #endif
39
40 #define PTR32(a) ((volatile uint32_t*)(uintn_t)(a))
41
42 #endif
43