Rev 4675 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4675 | Rev 4678 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | * Copyright (c) 2007 Michal Kebrt |
2 | * Copyright (c) 2007 Michal Kebrt |
3 | * Copyright (c) 2009 Vineeth Pillai |
3 | * Copyright (c) 2009 Vineeth Pillai |
4 | * All rights reserved. |
4 | * All rights reserved. |
5 | * |
5 | * |
6 | * Redistribution and use in source and binary forms, with or without |
6 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions |
7 | * modification, are permitted provided that the following conditions |
8 | * are met: |
8 | * are met: |
9 | * |
9 | * |
10 | * - Redistributions of source code must retain the above copyright |
10 | * - Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. |
11 | * notice, this list of conditions and the following disclaimer. |
12 | * - Redistributions in binary form must reproduce the above copyright |
12 | * - Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the |
13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. |
14 | * documentation and/or other materials provided with the distribution. |
15 | * - The name of the author may not be used to endorse or promote products |
15 | * - The name of the author may not be used to endorse or promote products |
16 | * derived from this software without specific prior written permission. |
16 | * derived from this software without specific prior written permission. |
17 | * |
17 | * |
18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
19 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
19 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
20 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
20 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
21 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
21 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
22 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
22 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
23 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
24 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
25 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
27 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 | */ |
28 | */ |
29 | 29 | ||
30 | /** @addtogroup arm32gxemul GXemul |
30 | /** @addtogroup arm32gxemul GXemul |
31 | * @brief GXemul machine specific parts. |
31 | * @brief GXemul machine specific parts. |
32 | * @ingroup arm32 |
32 | * @ingroup arm32 |
33 | * @{ |
33 | * @{ |
34 | */ |
34 | */ |
35 | /** @file |
35 | /** @file |
36 | * @brief GXemul peripheries drivers declarations. |
36 | * @brief GXemul peripheries drivers declarations. |
37 | */ |
37 | */ |
38 | 38 | ||
39 | #ifndef KERN_arm32_MACHINE_H_ |
39 | #ifndef KERN_arm32_MACHINE_H_ |
40 | #define KERN_arm32_MACHINE_H_ |
40 | #define KERN_arm32_MACHINE_H_ |
41 | 41 | ||
42 | #include <arch/machine_func.h> |
42 | #include <arch/machine_func.h> |
43 | 43 | ||
44 | /** Last interrupt number (beginning from 0) whose status is probed |
44 | /** Last interrupt number (beginning from 0) whose status is probed |
45 | * from interrupt controller |
45 | * from interrupt controller |
46 | */ |
46 | */ |
47 | #define GXEMUL_IRQC_MAX_IRQ 8 |
47 | #define GXEMUL_IRQC_MAX_IRQ 8 |
48 | #define GXEMUL_KBD_IRQ 2 |
48 | #define GXEMUL_KBD_IRQ 2 |
49 | #define GXEMUL_TIMER_IRQ 4 |
49 | #define GXEMUL_TIMER_IRQ 4 |
50 | 50 | ||
51 | /** Timer frequency */ |
51 | /** Timer frequency */ |
52 | #define GXEMUL_TIMER_FREQ 100 |
52 | #define GXEMUL_TIMER_FREQ 100 |
53 | 53 | ||
54 | #define GXEMUL_KBD_ADDRESS 0x10000000 |
54 | #define GXEMUL_KBD_ADDRESS 0x10000000 |
55 | #define GXEMUL_MP_ADDRESS 0x11000000 |
55 | #define GXEMUL_MP_ADDRESS 0x11000000 |
56 | #define GXEMUL_FB_ADDRESS 0x12000000 |
56 | #define GXEMUL_FB_ADDRESS 0x12000000 |
57 | #define GXEMUL_RTC_ADDRESS 0x15000000 |
57 | #define GXEMUL_RTC_ADDRESS 0x15000000 |
58 | #define GXEMUL_IRQC_ADDRESS 0x16000000 |
58 | #define GXEMUL_IRQC_ADDRESS 0x16000000 |
59 | 59 | ||
60 | extern void *gxemul_kbd; |
60 | extern void *gxemul_kbd; |
61 | extern void *gxemul_rtc; |
61 | extern void *gxemul_rtc; |
62 | extern void *gxemul_irqc; |
62 | extern void *gxemul_irqc; |
63 | 63 | ||
64 | #define GXEMUL_HALT_OFFSET 0x010 |
64 | #define GXEMUL_HALT_OFFSET 0x010 |
65 | #define GXEMUL_RTC_FREQ_OFFSET 0x100 |
65 | #define GXEMUL_RTC_FREQ_OFFSET 0x100 |
66 | #define GXEMUL_MP_MEMSIZE_OFFSET 0x090 |
66 | #define GXEMUL_MP_MEMSIZE_OFFSET 0x090 |
67 | #define GXEMUL_RTC_ACK_OFFSET 0x110 |
67 | #define GXEMUL_RTC_ACK_OFFSET 0x110 |
68 | 68 | ||
69 | extern void gxemul_init(void); |
69 | extern void gxemul_init(void); |
70 | extern void gxemul_fb_init(void); |
70 | extern void gxemul_fb_init(void); |
71 | extern void gxemul_output_init(void); |
71 | extern void gxemul_output_init(void); |
72 | extern void gxemul_input_init(void); |
72 | extern void gxemul_input_init(void); |
73 | extern void gxemul_release_console(void); |
73 | extern void gxemul_release_console(void); |
74 | extern void gxemul_grab_console(void); |
74 | extern void gxemul_grab_console(void); |
75 | extern void gxemul_timer_irq_start(void); |
75 | extern void gxemul_timer_irq_start(void); |
76 | extern void gxemul_cpu_halt(void); |
76 | extern void gxemul_cpu_halt(void); |
77 | extern void gxemul_irq_exception(int exc_no, istate_t *istate); |
77 | extern void gxemul_irq_exception(int exc_no, istate_t *istate); |
78 | extern uintptr_t gxemul_get_memory_size(void); |
78 | extern uintptr_t gxemul_get_memory_size(void); |
79 | extern uintptr_t gxemul_get_fb_address(void); |
79 | extern uintptr_t gxemul_get_fb_address(void); |
80 | extern void gxemul_fb_init(void); |
80 | extern void gxemul_fb_init(void); |
81 | extern void gxemul_frame_init(void); |
81 | extern void gxemul_frame_init(void); |
82 | 82 | ||
83 | 83 | ||
84 | #endif |
84 | #endif |
85 | 85 | ||
86 | /** @} |
86 | /** @} |
87 | */ |
87 | */ |
88 | 88 |