aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/arch/default/odp_sysinfo_parse.c
blob: b93788872c5169dbaf05f25b0876872b4bdc6e09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* Copyright (c) 2016-2018, Linaro Limited
 * All rights reserved.
 *
 * SPDX-License-Identifier:     BSD-3-Clause
 */

#include "config.h"

#include <odp_sysinfo_internal.h>
#include <odp_debug_internal.h>
#include <string.h>

#define DUMMY_MAX_MHZ 1400

int cpuinfo_parser(FILE *file ODP_UNUSED, system_info_t *sysinfo)
{
	int i;

	ODP_DBG("Warning: use dummy values for freq and model string\n");
	for (i = 0; i < CONFIG_NUM_CPU; i++) {
		ODP_PRINT("WARN: cpu[%i] uses dummy max frequency %u MHz\n",
			  i, DUMMY_MAX_MHZ);
		sysinfo->cpu_hz_max[i] = DUMMY_MAX_MHZ * 1000000;
		strcpy(sysinfo->model_str[i], "UNKNOWN");
	}

	return 0;
}

void sys_info_print_arch(void)
{
}

uint64_t odp_cpu_arch_hz_current(int id ODP_UNUSED)
{
	return 0;
}