Changeset View
Changeset View
Standalone View
Standalone View
stand/libofw/openfirm.h
| Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | |||||
| #define _OPENFIRM_H_ | #define _OPENFIRM_H_ | ||||
| /* | /* | ||||
| * Prototypes for Open Firmware Interface Routines | * Prototypes for Open Firmware Interface Routines | ||||
| */ | */ | ||||
| #include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
| #include <sys/types.h> | #include <sys/types.h> | ||||
| typedef unsigned int ihandle_t; | typedef uint32_t ihandle_t; | ||||
| typedef unsigned int phandle_t; | typedef uint32_t phandle_t; | ||||
| typedef unsigned long int cell_t; | typedef uint32_t cell_t; | ||||
| extern int (*openfirmware)(void *); | extern int (*openfirmware)(void *); | ||||
| extern phandle_t chosen; | extern phandle_t chosen; | ||||
| extern ihandle_t memory, mmu; | extern ihandle_t memory, mmu; | ||||
| extern int real_mode; | extern int real_mode; | ||||
| /* | /* | ||||
| * This isn't actually an Open Firmware function, but it seemed like the right | * This isn't actually an Open Firmware function, but it seemed like the right | ||||
| * place for it to go. | * place for it to go. | ||||
| */ | */ | ||||
| void OF_init(int (*openfirm)(void *)); | void OF_init(int (*openfirm)(void *)); | ||||
| /* Generic functions */ | /* Generic functions */ | ||||
| int OF_test(char *); | int OF_test(char *); | ||||
| void OF_quiesce(); /* Disable firmware */ | void OF_quiesce(); /* Disable firmware */ | ||||
| /* Device tree functions */ | /* Device tree functions */ | ||||
| phandle_t OF_peer(phandle_t); | phandle_t OF_peer(phandle_t); | ||||
| phandle_t OF_child(phandle_t); | phandle_t OF_child(phandle_t); | ||||
| phandle_t OF_parent(phandle_t); | phandle_t OF_parent(phandle_t); | ||||
| phandle_t OF_instance_to_package(ihandle_t); | phandle_t OF_instance_to_package(ihandle_t); | ||||
| int OF_getproplen(phandle_t, const char *); | int OF_getproplen(phandle_t, const char *); | ||||
| int OF_getprop(phandle_t, const char *, void *, int); | int OF_getprop(phandle_t, const char *, void *, int); | ||||
| int OF_getencprop(phandle_t, const char *, cell_t *, int); | |||||
| int OF_nextprop(phandle_t, const char *, char *); | int OF_nextprop(phandle_t, const char *, char *); | ||||
| int OF_setprop(phandle_t, const char *, void *, int); | int OF_setprop(phandle_t, const char *, void *, int); | ||||
| int OF_canon(const char *, char *, int); | int OF_canon(const char *, char *, int); | ||||
| phandle_t OF_finddevice(const char *); | phandle_t OF_finddevice(const char *); | ||||
| int OF_instance_to_path(ihandle_t, char *, int); | int OF_instance_to_path(ihandle_t, char *, int); | ||||
| int OF_package_to_path(phandle_t, char *, int); | int OF_package_to_path(phandle_t, char *, int); | ||||
| int OF_call_method(char *, ihandle_t, int, int, ...); | int OF_call_method(char *, ihandle_t, int, int, ...); | ||||
| Show All 23 Lines | |||||