invoke arch specific distfiles targets
[AROS.git] / arch / x86_64-pc / kernel / kernel_intern.h
blobd37d18426f9599bba51b05391428b652b716659f
1 #ifndef KERNEL_INTERN_H_
2 #define KERNEL_INTERN_H_
4 #include <inttypes.h>
6 #include <exec/nodes.h>
7 #include <exec/lists.h>
8 #include <aros/kernel.h>
9 #include <utility/tagitem.h>
10 #include <asm/cpu.h>
12 #define STACK_SIZE 65536
13 #define PAGE_SIZE 0x1000
14 #define PAGE_MASK 0x0FFF
16 struct APICData;
19 * Boot-time private data.
20 * This structure is write-protected in user mode and survives warm restarts.
22 struct KernBootPrivate
24 IPTR _APICBase; /* Bootstrap APIC base address */
25 UWORD kbp_APIC_BSPID; /* Bootstrap APIC logical ID */
26 unsigned short debug_y_resolution; /* Parameters of screen's lower half ('vesahack' mode) */
27 void *debug_framebuffer;
28 IPTR SystemStack; /* System stack base address */
29 void *GDT; /* Self-explanatory */
30 void *TSS;
31 void *system_tls;
32 void *IDT;
33 void *PML4;
34 void *PDP;
35 void *PDE;
36 void *PTE;
37 int used_page;
40 extern struct KernBootPrivate *__KernBootPrivate;
42 /* Platform-specific part of KernelBase */
43 struct PlatformData
45 APTR kb_APIC_TrampolineBase; /* Starting address of secondary core bootstrap code */
46 uint16_t kb_XTPIC_Mask; /* Current XT-PIC interrupt mask */
47 struct APICData *kb_APIC; /* APIC global data */
50 #define KBL_INTERNAL 0
51 #define KBL_XTPIC 1
52 #define KBL_APIC 2
54 /* Main boot code */
55 void core_Kick(struct TagItem *msg, void *target);
56 void kernel_cstart(const struct TagItem *msg);
58 /** CPU Functions **/
59 void core_SetupIDT(struct KernBootPrivate *);
60 void core_SetupGDT(struct KernBootPrivate *);
61 void core_SetupMMU(struct KernBootPrivate *);
62 void core_CPUSetup(UBYTE, IPTR);
63 void core_ProtKernelArea(intptr_t addr, intptr_t length, char p, char rw, char us);
64 void core_DefaultIRETQ();
65 ULONG acpi_Initialize(void);
66 void ictl_Initialize(void);
68 struct ExceptionContext;
70 /* Interrupt processing */
71 void core_LeaveInterrupt(struct ExceptionContext *);
72 void core_Supervisor(struct ExceptionContext *);
74 #endif /*KERNEL_INTERN_H_*/