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