coreboot-kgpe-d16/util/cbfstool/ProcessorBind.h

93 lines
1.9 KiB
C

/* SPDX-License-Identifier: BSD-2-Clause */
/** @file
* Processor or Compiler specific defines and types for IA-32 architecture.
*/
#ifndef __PROCESSOR_BIND_H__
#define __PROCESSOR_BIND_H__
/*
* This to mimic a processor binding for EDK. This is just to provide the
* processor types.
*/
#include <inttypes.h>
///
/// Define the processor type so other code can make processor based choices.
///
#define MDE_CPU_IA32
///
/// 8-byte unsigned value.
///
typedef uint64_t UINT64;
///
/// 8-byte signed value.
///
typedef int64_t INT64;
///
/// 4-byte unsigned value.
///
typedef uint32_t UINT32;
///
/// 4-byte signed value.
///
typedef int32_t INT32;
///
/// 2-byte unsigned value.
///
typedef uint16_t UINT16;
///
/// 2-byte Character. Unless otherwise specified all strings are stored in the
/// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
///
typedef uint16_t CHAR16;
///
/// 2-byte signed value.
///
typedef int16_t INT16;
///
/// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other
/// values are undefined.
///
typedef unsigned char BOOLEAN;
///
/// 1-byte unsigned value.
///
typedef unsigned char UINT8;
///
/// 1-byte Character
///
typedef char CHAR8;
///
/// 1-byte signed value
///
typedef signed char INT8;
///
/// Unsigned value of native width. (4 bytes on supported 32-bit processor instructions;
/// 8 bytes on supported 64-bit processor instructions.)
///
typedef uintptr_t UINTN;
///
/// Signed value of native width. (4 bytes on supported 32-bit processor instructions;
/// 8 bytes on supported 64-bit processor instructions.)
///
typedef intptr_t INTN;
//
// Processor specific defines
//
///
/// A value of native width with the highest bit set.
// Not needed for non-runtime, but it shouldb
///
//#define MAX_BIT 0x80000000
// No API requirements as this is not for runtime.
#define EFIAPI
#endif