1 /*---------------------------------------------------------------------------* 2 Project: Cafe OS Core 3 File: OSCore.h 4 5 Copyright (C) Nintendo. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 *---------------------------------------------------------------------------*/ 14 15 #ifndef __OSCORE_H__ 16 #define __OSCORE_H__ 17 18 #define MAX_SYSTEM_CORES 3 19 #define MAX_CORES_ESPRESSO 3 20 #define MAX_CORES_BROADWAY 1 21 22 #define OS_COREID_0 0 23 #define OS_COREID_1 1 24 #define OS_COREID_2 2 25 26 #define CACHE_BLOCK_SIZE 32 27 #define L1_CACHE_LINE_SIZE 32 28 #define L2_CACHE_LINE_SIZE 64 29 #define LL_CACHE_FETCH_SIZE 64 // last-level cache fetch size. Can be 32 or 64 bytes. 30 31 #define PPC_IO_BUFFER_SIZE_MIN LL_CACHE_FETCH_SIZE 32 #define PPC_IO_BUFFER_ALIGN LL_CACHE_FETCH_SIZE 33 34 #ifndef _ASSEMBLER 35 36 #include <types.h> 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 u32 OSGetCoreCount(void); 43 u32 OSGetCoreId(void); 44 u32 OSGetMainCoreId(void); 45 BOOL OSIsMainCore(void); 46 47 #ifdef __cplusplus 48 } 49 #endif 50 51 #endif // _ASSEMBLER 52 53 #endif // __OSCORE_H__ 54