-
Notifications
You must be signed in to change notification settings - Fork 37
/
board.h
36 lines (32 loc) · 1.34 KB
/
board.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* -*- mode: c; coding:utf-8 -*- */
/**********************************************************************/
/* OS kernel sample */
/* Copyright 2014 Takeharu KATO */
/* */
/* Board specific definitions */
/* */
/**********************************************************************/
#if !defined(_BOARD_H)
#define _BOARD_H
/*
* GIC on QEMU Virt
*/
#define QEMU_VIRT_GIC_BASE (0x08000000)
#define QEMU_VIRT_GIC_INT_MAX (64)
#define QEMU_VIRT_GIC_PRIO_MAX (16)
/* SGI: Interrupt IDs 0-15 */
/* PPI: Interrupt IDs 16-31 */
/* SPI: Interrupt IDs 32-63 */
#define QEMU_VIRT_GIC_INTNO_SGIO (0)
#define QEMU_VIRT_GIC_INTNO_PPIO (16)
#define QEMU_VIRT_GIC_INTNO_SPIO (32)
#define GIC_BASE (QEMU_VIRT_GIC_BASE)
#define GIC_INT_MAX (QEMU_VIRT_GIC_INT_MAX)
#define GIC_PRIO_MAX (QEMU_VIRT_GIC_PRIO_MAX)
#define GIC_INTNO_SGI0 (QEMU_VIRT_GIC_INTNO_SGIO)
#define GIC_INTNO_PPI0 (QEMU_VIRT_GIC_INTNO_PPIO)
#define GIC_INTNO_SPI0 (QEMU_VIRT_GIC_INTNO_SPIO)
#define GIC_PRI_SHIFT (4)
#define GIC_PRI_MASK (0x0f)
#define TIMER_IRQ (27) /** Timer IRQ */
#endif /* _BOARD_H */