grub2: bring back build of aros-side grub2 tools
[AROS.git] / compiler / include / hardware / cpu / cpu.h
blob003c3468c38f5d53449cc855275795cc2fb93331
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: AROS Generic CPU Definitions.
6 Lang: english
7 */
8 #ifndef __AROS_CPU_H__
9 #define __AROS_CPU_H__
11 #ifndef EXEC_LISTS_H
12 # include <exec/lists.h>
13 #endif
14 #ifndef EXEC_SEMAPHORES
15 # include <exec/semaphores.h>
16 #endif
18 #include <hardware/pic/pic.h>
20 /* ALL supported processor families should have an entry here (for future compatability - DO NOT CHANGE THE ORDER!) */
22 enum supported_CPU_families
24 CPU_Family_Undefined = 0,
25 CPU_Family_68k = 1,
26 CPU_Family_PPC = 2,
27 CPU_Family_i386 = 3,
30 /* ALL supported processor chips */
32 enum supported_CPU_chips
34 CPU_Undefined = 0,
36 CPU_68k_68000 = 1,
37 CPU_68k_68010 = 2,
38 CPU_68k_68020 = 3,
39 CPU_68k_68030 = 4,
40 CPU_68k_68040 = 5,
41 CPU_68k_68060 = 6,
43 CPU_PPC_ = 100,
45 CPU_i386_386 = 200,
46 CPU_i386_486 = 201,
47 CPU_i386_586 = 202,
48 CPU_i386_686 = 203,
49 CPU_i386_786 = 204,
50 CPU_i386_886 = 205,
53 enum supported_FPU_chips
55 FPU_68881 = 0,
56 FPU_68882 = 1,
57 FPU_68040 = 2,
60 /***********/
62 struct CPUFam_Definition
64 struct MinList CPUF_FamilyList;
65 APTR CPUF_Name;
66 ULONG CPUF_FamilyID;
67 APTR CPUF_Resource;
70 struct CPU_Definition /* each "processor" in the system is allocated one of these blocks */
72 struct MinList CPU_CPUList; /* Is there another CPU in this system? */
73 ULONG *CPU_SMPGroup; /* Points to this CPUS SMP group (if applicable) */
75 ULONG CPU_ID; /* ID for processor in the system processor list
76 ID = 0 = listbase (not a cpu - they start at 1) */
77 ULONG CPU_Physical; /* SMP Physical Processor ID (if applicable) */
78 /* for CPU_ID 0 , this contains the number of processors */
79 ULONG CPU_Family;
80 ULONG CPU_Model;
82 BOOL CPU_Enabled; /* Can this CPU be used? */
83 BOOL CPU_IsOnline; /* is this CPU running? */
84 BOOL CPU_BootCPU; /* Was this the CPU that booted the system.. */
86 /* The next 4 pointers are used to store processor specific information */
88 APTR CPU_Private1; /* CPU architecture specific control information etc
89 i386 stores i386_compat_intern here.... */
90 APTR CPU_Private2; /* CPU architecture specific control information etc */
91 APTR CPU_Private3; /* CPU architecture specific control information etc */
92 APTR CPU_Private4; /* CPU architecture specific control information etc */
95 struct SMP_Definition /* each SMP processor group in the system is allocated one of these blocks */
97 struct MinList SMP_SMPList; /* Are there MORE SMP groups!?!?!? */
98 struct SignalSemaphore SMP_GrpLock; /* Control access to the SMP group.. */
99 ULONG SMP_ID; /* Which SMP Group is this */
100 ULONG SMP_CPUCount; /* SMP Physical Processor ID (if applicable) */
101 ULONG SMP_RecordCount; /* No. of records in the SMP config */
102 ULONG SMP_PIC_Mode;
103 ULONG *SMP_APIC; /* Points to the local APIC address */
106 /***********/
108 struct CPUBase
110 struct Node CPUB_Node;
111 struct ExecBase *CPUB_SysBase;
112 struct UtilityBase *CPUB_UtilBase;
113 struct PICBase *CPUB_PICBase;
115 struct SignalSemaphore CPUB_ListLock; /* Control access to the cpu list.. */
117 struct CPUFam_Definition *CPUB_ProcFamilies;
119 struct CPU_Definition *CPUB_Processors; /* Lists ALL processors in the system */
120 struct SMP_Definition *CPUB_SMP_Groups; /* Points to a list of SMP groups */
122 LONG CPUB_BOOT_Physical;
123 LONG CPUB_BOOT_Logical;
125 BOOL CPUB_SMP_Enabled;
126 int CPUB_SMP_Config;
130 #endif /* __AROS_CPU_H__ */