add arm64 support
- add arm64 dependent codes with GICv3 and SVE support - fix bugs based on architecture separation requests
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
/*
|
||||
* HISTORY
|
||||
*/
|
||||
/* cpu.h COPYRIGHT FUJITSU LIMITED 2015-2016 */
|
||||
|
||||
#ifndef IHK_CPU_H
|
||||
#define IHK_CPU_H
|
||||
@ -88,11 +89,21 @@ void ihk_mc_init_user_process(ihk_mc_kernel_context_t *ctx,
|
||||
void ihk_mc_init_user_tlsbase(ihk_mc_user_context_t *ctx,
|
||||
unsigned long tls_base_addr);
|
||||
|
||||
#ifdef POSTK_DEBUG_ARCH_DEP_42 /* /proc/cpuinfo support added. */
|
||||
long ihk_mc_show_cpuinfo(char *buf, size_t buf_size, unsigned long read_off, int *eofp);
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_42 */
|
||||
|
||||
enum ihk_mc_user_context_regtype {
|
||||
IHK_UCR_STACK_POINTER = 1,
|
||||
IHK_UCR_PROGRAM_COUNTER = 2,
|
||||
};
|
||||
|
||||
#ifdef POSTK_DEBUG_ARCH_DEP_23 /* add arch dep. clone_process() function */
|
||||
struct thread;
|
||||
void arch_clone_thread(struct thread *othread, unsigned long pc,
|
||||
unsigned long sp, struct thread *nthread);
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_23 */
|
||||
|
||||
void ihk_mc_modify_user_context(ihk_mc_user_context_t *uctx,
|
||||
enum ihk_mc_user_context_regtype reg,
|
||||
unsigned long value);
|
||||
@ -104,15 +115,19 @@ enum ihk_asr_type {
|
||||
IHK_ASR_X86_GS,
|
||||
};
|
||||
|
||||
#ifndef POSTK_DEBUG_ARCH_DEP_75 /* x86 depend hide */
|
||||
/* Local IRQ vectors */
|
||||
#define LOCAL_TIMER_VECTOR 0xef
|
||||
#define LOCAL_PERF_VECTOR 0xf0
|
||||
#endif /* !POSTK_DEBUG_ARCH_DEP_75 */
|
||||
|
||||
#define IHK_TLB_FLUSH_IRQ_VECTOR_START 68
|
||||
#define IHK_TLB_FLUSH_IRQ_VECTOR_SIZE 64
|
||||
#define IHK_TLB_FLUSH_IRQ_VECTOR_END (IHK_TLB_FLUSH_IRQ_VECTOR_START + IHK_TLB_FLUSH_IRQ_VECTOR_SIZE)
|
||||
|
||||
#ifndef POSTK_DEBUG_ARCH_DEP_75 /* x86 depend hide */
|
||||
#define LOCAL_SMP_FUNC_CALL_VECTOR 0xf1
|
||||
#endif /* !POSTK_DEBUG_ARCH_DEP_75 */
|
||||
|
||||
int ihk_mc_arch_set_special_register(enum ihk_asr_type, unsigned long value);
|
||||
int ihk_mc_arch_get_special_register(enum ihk_asr_type, unsigned long *value);
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
/* debug.h COPYRIGHT FUJITSU LIMITED 2015-2016 */
|
||||
/**
|
||||
* \file debug.h
|
||||
* License details are found in the file LICENSE.
|
||||
@ -17,6 +18,21 @@
|
||||
#include <ihk/memconst.h>
|
||||
#include <ihk/kmsg.h>
|
||||
|
||||
#ifdef POSTK_DEBUG_ARCH_DEP_9 /* want to add a static assertion */
|
||||
|
||||
/* Force a compilation error if condition is false */
|
||||
#define STATIC_ASSERT(cond) _STATIC_ASSERT(cond, __LINE__)
|
||||
#define _STATIC_ASSERT(cond, line) __STATIC_ASSERT(cond, line)
|
||||
#define __STATIC_ASSERT(cond, line) \
|
||||
static void __static_assert_ ## line (void) { \
|
||||
STATIC_ASSERT_LOCAL(cond); \
|
||||
}
|
||||
|
||||
/* Force a compilation error if condition is false */
|
||||
#define STATIC_ASSERT_LOCAL(cond) ((void)sizeof(struct { int:-!!!(cond); }))
|
||||
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_9 */
|
||||
|
||||
struct ihk_kmsg_buf {
|
||||
int tail;
|
||||
int len;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
/* perfctr.h COPYRIGHT FUJITSU LIMITED 2015-2016 */
|
||||
/**
|
||||
* \file perfctr.h
|
||||
* License details are found in the file LICENSE.
|
||||
@ -13,6 +14,10 @@
|
||||
#ifndef HEADER_GENERIC_IHK_PERFCTR_H
|
||||
#define HEADER_GENERIC_IHK_PERFCTR_H
|
||||
|
||||
#ifdef POSTK_DEBUG_TEMP_FIX_29
|
||||
#include <types.h>
|
||||
#endif /*POSTK_DEBUG_TEMP_FIX_29*/
|
||||
|
||||
#define PERFCTR_USER_MODE 0x01
|
||||
#define PERFCTR_KERNEL_MODE 0x02
|
||||
|
||||
@ -48,10 +53,20 @@ enum ihk_perfctr_type {
|
||||
PERFCTR_MAX_TYPE,
|
||||
};
|
||||
|
||||
#ifdef POSTK_DEBUG_TEMP_FIX_29
|
||||
int ihk_mc_perfctr_init(int counter, uint64_t config, int mode);
|
||||
int ihk_mc_perfctr_init_raw(int counter, uint64_t config, int mode);
|
||||
#else
|
||||
int ihk_mc_perfctr_init(int counter, enum ihk_perfctr_type type, int mode);
|
||||
int ihk_mc_perfctr_init_raw(int counter, unsigned int code, int mode);
|
||||
#endif/*POSTK_DEBUG_TEMP_FIX_29*/
|
||||
#ifdef POSTK_DEBUG_TEMP_FIX_30
|
||||
int ihk_mc_perfctr_start(int counter);
|
||||
int ihk_mc_perfctr_stop(int counter);
|
||||
#else
|
||||
int ihk_mc_perfctr_start(unsigned long counter_mask);
|
||||
int ihk_mc_perfctr_stop(unsigned long counter_mask);
|
||||
#endif/*POSTK_DEBUG_TEMP_FIX_30*/
|
||||
int ihk_mc_perfctr_fixed_init(int counter, int mode);
|
||||
int ihk_mc_perfctr_reset(int counter);
|
||||
int ihk_mc_perfctr_set(int counter, long value);
|
||||
|
||||
Reference in New Issue
Block a user