API Reference Manual  1.45.0
spec/system_info.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2013-2018 Linaro Limited
3  * Copyright (c) 2020-2021 Nokia
4  */
5 
12 #ifndef ODP_API_SPEC_SYSTEM_INFO_H_
13 #define ODP_API_SPEC_SYSTEM_INFO_H_
14 #include <odp/visibility_begin.h>
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
26 #define ODP_SYSTEM_MEMBLOCK_NAME_LEN 64
27 
31 typedef enum odp_cpu_arch_t {
34 
37 
40 
43 
46 
49 
51 
57 typedef enum odp_cpu_arch_arm_t {
60 
63 
66 
69 
72 
75 
78 
81 
84 
87 
90 
93 
96 
99 
102 
105 
108 
110 
114 typedef enum odp_cpu_arch_mips_t {
117 
119 
123 typedef enum odp_cpu_arch_ppc_t {
126 
128 
132 typedef enum odp_cpu_arch_riscv_t {
135 
137 
141 typedef enum odp_cpu_arch_x86_t {
144 
147 
150 
152 
156 typedef union odp_cpu_arch_isa_t {
159 
162 
165 
168 
171 
173 
177 typedef struct odp_system_info_t {
184 
193 
201 
203 
207 typedef struct odp_system_meminfo_t {
214  uint64_t total_mapped;
215 
222  uint64_t total_used;
223 
231  uint64_t total_overhead;
232 
234 
238 typedef struct odp_system_memblock_t {
241 
243  uintptr_t addr;
244 
250  uint64_t used;
251 
258  uint64_t overhead;
259 
264  uint64_t page_size;
265 
267 
280 
300 int32_t odp_system_meminfo(odp_system_meminfo_t *info, odp_system_memblock_t block[], int32_t num);
301 
308 uint64_t odp_sys_huge_page_size(void);
309 
326 int odp_sys_huge_page_size_all(uint64_t size[], int num);
327 
333 uint64_t odp_sys_page_size(void);
334 
341 
350 
359 
364 #ifdef __cplusplus
365 }
366 #endif
367 
368 #include <odp/visibility_end.h>
369 #endif
#define ODP_SYSTEM_MEMBLOCK_NAME_LEN
Maximum memory block name length in chars (including null char)
odp_cpu_arch_x86_t
x86 ISA versions
int odp_sys_cache_line_size(void)
Cache line size in bytes.
uint64_t odp_sys_huge_page_size(void)
Default system huge page size in bytes.
odp_cpu_arch_mips_t
MIPS ISA versions.
odp_cpu_arch_ppc_t
PowerPC ISA versions.
uint64_t odp_sys_page_size(void)
Page size in bytes.
int odp_system_info(odp_system_info_t *info)
Retrieve system information.
int odp_sys_huge_page_size_all(uint64_t size[], int num)
System huge page sizes in bytes.
odp_cpu_arch_arm_t
ARM ISA versions.
odp_cpu_arch_riscv_t
RISC-V ISA versions.
struct odp_system_meminfo_t odp_system_meminfo_t
Memory information.
struct odp_system_memblock_t odp_system_memblock_t
Memory block information.
void odp_sys_info_print(void)
Print system info.
union odp_cpu_arch_isa_t odp_cpu_arch_isa_t
CPU ISA versions.
int32_t odp_system_meminfo(odp_system_meminfo_t *info, odp_system_memblock_t block[], int32_t num)
Retrieve ODP memory usage information.
void odp_sys_config_print(void)
Print configuration.
odp_cpu_arch_t
CPU instruction set architecture (ISA) families.
struct odp_system_info_t odp_system_info_t
System info.
@ ODP_CPU_ARCH_X86_I686
x86 32bit ISA
@ ODP_CPU_ARCH_X86_UNKNOWN
Unknown x86 ISA version.
@ ODP_CPU_ARCH_X86_64
x86 64bit ISA
@ ODP_CPU_ARCH_MIPS_UNKNOWN
Unknown MIPS ISA version.
@ ODP_CPU_ARCH_PPC_UNKNOWN
Unknown PPC ISA version.
@ ODP_CPU_ARCH_ARM_UNKNOWN
Unknown ARM ISA version.
@ ODP_CPU_ARCH_ARMV8_1
ARMv8.1-A ISA.
@ ODP_CPU_ARCH_ARMV8_0
ARMv8.0-A ISA.
@ ODP_CPU_ARCH_ARMV9_1
ARMv9.1-A ISA.
@ ODP_CPU_ARCH_ARMV8_4
ARMv8.4-A ISA.
@ ODP_CPU_ARCH_ARMV8_8
ARMv8.8-A ISA.
@ ODP_CPU_ARCH_ARMV8_9
ARMv8.9-A ISA.
@ ODP_CPU_ARCH_ARMV7
ARMv7-A ISA.
@ ODP_CPU_ARCH_ARMV6
ARMv6 ISA.
@ ODP_CPU_ARCH_ARMV9_3
ARMv9.3-A ISA.
@ ODP_CPU_ARCH_ARMV8_6
ARMv8.6-A ISA.
@ ODP_CPU_ARCH_ARMV9_2
ARMv9.2-A ISA.
@ ODP_CPU_ARCH_ARMV8_3
ARMv8.3-A ISA.
@ ODP_CPU_ARCH_ARMV8_2
ARMv8.2-A ISA.
@ ODP_CPU_ARCH_ARMV9_0
ARMv9.0-A ISA.
@ ODP_CPU_ARCH_ARMV8_5
ARMv8.5-A ISA.
@ ODP_CPU_ARCH_ARMV8_7
ARMv8.7-A ISA.
@ ODP_CPU_ARCH_RISCV_UNKNOWN
Unknown RISC-V ISA version.
@ ODP_CPU_ARCH_ARM
ARM.
@ ODP_CPU_ARCH_PPC
PowerPC.
@ ODP_CPU_ARCH_X86
x86
@ ODP_CPU_ARCH_MIPS
MIPS.
@ ODP_CPU_ARCH_UNKNOWN
Unknown CPU architecture.
@ ODP_CPU_ARCH_RISCV
RISC-V.
odp_cpu_arch_isa_t cpu_isa_hw
ISA version of CPU hardware.
odp_cpu_arch_t cpu_arch
CPU architecture.
odp_cpu_arch_isa_t cpu_isa_sw
ISA version of ODP software.
Memory block information.
uint64_t page_size
Memory page size in bytes.
char name[ODP_SYSTEM_MEMBLOCK_NAME_LEN]
Memory block name.
uintptr_t addr
Start address of the block.
uint64_t overhead
Memory usage overheads.
uint64_t used
Memory usage.
Memory information.
uint64_t total_overhead
Total memory usage overheads.
uint64_t total_mapped
Total mapped memory.
uint64_t total_used
Total memory usage.
CPU ISA versions.
odp_cpu_arch_ppc_t ppc
PowerPC ISA versions.
odp_cpu_arch_mips_t mips
MIPS ISA versions.
odp_cpu_arch_riscv_t riscv
RISC-V ISA versions.
odp_cpu_arch_arm_t arm
ARM ISA versions.
odp_cpu_arch_x86_t x86
x86 ISA versions