A set of methods to implement the Open Firmware client side interface.
More...
A set of methods to implement the Open Firmware client side interface.
◆ _addr
◆ _align
◆ _args_and_returns
cell_t* _args_and_returns |
◆ _buf
◆ _cmd
◆ _cookie
◆ _handle
◆ _instance
◆ _method
◆ _name
◆ _nargs
◆ _node
◆ _nreturns
◆ _off
◆ _path
◆ _prop
◆ _returns
◆ _size
◆ call_method
Initial value:
Call method belonging to an instance handle.
- Parameters
-
_instance | Instance handle |
_method | Method name |
_nargs | Number of arguments |
_nreturns | Number of return values |
_args_and_returns | Values for arguments, followed by returns |
Definition at line 225 of file ofw_if.m.
◆ canon
Initial value:
Canonicalize path.
- Parameters
-
_path | Path to canonicalize |
_buf | Buffer for canonicalized path |
_size | Size of buffer |
Definition at line 158 of file ofw_if.m.
◆ child
Initial value:
Return first child of node.
- Parameters
-
Definition at line 76 of file ofw_if.m.
Referenced by OF_child_xref_phandle(), ofw_bus_find_child(), ofw_bus_find_child_device_by_phandle(), ofw_bus_find_compatible(), ofw_bus_gen_child_pnpinfo(), ofw_cpu_early_foreach(), ofw_cpulist_attach(), ofw_cpulist_get_devinfo(), ofw_graph_get_endpoint_by_idx(), ofw_graph_get_port_by_idx(), ofw_graph_port_get_num_endpoints(), ofw_pcib_activate_resource(), ofw_pcib_adjust_resource(), ofw_pcib_alloc_resource(), ofw_pcib_deactivate_resource(), ofw_pcib_release_resource(), ofw_std_child(), ofwbus_alloc_resource(), and ofwbus_release_resource().
◆ claim
Initial value:
Claim virtual memory.
- Parameters
-
_addr | Requested memory location (NULL for first available) |
_size | Requested size in bytes |
_align | Requested alignment |
Definition at line 321 of file ofw_if.m.
◆ close
Initial value:
Close node instance.
- Parameters
-
_instance | Instance to close |
Definition at line 267 of file ofw_if.m.
◆ enter
Initial value:
Temporarily return control to firmware.
Definition at line 345 of file ofw_if.m.
◆ exit
Initial value:
Halt and return control to firmware.
Definition at line 352 of file ofw_if.m.
◆ finddevice
Initial value:
Return phandle for named device.
- Parameters
-
Definition at line 170 of file ofw_if.m.
◆ getprop
Initial value:
Read node property.
- Parameters
-
_node | Selected node |
_prop | Property name |
_buf | Pointer to buffer |
_size | Size of buffer |
Definition at line 111 of file ofw_if.m.
◆ getproplen
METHOD ssize_t getproplen |
Initial value:
Return length of node property.
- Parameters
-
_node | Selected node |
_prop | Property name |
Definition at line 97 of file ofw_if.m.
◆ init
Initial value:
Initialize OFW client interface.
- Parameters
-
_cookie | A handle to the client interface, generally the OF callback routine. |
Definition at line 46 of file ofw_if.m.
◆ instance_to_package
Initial value:
Return package corresponding to instance.
- Parameters
-
Definition at line 86 of file ofw_if.m.
◆ instance_to_path
METHOD ssize_t instance_to_path |
Initial value:
Return path for node instance.
- Parameters
-
_handle | Instance handle |
_path | Buffer for path |
_size | Size of buffer |
Definition at line 182 of file ofw_if.m.
◆ interpret
Initial value:
Interpret a forth command.
- Parameters
-
_cmd | Command |
_nreturns | Number of return values |
_returns | Values for returns |
Definition at line 243 of file ofw_if.m.
◆ nextprop
Initial value:
Get next property name.
- Parameters
-
_node | Selected node |
_prop | Current property name |
_buf | Buffer for next property name |
_size | Size of buffer |
Definition at line 127 of file ofw_if.m.
◆ ofw
◆ open
Initial value:
Open node, returning instance handle.
- Parameters
-
Definition at line 257 of file ofw_if.m.
◆ package_to_path
METHOD ssize_t package_to_path |
Initial value:
Return path for node.
- Parameters
-
_node | Package node |
_path | Buffer for path |
_size | Size of buffer |
Definition at line 196 of file ofw_if.m.
◆ parent
◆ peer
Initial value:
Return next sibling of node.
- Parameters
-
Definition at line 56 of file ofw_if.m.
◆ read
Initial value:
Read from device.
- Parameters
-
_instance | Device instance |
_buf | Buffer to read to |
_size | Size of buffer |
Definition at line 279 of file ofw_if.m.
◆ release
Initial value:
Release virtual memory.
- Parameters
-
_addr | Memory location |
_size | Size in bytes |
Definition at line 334 of file ofw_if.m.
◆ seek
Initial value:
Seek device.
- Parameters
-
_instance | Device instance |
_off | Offset to which to seek |
Definition at line 306 of file ofw_if.m.
◆ setprop
Initial value:
Set property.
- Parameters
-
_node | Selected node |
_prop | Property name |
_buf | Value to set |
_size | Size of buffer |
Definition at line 143 of file ofw_if.m.
◆ size
Definition at line 283 of file ofw_if.m.
Referenced by get_addr_props(), OF_claim(), OF_nextprop(), OF_release(), ofw_bus_reg_to_rl_helper(), ofw_fdt_nextprop(), ofw_reg_to_paddr(), ofw_std_canon(), ofw_std_claim(), ofw_std_getprop(), ofw_std_instance_to_path(), ofw_std_package_to_path(), ofw_std_release(), and ofw_std_setprop().
◆ test
Initial value:
Test to see if a service exists.
- Parameters
-
Definition at line 210 of file ofw_if.m.
◆ write
Initial value:
Write to device.
- Parameters
-
_instance | Device instance |
_buf | Buffer to write from |
_size | Size of buffer |
Definition at line 293 of file ofw_if.m.