15629675aSAdrien Destugues /* 25629675aSAdrien Destugues * Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. 35629675aSAdrien Destugues * Copyright 2019, Adrien Destugues, pulkomandy@pulkomandy.tk. 45629675aSAdrien Destugues * Distributed under the terms of the MIT License. 55629675aSAdrien Destugues */ 65629675aSAdrien Destugues #ifndef _KERNEL_ARCH_SPARC_CPU_H 75629675aSAdrien Destugues #define _KERNEL_ARCH_SPARC_CPU_H 85629675aSAdrien Destugues 95629675aSAdrien Destugues 105629675aSAdrien Destugues #include <arch/sparc/arch_thread_types.h> 115629675aSAdrien Destugues #include <kernel.h> 125629675aSAdrien Destugues 135629675aSAdrien Destugues 145629675aSAdrien Destugues #define CPU_MAX_CACHE_LEVEL 8 155629675aSAdrien Destugues #define CACHE_LINE_SIZE 128 165629675aSAdrien Destugues // 128 Byte lines on PPC970 175629675aSAdrien Destugues 185629675aSAdrien Destugues 19*6f88de11SAugustin Cavalier #define arch_cpu_enable_user_access() 20*6f88de11SAugustin Cavalier #define arch_cpu_disable_user_access() 215629675aSAdrien Destugues 225629675aSAdrien Destugues 235629675aSAdrien Destugues typedef struct arch_cpu_info { 245629675aSAdrien Destugues int null; 255629675aSAdrien Destugues } arch_cpu_info; 265629675aSAdrien Destugues 275629675aSAdrien Destugues 285629675aSAdrien Destugues #ifdef __cplusplus 295629675aSAdrien Destugues extern "C" { 305629675aSAdrien Destugues #endif 315629675aSAdrien Destugues 325629675aSAdrien Destugues 335629675aSAdrien Destugues static inline void arch_cpu_pause(void)345629675aSAdrien Destuguesarch_cpu_pause(void) 355629675aSAdrien Destugues { 365629675aSAdrien Destugues // TODO: CPU pause 375629675aSAdrien Destugues } 385629675aSAdrien Destugues 395629675aSAdrien Destugues 405629675aSAdrien Destugues static inline void arch_cpu_idle(void)415629675aSAdrien Destuguesarch_cpu_idle(void) 425629675aSAdrien Destugues { 435629675aSAdrien Destugues // TODO: CPU idle call 445629675aSAdrien Destugues } 455629675aSAdrien Destugues 465629675aSAdrien Destugues 475629675aSAdrien Destugues #ifdef __cplusplus 485629675aSAdrien Destugues } 495629675aSAdrien Destugues #endif 505629675aSAdrien Destugues 515629675aSAdrien Destugues #endif /* _KERNEL_ARCH_SPARC_CPU_H */ 52