OpenAMP Library
Data Fields
remoteproc_ops Struct Reference

#include <remoteproc.h>

Data Fields

struct remoteproc *(* init )(struct remoteproc *rproc, const struct remoteproc_ops *ops, void *arg)
 
void(* remove )(struct remoteproc *rproc)
 
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)
 
int(* handle_rsc )(struct remoteproc *rproc, void *rsc, size_t len)
 
int(* config )(struct remoteproc *rproc, void *data)
 
int(* start )(struct remoteproc *rproc)
 
int(* stop )(struct remoteproc *rproc)
 
int(* shutdown )(struct remoteproc *rproc)
 
int(* notify )(struct remoteproc *rproc, uint32_t id)
 
- memory name

get_mem

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

@rproc - pointer to remoteproc instance

@pa - physical address @da - device address @va - virtual address @size - memory size @buf - pointer to remoteproc_mem struct object to store result

Returns
remoteproc memory pointed by buf if success, otherwise NULL
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)
 

Detailed Description

struct remoteproc_ops

remoteproc operations needs to be implemented by each remoteproc driver

@init: initialize the remoteproc instance @remove: remove the remoteproc instance @mmap: memory mapped the memory with physical address or destination address as input. @handle_rsc: handle the vendor specific resource @config: configure the remoteproc to make it ready to load and run executable @start: kick the remoteproc to run application @stop: stop the remoteproc from running application, the resource such as memory may not be off. @shutdown: shutdown the remoteproc and release its resources. @notify: notify the remote @get_mem: get remoteproc memory I/O region.

Field Documentation

◆ config

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

◆ 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)

◆ handle_rsc

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

◆ init

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

◆ 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)

◆ notify

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

◆ remove

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

◆ shutdown

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

◆ start

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

◆ stop

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

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