FreeNOS
RaspberryKernel.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 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 __ARM_KERNEL_RASPBERRYKERNEL_H
19 #define __ARM_KERNEL_RASPBERRYKERNEL_H
20 
21 #include <FreeNOS/arm/ARMKernel.h>
23 
24 #ifdef BCM2836
26 #include <arm/ARMTimer.h>
27 #endif /* BCM2836 */
28 
40 class RaspberryKernel : public ARMKernel
41 {
42  public:
43 
50 
51  private:
52 
58  static void interrupt(CPUState state);
59 
60  private:
61 
64 
65 #ifdef BCM2836
66 
67  Broadcom2836 m_bcm;
68 
70  ARMTimer m_armTimer;
71 #endif /* BCM2836 */
72 
75 
78 };
79 
85 #endif /* __ARM_KERNEL_RASPBERRYKERNEL_H */
RaspberryKernel::interrupt
static void interrupt(CPUState state)
Interrupt handler routine.
Definition: RaspberryKernel.cpp:71
RaspberryKernel::RaspberryKernel
RaspberryKernel(CoreInfo *info)
Constructor function.
Definition: RaspberryKernel.cpp:28
ARMTimer
ARM Generic Timer.
Definition: ARMTimer.h:39
Broadcom2836.h
RaspberryKernel::m_timerIrq
u8 m_timerIrq
Interrupt number for the timer.
Definition: RaspberryKernel.h:77
BroadcomInterrupt
Raspberry Pi Interrupt Controller implementation.
Definition: BroadcomInterrupt.h:45
ARMTimer.h
BroadcomTimer
Broadcom System-on-Chip system timer.
Definition: BroadcomTimer.h:60
CPUState
Contains all the CPU registers.
Definition: ARMCore.h:243
CoreInfo
Per-Core information structure.
Definition: CoreInfo.h:60
Broadcom2836
Broadcom 2836 device specific I/O configuration.
Definition: Broadcom2836.h:38
RaspberryKernel::m_bcmIntr
BroadcomInterrupt m_bcmIntr
Broadcom specific interrupt controller.
Definition: RaspberryKernel.h:63
BroadcomTimer.h
u8
unsigned char u8
Unsigned 8-bit number.
Definition: Types.h:59
RaspberryKernel
Represents the Raspberry Pi kernel implementation.
Definition: RaspberryKernel.h:40
ARMKernel
Represents the ARM kernel implementation.
Definition: ARMKernel.h:40
RaspberryKernel::m_bcmTimer
BroadcomTimer m_bcmTimer
Broadcom specific timer module.
Definition: RaspberryKernel.h:74