#include <stdio.h>#include <stdlib.h>#include <stdint.h>#include <string.h>#include <stdarg.h>#include <ctype.h>#include <sys/ioctl.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <sys/utsname.h>#include <ecd_api.h>Go to the source code of this file.
Data Structures | |
| struct | ecdtest_context_t |
| user provided context passed to the helper functions More... | |
| struct | ocs_ioctl_driver_info_t |
| DRIVER_INFO ioctl structure. More... | |
| struct | ocs_ioctl_ecd_helper_t |
| OCS_IOCTL_CMD_ECD_HELPER ioctl structure. More... | |
Macros | |
| #define | DEFAULT_OFNAME "out.core" |
| #define | DEVNAME_TEMPLATE "/dev/ocs_%d" |
| #define | OCS_IOCTL_CMD_BASE 'o' |
| #define | OCS_IOCTL_CMD_DRIVER_INFO _IOWR(OCS_IOCTL_CMD_BASE, 4, ocs_ioctl_driver_info_t) |
| #define | OCS_IOCTL_CMD_ECD_HELPER _IOWR(OCS_IOCTL_CMD_BASE, 5, ocs_ioctl_ecd_helper_t) |
| #define | ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) |
| #define | helper_trace(fmt,...) |
Functions | |
| static void | usage (void) |
| int | main (int argc, char *argv[]) |
| void | ecd_log (char *fmt,...) |
| void | os_assert (char *message, uint32_t Line, char *File) |
| void | os_stall (void *ctx, uint32_t usecTime) |
| void | os_cfg_read8 (void *ctx, uint32_t offset, uint32_t *pdata) |
| void | os_cfg_read16 (void *ctx, uint32_t offset, uint32_t *pdata) |
| void | os_cfg_read32 (void *ctx, uint32_t offset, uint32_t *pdata) |
| void | os_cfg_write8 (void *ctx, uint32_t offset, uint32_t data) |
| void | os_cfg_write16 (void *ctx, uint32_t offset, uint32_t data) |
| void | os_cfg_write32 (void *ctx, uint32_t offset, uint32_t data) |
| void | os_bar_read8 (void *ctx, uint32_t bar, uint32_t offset, uint32_t *pdata) |
| void | os_bar_read16 (void *ctx, uint32_t bar, uint32_t offset, uint32_t *pdata) |
| void | os_bar_read32 (void *ctx, uint32_t bar, uint32_t offset, uint32_t *pdata) |
| void | os_bar_write8 (void *ctx, uint32_t bar, uint32_t offset, uint32_t data) |
| void | os_bar_write16 (void *ctx, uint32_t bar, uint32_t offset, uint32_t data) |
| void | os_bar_write32 (void *ctx, uint32_t bar, uint32_t offset, uint32_t data) |
| void * | os_malloc (void *ctx, uint32_t size) |
| void | os_free (void *ctx, void *ptr) |
Variables | |
| static int | enable_helper_trace = 0 |
| #define helper_trace | ( | fmt, | |
| ... | |||
| ) |
| #define OCS_IOCTL_CMD_DRIVER_INFO _IOWR(OCS_IOCTL_CMD_BASE, 4, ocs_ioctl_driver_info_t) |
| #define OCS_IOCTL_CMD_ECD_HELPER _IOWR(OCS_IOCTL_CMD_BASE, 5, ocs_ioctl_ecd_helper_t) |
| enum ocs_ecd_helper_cmd_t |
| void os_assert | ( | char * | message, |
| uint32_t | Line, | ||
| char * | File | ||
| ) |
| void os_bar_read16 | ( | void * | ctx, |
| uint32_t | bar, | ||
| uint32_t | offset, | ||
| uint32_t * | pdata | ||
| ) |
| void os_bar_read32 | ( | void * | ctx, |
| uint32_t | bar, | ||
| uint32_t | offset, | ||
| uint32_t * | pdata | ||
| ) |
| void os_bar_read8 | ( | void * | ctx, |
| uint32_t | bar, | ||
| uint32_t | offset, | ||
| uint32_t * | pdata | ||
| ) |
| void os_bar_write16 | ( | void * | ctx, |
| uint32_t | bar, | ||
| uint32_t | offset, | ||
| uint32_t | data | ||
| ) |
| void os_bar_write32 | ( | void * | ctx, |
| uint32_t | bar, | ||
| uint32_t | offset, | ||
| uint32_t | data | ||
| ) |
| void os_bar_write8 | ( | void * | ctx, |
| uint32_t | bar, | ||
| uint32_t | offset, | ||
| uint32_t | data | ||
| ) |
| void os_cfg_read16 | ( | void * | ctx, |
| uint32_t | offset, | ||
| uint32_t * | pdata | ||
| ) |
| void os_cfg_read32 | ( | void * | ctx, |
| uint32_t | offset, | ||
| uint32_t * | pdata | ||
| ) |
| void os_cfg_read8 | ( | void * | ctx, |
| uint32_t | offset, | ||
| uint32_t * | pdata | ||
| ) |
| void os_cfg_write16 | ( | void * | ctx, |
| uint32_t | offset, | ||
| uint32_t | data | ||
| ) |
| void os_cfg_write32 | ( | void * | ctx, |
| uint32_t | offset, | ||
| uint32_t | data | ||
| ) |
| void os_cfg_write8 | ( | void * | ctx, |
| uint32_t | offset, | ||
| uint32_t | data | ||
| ) |
|
static |