32 #include <boot/types.h> 35 #define MEMMAP_MAX_RECORDS 32 36 #define MAX_OFW_ARGS 12 38 #define OFW_TREE_PATH_MAX_LEN 256 39 #define OFW_TREE_PROPERTY_MAX_NAMELEN 32 40 #define OFW_TREE_PROPERTY_MAX_VALUELEN 64 42 typedef unative_t ofw_arg_t;
43 typedef unsigned int ihandle;
44 typedef unsigned int phandle;
53 ofw_arg_t args[MAX_OFW_ARGS];
79 extern uintptr_t ofw_cif;
81 extern phandle ofw_chosen;
82 extern ihandle ofw_stdout;
83 extern phandle ofw_root;
84 extern ihandle ofw_mmu;
85 extern phandle ofw_memory;
87 extern void ofw_init(
void);
89 extern void ofw_write(
const char *str,
const int len);
91 extern int ofw_get_property(
const phandle
device,
const char *name,
void *buf,
const int buflen);
92 extern int ofw_get_proplen(
const phandle
device,
const char *name);
93 extern int ofw_next_property(
const phandle
device,
char *previous,
char *buf);
95 extern phandle ofw_get_child_node(
const phandle node);
96 extern phandle ofw_get_peer_node(
const phandle node);
97 extern phandle ofw_find_device(
const char *name);
99 extern int ofw_package_to_path(
const phandle
device,
char *buf,
const int buflen);
102 extern unsigned long ofw_call(
const char *service,
const int nargs,
const int nret, ofw_arg_t *rets, ...);
103 extern void ofw_write(
const char *str,
const int len);
104 extern void ofw_read(
void *str,
const int len);
105 extern unsigned int ofw_get_address_cells(
const phandle
device);
106 extern unsigned int ofw_get_size_cells(
const phandle
device);
107 extern void *ofw_translate(
const void *virt);
108 extern int ofw_translate_failed(ofw_arg_t flag);
109 extern void *ofw_claim_virt(
const void *virt,
const unsigned int len);
110 extern void *ofw_claim_phys(
const void *virt,
const unsigned int len);
111 extern void *ofw_claim_phys_any(
const unsigned int len,
const unsigned int alignment);
112 extern int ofw_map(
const void *phys,
const void *virt,
const unsigned int size,
const int mode);
114 extern void ofw_setup_screens(
void);
115 extern void ofw_quiesce(
void);
ofw_arg_t nret
Definition: ofw.h:52
ofw_arg_t nargs
Definition: ofw.h:51
Definition: rtemscompat1.h:15
ofw_arg_t service
Definition: ofw.h:50
unsigned size
Definition: tte.h:74