gfdt_get_phandle()

Get the phandle (parent handle) for a vdev (ARM)

Synopsis:

#include <qvm/firmware.h>
uint32_t gfdt_get_phandle(const vdev_t *vdp,
                          int *node)

Arguments:

vdp
A pointer to the vdev to get the handle for.
node
A pointer to a node offset that might be adjusted.

Description:

This function gets the phandle for the specified vdev.

The FDT routines use offsets into the tree to represent the element being handled (e.g., a node or property). Sometimes, asking for the phandle of a vdev requires the qvm process to add a new property to the FDT, which causes all element offsets following the location where the new property was added to be shifted down. If the node offset is past this location, the gfdt_get_phandle() function adjusts the offset appropriately so that it refers to the same node as it did before the function was called.

Returns:

The vdev's phandle value.

Page updated: