Files
acrn-hypervisor/hypervisor/include/arch/riscv/asm/per_cpu.h
Jian Jun Chen 1949c0b52f hv: riscv: add get/set_pcpu_id and start_pcpus implementation
Use tp register to hold the current logical CPU ID. This follows the
same design as x86 which uses MSR_IA32_SYSENTER_CS for the same purpose.
riscv uses SBI HSM to start the APs.

Tracked-On: #8791
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2025-09-23 11:30:38 +08:00

22 lines
382 B
C

/*
* Copyright (C) 2025 Intel Corporation.
*
* SPDX-License-Identifier: BSD-3-Clause
*
* Authors:
* Haicheng Li <haicheng.li@intel.com>
*/
#ifndef RISCV_PERCPU_H
#define RISCV_PERCPU_H
#include <types.h>
#include <asm/page.h>
struct per_cpu_arch {
uint32_t hart_id;
} __aligned(PAGE_SIZE); /* per_cpu_region size aligned with PAGE_SIZE */
#endif /* RISCV_PERCPU_H */