1 /*---------------------------------------------------------------------------*
2   Project:  OS System information
3   File:     OSSystemInfo.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 __OSSYSTEMINFO_H__
16 #define __OSSYSTEMINFO_H__
17 
18 #include <cafe/os.h>
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 // Global information in the system.
25 // Kernel sets OSSystemInfo. Application only reads it.
26 typedef struct OSSystemInfo
27 {
28     u32     busClockSpeed;
29     u32     coreClockSpeed;
30     OSTime  timeBase; // ticks from 2000-01-01 until system reset
31     u32     L2Size[MAX_SYSTEM_CORES];
32     u32     cpuFreqRatio;
33 } OSSystemInfo;
34 
35 
36 // Static information per application.
37 // Kernel/loader sets OSApplicationInfo. Application only reads it.
38 typedef struct OSApplicationInfo
39 {
40     u32 gamename;
41     u32 applicationType;
42     u32 firmwareVersion; // firmware required by this application.
43 } OSApplicationInfo;
44 
45 OSSystemInfo * OSGetSystemInfo(void);
46 
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif  // __OSSYSTEMINFO_H__
53