Changes in kernel/arch/arm32/src/mach/testarm/testarm.c [0e56575d:c0699467] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/mach/testarm/testarm.c
r0e56575d rc0699467 37 37 #include <arch/mach/testarm/testarm.h> 38 38 #include <mm/page.h> 39 #include <mm/km.h>40 39 #include <genarch/fb/fb.h> 41 40 #include <abi/fb/visuals.h> … … 72 71 void gxemul_init(void) 73 72 { 74 gxemul_kbd = (void *) km_map(GXEMUL_KBD_ADDRESS, PAGE_SIZE, 75 PAGE_WRITE | PAGE_NOT_CACHEABLE); 76 gxemul_rtc = (void *) km_map(GXEMUL_RTC_ADDRESS, PAGE_SIZE, 77 PAGE_WRITE | PAGE_NOT_CACHEABLE); 78 gxemul_irqc = (void *) km_map(GXEMUL_IRQC_ADDRESS, PAGE_SIZE, 79 PAGE_WRITE | PAGE_NOT_CACHEABLE); 73 gxemul_kbd = (void *) hw_map(GXEMUL_KBD_ADDRESS, PAGE_SIZE); 74 gxemul_rtc = (void *) hw_map(GXEMUL_RTC_ADDRESS, PAGE_SIZE); 75 gxemul_irqc = (void *) hw_map(GXEMUL_IRQC_ADDRESS, PAGE_SIZE); 80 76 } 81 77 … … 121 117 } 122 118 } 123 119 124 120 /* 125 121 * This is the necessary evil until the userspace driver is entirely … … 128 124 sysinfo_set_item_val("kbd", NULL, true); 129 125 sysinfo_set_item_val("kbd.inr", NULL, GXEMUL_KBD_IRQ); 130 sysinfo_set_item_val("kbd.address.physical", NULL, 131 GXEMUL_KBD_ADDRESS); 126 sysinfo_set_item_val("kbd.address.virtual", NULL, (sysarg_t) gxemul_kbd); 132 127 #endif 133 128 } … … 172 167 clock(); 173 168 spinlock_lock(&irq->lock); 174 169 175 170 /* acknowledge tick */ 176 171 *((uint32_t *) (gxemul_rtc + GXEMUL_RTC_ACK_OFFSET)) … … 181 176 static void gxemul_timer_irq_init(void) 182 177 { 183 184 185 186 187 188 189 178 irq_initialize(&gxemul_timer_irq); 179 gxemul_timer_irq.devno = device_assign_devno(); 180 gxemul_timer_irq.inr = GXEMUL_TIMER_IRQ; 181 gxemul_timer_irq.claim = gxemul_timer_claim; 182 gxemul_timer_irq.handler = gxemul_timer_irq_handler; 183 184 irq_register(&gxemul_timer_irq); 190 185 } 191 186 … … 198 193 void gxemul_timer_irq_start(void) 199 194 { 200 201 195 gxemul_timer_irq_init(); 196 gxemul_timer_start(GXEMUL_TIMER_FREQ); 202 197 } 203 198 … … 207 202 * @param size Place to store memory size. 208 203 */ 209 void gxemul_get_memory_extents(uintptr_t *start, size_t *size)204 void gxemul_get_memory_extents(uintptr_t *start, uintptr_t *size) 210 205 { 211 206 *start = 0; 212 207 *size = *((uintptr_t *) (GXEMUL_MP_ADDRESS + GXEMUL_MP_MEMSIZE_OFFSET)); 213 208 } 214 209 … … 227 222 uint32_t sources = gxemul_irqc_get_sources(); 228 223 unsigned int i; 229 224 230 225 for (i = 0; i < GXEMUL_IRQ_COUNT; i++) { 231 226 if (sources & (1 << i)) {
Note:
See TracChangeset
for help on using the changeset viewer.