Rev 1620 | Rev 1764 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1620 | Rev 1755 | ||
---|---|---|---|
Line 48... | Line 48... | ||
48 | } ofw_args_t; |
48 | } ofw_args_t; |
49 | 49 | ||
50 | typedef void (*ofw_entry)(ofw_args_t *); |
50 | typedef void (*ofw_entry)(ofw_args_t *); |
51 | 51 | ||
52 | 52 | ||
- | 53 | typedef struct { |
|
- | 54 | unsigned int info; |
|
- | 55 | unsigned int addr_hi; |
|
- | 56 | unsigned int addr_lo; |
|
- | 57 | } pci_addr_t; |
|
- | 58 | ||
- | 59 | typedef struct { |
|
- | 60 | pci_addr_t addr; |
|
- | 61 | unsigned int size_hi; |
|
- | 62 | unsigned int size_lo; |
|
- | 63 | } pci_reg_t; |
|
- | 64 | ||
- | 65 | ||
53 | ofw_entry ofw; |
66 | ofw_entry ofw; |
54 | 67 | ||
55 | phandle ofw_chosen; |
68 | phandle ofw_chosen; |
56 | ihandle ofw_stdout; |
69 | ihandle ofw_stdout; |
57 | phandle ofw_root; |
70 | phandle ofw_root; |
Line 256... | Line 269... | ||
256 | 269 | ||
257 | phandle device = ofw_find_device(device_name); |
270 | phandle device = ofw_find_device(device_name); |
258 | if (device == -1) |
271 | if (device == -1) |
259 | return false; |
272 | return false; |
260 | 273 | ||
- | 274 | pci_reg_t macio; |
|
- | 275 | if (ofw_get_property(device, "assigned-addresses", &macio, sizeof(macio)) <= 0) |
|
261 | // FIXME |
276 | return false; |
- | 277 | ||
262 | keyboard->addr = (void *) 0x80816000; |
278 | keyboard->addr = (void *) macio.addr.addr_lo; |
263 | keyboard->size = 7680; |
279 | keyboard->size = macio.size_lo; |
264 | 280 | ||
265 | return true; |
281 | return true; |
266 | } |
282 | } |