OpenAMP Library  353
remoteproc_ops Struct Reference

Remoteproc operations to manage a remoteproc instance. More...

#include <remoteproc.h>

Data Fields

struct remoteproc *(* init )(struct remoteproc *rproc, const struct remoteproc_ops *ops, void *arg)
 Initialize the remoteproc instance. More...
 
void(* remove )(struct remoteproc *rproc)
 Remove the remoteproc instance. More...
 
void *(* mmap )(struct remoteproc *rproc, metal_phys_addr_t *pa, metal_phys_addr_t *da, size_t size, unsigned int attribute, struct metal_io_region **io)
 Memory map the memory with physical address or destination address as input. More...
 
int(* handle_rsc )(struct remoteproc *rproc, void *rsc, size_t len)
 Handle the vendor specific resource. More...
 
int(* config )(struct remoteproc *rproc, void *data)
 Configure the remoteproc to make it ready to load and run the executable. More...
 
int(* start )(struct remoteproc *rproc)
 Kick the remoteproc to run the application. More...
 
int(* stop )(struct remoteproc *rproc)
 Stop the remoteproc from running the application, the resource such as memory may not be off. More...
 
int(* shutdown )(struct remoteproc *rproc)
 Shutdown the remoteproc and release its resources. More...
 
int(* notify )(struct remoteproc *rproc, uint32_t id)
 Notify the remote. More...
 
struct remoteproc_mem *(* get_mem )(struct remoteproc *rproc, const char *name, metal_phys_addr_t pa, metal_phys_addr_t da, void *va, size_t size, struct remoteproc_mem *buf)
 Get remoteproc memory I/O region by either name, virtual address, physical address or device address. More...
 

Detailed Description

Remoteproc operations to manage a remoteproc instance.

Remoteproc operations need to be implemented by each remoteproc driver

Field Documentation

◆ config

int(* remoteproc_ops::config) (struct remoteproc *rproc, void *data)

Configure the remoteproc to make it ready to load and run the executable.

◆ get_mem

struct remoteproc_mem*(* remoteproc_ops::get_mem) (struct remoteproc *rproc, const char *name, metal_phys_addr_t pa, metal_phys_addr_t da, void *va, size_t size, struct remoteproc_mem *buf)

Get remoteproc memory I/O region by either name, virtual address, physical address or device address.

Parameters
rprocPointer to remoteproc instance
nameMemory name
paPhysical address
daDevice address
vaVirtual address
sizeMemory size
bufPointer to remoteproc_mem struct object to store result
Returns
remoteproc memory pointed by buf if success, otherwise NULL

◆ handle_rsc

int(* remoteproc_ops::handle_rsc) (struct remoteproc *rproc, void *rsc, size_t len)

Handle the vendor specific resource.

◆ init

struct remoteproc*(* remoteproc_ops::init) (struct remoteproc *rproc, const struct remoteproc_ops *ops, void *arg)

Initialize the remoteproc instance.

◆ mmap

void*(* remoteproc_ops::mmap) (struct remoteproc *rproc, metal_phys_addr_t *pa, metal_phys_addr_t *da, size_t size, unsigned int attribute, struct metal_io_region **io)

Memory map the memory with physical address or destination address as input.

◆ notify

int(* remoteproc_ops::notify) (struct remoteproc *rproc, uint32_t id)

Notify the remote.

◆ remove

void(* remoteproc_ops::remove) (struct remoteproc *rproc)

Remove the remoteproc instance.

◆ shutdown

int(* remoteproc_ops::shutdown) (struct remoteproc *rproc)

Shutdown the remoteproc and release its resources.

◆ start

int(* remoteproc_ops::start) (struct remoteproc *rproc)

Kick the remoteproc to run the application.

◆ stop

int(* remoteproc_ops::stop) (struct remoteproc *rproc)

Stop the remoteproc from running the application, the resource such as memory may not be off.


The documentation for this struct was generated from the following file: