1 #include <l4/drivers/of.h>
6 class Of_if : public Of
12 phandle_t get_device(const char*, const char *prop = "device_type");
13 unsigned long cpu_detect(const char *prop);
16 Of_if() : Of(), _chosen(0), _root(0) {}
17 unsigned long detect_ramsize();
18 unsigned long detect_cpu_freq();
19 unsigned long detect_bus_freq();
20 unsigned long detect_time_freq();
21 bool detect_devices(unsigned long *start_addr, unsigned long *length);
24 phandle_t get_chosen()
26 if(handle_valid(_chosen)) return _chosen;
27 _chosen = (phandle_t)prom_call("finddevice", 1, 1, "/chosen");
33 if(handle_valid(_root)) return _root;
34 _root = (ihandle_t)prom_call("finddevice", 1, 1, "/");
38 void vesa_set_mode(int mode);