#include <fcntl.h>#include <unistd.h>#include <sys/mman.h>#include "common.h"#include "syscall.h"#include "librtas.h"Data Structures | |
| struct | workarea_config |
Defines | |
| #define | MAX_PAGES 64 |
Functions | |
| static int | read_kregion_bounds (struct region *kregion) |
| Read the kernel region bounds for RMO memory. | |
| static uint64_t | get_bits (short lobit, short hibit, uint64_t mask) |
| static void | set_bits (short lobit, short hibit, uint64_t value, uint64_t *mask) |
| static int | acquire_file_lock (off_t start, size_t size) |
| static int | release_file_lock (off_t start, size_t size) |
| static int | get_phys_region (size_t size, uint32_t *phys_addr) |
| static int | release_phys_region (uint32_t phys_addr, size_t size) |
| static int | init_workarea_config () |
| static int | mmap_dev_mem (uint32_t phys_addr, size_t size, void **buf) |
| static int | munmap_dev_mem (void *buf, size_t size) |
| int | sc_interface_exists () |
| int | sc_free_rmo_buffer (void *buf, uint32_t phys_addr, size_t size) |
| int | sc_get_rmo_buffer (size_t size, void **buf, uint32_t *phys_addr) |
Variables | |
| static const char * | rmo_filename = "rmo_buffer" |
| static const char * | devmem_path = "/dev/mem" |
| static const char * | lockfile_path = "/var/lock/LCK..librtas" |
| static struct workarea_config | wa_config |
| #define MAX_PAGES 64 |
| static int acquire_file_lock | ( | off_t | start, | |
| size_t | size | |||
| ) | [static] |
acquire_file_lock
| start | ||
| size |
| static uint64_t get_bits | ( | short | lobit, | |
| short | hibit, | |||
| uint64_t | mask | |||
| ) | [inline, static] |
get_bits
| lobit | ||
| hibit | ||
| mask |
| static int get_phys_region | ( | size_t | size, | |
| uint32_t * | phys_addr | |||
| ) | [static] |
get_phys_region
| size | ||
| phys_addr |
| static int init_workarea_config | ( | ) | [static] |
init_workarea_config
| static int mmap_dev_mem | ( | uint32_t | phys_addr, | |
| size_t | size, | |||
| void ** | buf | |||
| ) | [static] |
mmap_dev_mem
| phys_addr | ||
| size | ||
| buf |
| static int munmap_dev_mem | ( | void * | buf, | |
| size_t | size | |||
| ) | [static] |
munmap_dev_mem
| buf | ||
| size |
| static int read_kregion_bounds | ( | struct region * | kregion | ) | [static] |
read_kregion_bounds
| kregion |
| static int release_file_lock | ( | off_t | start, | |
| size_t | size | |||
| ) | [static] |
release_file_lock
| start | ||
| size |
| static int release_phys_region | ( | uint32_t | phys_addr, | |
| size_t | size | |||
| ) | [static] |
release_phys_region
| phys_addr | ||
| size |
| int sc_free_rmo_buffer | ( | void * | buf, | |
| uint32_t | phys_addr, | |||
| size_t | size | |||
| ) |
sc_free_rmo_buffer
| buf | virtual address of mmap()'ed buffer | |
| phys_addr | physical address of low mem buffer | |
| size | size of buffer |
| int sc_get_rmo_buffer | ( | size_t | size, | |
| void ** | buf, | |||
| uint32_t * | phys_addr | |||
| ) |
sc_get_rmo_buffer
| size | Size of requested region. Must be a multiple of 4096. | |
| buf | Assigned to mmap'ed buffer of acquired region | |
| phys_addr | Assigned to physical address of acquired region |
| int sc_interface_exists | ( | ) |
sc_interface_exists
| static void set_bits | ( | short | lobit, | |
| short | hibit, | |||
| uint64_t | value, | |||
| uint64_t * | mask | |||
| ) | [inline, static] |
set_bits
| lobit | ||
| hibit | ||
| value | ||
| mask |
const char* devmem_path = "/dev/mem" [static] |
const char* lockfile_path = "/var/lock/LCK..librtas" [static] |
const char* rmo_filename = "rmo_buffer" [static] |
struct workarea_config wa_config [static] |
Initial value:
{
.lockfile_fd = -1,
.init_done = 0,
.pages_map = 0ll,
}
1.5.3