Rev 4342 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4342 | Rev 4343 | ||
---|---|---|---|
Line 39... | Line 39... | ||
39 | #include <arch/cp0.h> |
39 | #include <arch/cp0.h> |
40 | #include <console/console.h> |
40 | #include <console/console.h> |
41 | #include <sysinfo/sysinfo.h> |
41 | #include <sysinfo/sysinfo.h> |
42 | #include <ddi/ddi.h> |
42 | #include <ddi/ddi.h> |
43 | 43 | ||
44 | static parea_t msim_parea; |
- | |
45 | static chardev_t console; |
44 | static chardev_t console; |
46 | static irq_t msim_irq; |
45 | static irq_t msim_irq; |
47 | 46 | ||
48 | static void msim_write(chardev_t *dev, const char ch, bool silent); |
47 | static void msim_write(chardev_t *dev, const char ch, bool silent); |
49 | static void msim_enable(chardev_t *dev); |
48 | static void msim_enable(chardev_t *dev); |
Line 92... | Line 91... | ||
92 | } |
91 | } |
93 | } |
92 | } |
94 | } |
93 | } |
95 | 94 | ||
96 | /** Process keyboard interrupt. */ |
95 | /** Process keyboard interrupt. */ |
97 | static void msim_irq_handler(irq_t *irq, void *arg, ...) |
96 | static void msim_irq_handler(irq_t *irq) |
98 | { |
97 | { |
99 | if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) |
98 | if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) |
100 | ipc_irq_send_notif(irq); |
99 | ipc_irq_send_notif(irq); |
101 | else { |
100 | else { |
102 | char ch = 0; |
101 | char ch = 0; |
Line 108... | Line 107... | ||
108 | ch = '\b'; |
107 | ch = '\b'; |
109 | chardev_push_character(&console, ch); |
108 | chardev_push_character(&console, ch); |
110 | } |
109 | } |
111 | } |
110 | } |
112 | 111 | ||
113 | static irq_ownership_t msim_claim(void) |
112 | static irq_ownership_t msim_claim(void *instance) |
114 | { |
113 | { |
115 | return IRQ_ACCEPT; |
114 | return IRQ_ACCEPT; |
116 | } |
115 | } |
117 | 116 | ||
118 | void msim_kbd_grab(void) |
117 | void msim_kbd_grab(void) |
Line 154... | Line 153... | ||
154 | sysinfo_set_item_val("kbd", NULL, true); |
153 | sysinfo_set_item_val("kbd", NULL, true); |
155 | sysinfo_set_item_val("kbd.devno", NULL, devno); |
154 | sysinfo_set_item_val("kbd.devno", NULL, devno); |
156 | sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ); |
155 | sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ); |
157 | sysinfo_set_item_val("kbd.address.virtual", NULL, MSIM_KBD_ADDRESS); |
156 | sysinfo_set_item_val("kbd.address.virtual", NULL, MSIM_KBD_ADDRESS); |
158 | 157 | ||
159 | msim_parea.pbase = KA2PA(MSIM_VIDEORAM); |
- | |
160 | msim_parea.vbase = MSIM_VIDEORAM; |
- | |
161 | msim_parea.frames = 1; |
- | |
162 | msim_parea.cacheable = false; |
- | |
163 | ddi_parea_register(&msim_parea); |
- | |
164 | - | ||
165 | sysinfo_set_item_val("fb", NULL, true); |
158 | sysinfo_set_item_val("fb", NULL, true); |
166 | sysinfo_set_item_val("fb.kind", NULL, 3); |
159 | sysinfo_set_item_val("fb.kind", NULL, 3); |
167 | sysinfo_set_item_val("fb.address.physical", NULL, KA2PA(MSIM_VIDEORAM)); |
160 | sysinfo_set_item_val("fb.address.physical", NULL, KA2PA(MSIM_VIDEORAM)); |
168 | } |
161 | } |
169 | 162 |