nmc-utils  0.1.1
easynmc.h File Reference
#include <stdint.h>
#include <libelf.h>
#include <gelf.h>
#include <sys/file.h>
#include <linux/easynmc.h>
Include dependency graph for easynmc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  easynmc_section_filter
struct  easynmc_handle
struct  easynmc_token

Macros

#define NMC_REG_CODEVERSION   (0x100)
#define NMC_REG_ISR_ON_START   (0x101)
#define NMC_REG_CORE_STATUS   (0x102)
#define NMC_REG_CORE_START   (0x103)
#define NMC_REG_PROG_ENTRY   (0x104)
#define NMC_REG_PROG_RETURN   (0x105)
#define NMC_REG_APPDATA_SIZE   (0x106)
#define EASYNMC_APPID_LEN   8
#define ARRAY_SIZE(a)   (sizeof(a) / sizeof(*(a)))
#define ABSLOAD_FLAG_FORCE   (1<<0)
#define ABSLOAD_FLAG_STDIO   (1<<1)
#define ABSLOAD_FLAG_ARGS   (1<<2)
#define ABSLOAD_FLAG_SYNCLIB   (1<<3)
#define EASYNMC_ITERATE_STOP   (1<<0)
#define EASYNMC_ITERATE_NOCLOSE   (1<<1)
#define ABSLOAD_FLAG_DEFAULT   (ABSLOAD_FLAG_STDIO | ABSLOAD_FLAG_ARGS)
#define EASYNMC_CORE_ANY   -1

Enumerations

enum  easynmc_core_state {
  EASYNMC_CORE_COLD, EASYNMC_CORE_IDLE, EASYNMC_CORE_RUNNING, EASYNMC_CORE_PAUSED,
  EASYNMC_CORE_KILLABLE, EASYNMC_CORE_INVALID
}
enum  easynmc_persist_state { EASYNMC_PERSIST_ENABLE = 0, EASYNMC_PERSIST_DISABLE = 1 }

Functions

struct easynmc_handleeasynmc_open (int coreid)
struct easynmc_handleeasynmc_open_noboot (int coreid, int exclusive)
void easynmc_close (struct easynmc_handle *hndl)
int easynmc_boot_core (struct easynmc_handle *h, int debug)
 Bring up an NMC core, optionally with a debug IPL.
int easynmc_reset_stats (struct easynmc_handle *h)
enum easynmc_core_state easynmc_core_state (struct easynmc_handle *h)
const char * easynmc_state_name (enum easynmc_core_state state)
int easynmc_load_abs (struct easynmc_handle *h, const char *path, uint32_t *ep, int flags)
int easynmc_set_args (struct easynmc_handle *h, char *self, int argc, char **argv)
int easynmc_start_app (struct easynmc_handle *h, uint32_t entry)
char * easynmc_get_default_ipl (char *name, int debug)
int easynmc_stop_app (struct easynmc_handle *h)
int easynmc_exitcode (struct easynmc_handle *h)
struct easynmc_tokeneasynmc_token_new (struct easynmc_handle *h, uint32_t events)
int easynmc_token_clear (struct easynmc_token *t)
int easynmc_token_wait (struct easynmc_token *t, uint32_t timeout)
int easynmc_token_cancel_wait (struct easynmc_token *t)
int easynmc_pollmark (struct easynmc_handle *h)
int easynmc_send_irq (struct easynmc_handle *h, enum nmc_irq irq)
int easynmc_startupcode_is_compatible (uint32_t codever)
int easynmc_get_core_name (struct easynmc_handle *h, char *str)
int easynmc_get_core_type (struct easynmc_handle *h, char *str)
const char * easynmc_evt_name (int evt)
void easynmc_init_default_filters (struct easynmc_handle *h)
void easynmc_register_section_filter (struct easynmc_handle *h, struct easynmc_section_filter *f)
 Register a section filter.
struct easynmc_handleeasynmc_connect (const char *appid)
const char * easynmc_appid_get (struct easynmc_handle *h)
int easynmc_appid_set (struct easynmc_handle *h, char appid[])
size_t easynmc_appdata_get (struct easynmc_handle *h, void *data, size_t len)
int easynmc_appdata_set (struct easynmc_handle *h, void *data, size_t len)
int easynmc_for_each_core (int(*core_cb)(struct easynmc_handle *h, void *udata), int exclusive, void *udata)
int easynmc_persist_set (struct easynmc_handle *h, enum easynmc_persist_state status)

