FreeNOS
IntelKernel.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 Niek Linnenbank
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef __INTEL_KERNEL_H
19#define __INTEL_KERNEL_H
20
21#include <FreeNOS/Kernel.h>
22#include <intel/IntelPIT.h>
23#include <intel/IntelPIC.h>
24#include <intel/IntelAPIC.h>
25#include <Timer.h>
26#include <Types.h>
27#include <BootImage.h>
28
43class IntelKernel : public Kernel
44{
45 public:
46
50 IntelKernel(CoreInfo *info);
51
58 virtual void enableIRQ(u32 irq, bool enabled);
59
60 private:
61
69 static void exception(CPUState *state, ulong param, ulong vector);
70
78 static void interrupt(CPUState *state, ulong param, ulong vector);
79
87 static void trap(CPUState *state, ulong param, ulong vector);
88
96 static void clocktick(CPUState *state, ulong param, ulong vector);
97
98 private:
99
102
105
108};
109
115#endif /* __INTEL_KERNEL_H */
Intel Advanced Programmable Interrupt Controller (APIC)
Definition IntelAPIC.h:46
Implements an x86 compatible kernel.
Definition IntelKernel.h:44
IntelAPIC m_apic
APIC instance (used if available)
static void clocktick(CPUState *state, ulong param, ulong vector)
i8253 system clock interrupt handler.
static void exception(CPUState *state, ulong param, ulong vector)
Called when the CPU detects a fault.
static void interrupt(CPUState *state, ulong param, ulong vector)
Default interrupt handler.
IntelPIT m_pit
PIT timer instance.
static void trap(CPUState *state, ulong param, ulong vector)
Kernel trap handler (system calls).
IntelPIC m_pic
PIC instance.
virtual void enableIRQ(u32 irq, bool enabled)
Enable or disable an hardware interrupt (IRQ).
Intel 8259 Programmable Interrupt Controller (PIC).
Definition IntelPIC.h:41
Intel 8254 Programmable Interrupt Timer (PIT).
Definition IntelPIT.h:41
FreeNOS kernel implementation.
Definition Kernel.h:93
unsigned int u32
Unsigned 32-bit number.
Definition Types.h:53
unsigned long ulong
Unsigned long number.
Definition Types.h:47
void param(Terminal *term, int key, int value)
Set terminal parameters.
Definition Terminal.cpp:305
Contains all the CPU registers.
Definition ARMCore.h:244
Per-Core information structure.
Definition CoreInfo.h:61