linux/arch/x86/kernel/cpu/centaur.c

// SPDX-License-Identifier: GPL-2.0

#include <linux/sched.h>
#include <linux/sched/clock.h>

#include <asm/cpu.h>
#include <asm/cpufeature.h>
#include <asm/e820/api.h>
#include <asm/mtrr.h>
#include <asm/msr.h>

#include "cpu.h"

#define ACE_PRESENT
#define ACE_ENABLED
#define ACE_FCR

#define RNG_PRESENT
#define RNG_ENABLED
#define RNG_ENABLE

static void init_c3(struct cpuinfo_x86 *c)
{}

enum {};

static void early_init_centaur(struct cpuinfo_x86 *c)
{}

static void init_centaur(struct cpuinfo_x86 *c)
{}

#ifdef CONFIG_X86_32
static unsigned int
centaur_size_cache(struct cpuinfo_x86 *c, unsigned int size)
{
	/* VIA C3 CPUs (670-68F) need further shifting. */
	if ((c->x86 == 6) && ((c->x86_model == 7) || (c->x86_model == 8)))
		size >>= 8;

	/*
	 * There's also an erratum in Nehemiah stepping 1, which
	 * returns '65KB' instead of '64KB'
	 *  - Note, it seems this may only be in engineering samples.
	 */
	if ((c->x86 == 6) && (c->x86_model == 9) &&
				(c->x86_stepping == 1) && (size == 65))
		size -= 1;
	return size;
}
#endif

static const struct cpu_dev centaur_cpu_dev =;

cpu_dev_register(centaur_cpu_dev);