Variables

int g_libeasynmc_debug
int g_libeasynmc_errors

Macro Definition Documentation

#define ABSLOAD_FLAG_ARGS   (1<<2)

Definition at line 67 of file easynmc.h.

Referenced by do_load_abs().

#define ABSLOAD_FLAG_DEFAULT   (ABSLOAD_FLAG_STDIO | ABSLOAD_FLAG_ARGS)

Definition at line 73 of file easynmc.h.

Referenced by do_load_abs(), and main().

#define ABSLOAD_FLAG_FORCE   (1<<0)

Definition at line 65 of file easynmc.h.

Referenced by do_load_abs(), and easynmc_load_abs().

#define ABSLOAD_FLAG_STDIO   (1<<1)

Definition at line 66 of file easynmc.h.

Referenced by do_load_abs(), and main().

#define ABSLOAD_FLAG_SYNCLIB   (1<<3)

Definition at line 68 of file easynmc.h.

#define ARRAY_SIZE (   a)    (sizeof(a) / sizeof(*(a)))

Definition at line 47 of file easynmc.h.

Referenced by easynmc_get_default_ipl(), and easynmc_startupcode_is_compatible().

#define EASYNMC_APPID_LEN   8

Definition at line 21 of file easynmc.h.

Referenced by easynmc_appid_set().

#define EASYNMC_CORE_ANY   -1

Definition at line 81 of file easynmc.h.

Referenced by easynmc_open_noboot().

#define EASYNMC_ITERATE_NOCLOSE   (1<<1)

Definition at line 71 of file easynmc.h.

Referenced by easynmc_for_each_core().

#define EASYNMC_ITERATE_STOP   (1<<0)

Definition at line 70 of file easynmc.h.

Referenced by easynmc_for_each_core().

#define NMC_REG_APPDATA_SIZE   (0x106)

Definition at line 16 of file easynmc.h.

Referenced by do_dump_ldr_info(), and easynmc_appid_get().

#define NMC_REG_CODEVERSION   (0x100)

Definition at line 10 of file easynmc.h.

Referenced by do_dump_core_info(), do_dump_ldr_info(), and easynmc_core_state().

#define NMC_REG_CORE_START   (0x103)

Definition at line 13 of file easynmc.h.

Referenced by do_dump_ldr_info(), and easynmc_start_app().

#define NMC_REG_CORE_STATUS   (0x102)

Definition at line 12 of file easynmc.h.

Referenced by do_dump_ldr_info(), easynmc_close(), and easynmc_core_state().

#define NMC_REG_ISR_ON_START   (0x101)

Definition at line 11 of file easynmc.h.

Referenced by do_dump_ldr_info(), and easynmc_boot_core().

#define NMC_REG_PROG_ENTRY   (0x104)

Definition at line 14 of file easynmc.h.

Referenced by do_dump_ldr_info(), and easynmc_start_app().

#define NMC_REG_PROG_RETURN   (0x105)

Definition at line 15 of file easynmc.h.

Referenced by do_dump_ldr_info(), and easynmc_exitcode().

Enumeration Type Documentation

Enumerator:
EASYNMC_CORE_COLD 
EASYNMC_CORE_IDLE 
EASYNMC_CORE_RUNNING 
EASYNMC_CORE_PAUSED 
EASYNMC_CORE_KILLABLE 
EASYNMC_CORE_INVALID 

Definition at line 51 of file easynmc.h.

Enumerator:
EASYNMC_PERSIST_ENABLE 
EASYNMC_PERSIST_DISABLE 

Definition at line 60 of file easynmc.h.

Function Documentation

void easynmc_init_default_filters ( struct easynmc_handle h)

Definition at line 112 of file easynmc-filters.c.

References easynmc_register_section_filter().

Referenced by easynmc_open_noboot().

int easynmc_token_cancel_wait ( struct easynmc_token t)

Variable Documentation

int g_libeasynmc_debug

Definition at line 41 of file easynmc-core.c.

int g_libeasynmc_errors

Definition at line 42 of file easynmc-core.c.