udi_env.h

contains environment-specific UDI definitions

Author

Bogdan Barbu Marcel Sondaar

License

Public Domain

Summary
udi_env.hcontains environment-specific UDI definitions
mos_mei_cb_mold_tcontains index to control-block-info mappings for a given region
mos_region_tcontains the backend properties of a region
mos_buf_impl_tGeneric part of an actual storage buffer
Variables
refcountHolds the amount of references to this data.
free_opa function pointer to the buffer deconstructor
copy_opa function pointer to a generic data copying function
lock_opa function pointer that gives direct read-only access to the data, allowing to defer or avoid a copy operation This function may be NULL when direct exposure is not available
unlock_opa function pointer to the unlock function this function may be NULL, but only if copy_op is NULL as well
mos_buf_part_tDescribes a segment of data
Variables
datacontains a reference to the actual data storage in an mos_buf_impl_t
nextContains a reference to the next buffer part in the sequence
prevContains a reference to the previous buffer part in the sequence
sizeamount of bytes referenced by this buffer part
offsetoffset into the actual data that stores the data
mos_buf_tag_tA linked list of tags
Variables
tagcontains the tag info
nextpoints to the next tag, if any
mos_buf_tContains the hidden portion of a buffer object.
Variables
firstContains a pointer to the first buffer part in the list, which is a mos_buf_part_t.
lastContains a pointer to the last buffer part in the list, which is a mos_buf_part_t.
tagsContains a pointer to the first tag in the list of associated tags as mos_buf_tag_t
allocatedContains the total size of the buffer, and therefore indirectly the offset of last allowing for reverse searches
Functions
_udi_buf_injectHelper function for modifying buffer segments
mos_pio_impl_tContains the functions to perform PIO instructions
Variables
limitThe size of this array (for safety checking)
mos_mmio_pio_impl_tContains the functions to perform PIO instructions
Variables
pio_implPointer to the internal implementation functions
baseThe starting virtual address where this area is mapped
mos_pio_handle_listList of available PIO regsets
mos_system_cb_tcontains the info the message handling backends needs to convert between system and UDI conventions.
Variables
origincontains the sender address of a message
requestindexcontains the request number for pipelined requests
mos_cb_t
mos_channel_tcontains the hidden part of the channel type.
udi_pio_local_trans_tlocal storage of opcodes

mos_mei_cb_mold_t

contains index to control-block-info mappings for a given region

mos_region_t

contains the backend properties of a region

mos_buf_impl_t

Generic part of an actual storage buffer

Summary
Variables
refcountHolds the amount of references to this data.
free_opa function pointer to the buffer deconstructor
copy_opa function pointer to a generic data copying function
lock_opa function pointer that gives direct read-only access to the data, allowing to defer or avoid a copy operation This function may be NULL when direct exposure is not available
unlock_opa function pointer to the unlock function this function may be NULL, but only if copy_op is NULL as well

Variables

refcount

udi_index_t refcount

Holds the amount of references to this data.  Once the refcount reaches zero, the buffer is unused and should be freed

free_op

void (*free_op)(struct mos_buf_impl * buf)

a function pointer to the buffer deconstructor

input

bufthe pointer to this structure

output

none

copy_op

void (
   *copy_op
)(struct mos_buf_impl * buf, void * dst, udi_size_t off, udi_size_t len)

a function pointer to a generic data copying function

input

bufthe pointer to this structure
dsta pointer to a memory location where a copy should be made
offthe offset into the buffer
lenthe amount of bytes to copy

output

none

lock_op

const void * (
   *lock_op
)(struct mos_buf_impl * buf, udi_size_t off, udi_size_t len)

a function pointer that gives direct read-only access to the data, allowing to defer or avoid a copy operation This function may be NULL when direct exposure is not available

input

bufthe pointer to this structure
offthe offset into the buffer
lenthe length of the buffer

output

returna pointer to immutable data storage starting at off, or NULL on failure

unlock_op

void (*unlock_op)(struct mos_buf_impl * buf, const void * pointer)

a function pointer to the unlock function this function may be NULL, but only if copy_op is NULL as well

input

bufthe pointer to this structure
pointerthe previously acquired pointer

output

none.  The passed pointer may no longer be used.

mos_buf_part_t

Describes a segment of data

Summary
Variables
datacontains a reference to the actual data storage in an mos_buf_impl_t
nextContains a reference to the next buffer part in the sequence
prevContains a reference to the previous buffer part in the sequence
sizeamount of bytes referenced by this buffer part
offsetoffset into the actual data that stores the data

Variables

data

mos_buf_impl_t * data

contains a reference to the actual data storage in an mos_buf_impl_t

next

struct mos_buf_part * next

Contains a reference to the next buffer part in the sequence

prev

struct mos_buf_part * prev

Contains a reference to the previous buffer part in the sequence

size

udi_size_t size

amount of bytes referenced by this buffer part

offset

udi_size_t offset

offset into the actual data that stores the data

mos_buf_tag_t

A linked list of tags

Summary
Variables
tagcontains the tag info
nextpoints to the next tag, if any

Variables

tag

udi_buf_tag_t tag

contains the tag info

next

struct mos_buf_tag * next

points to the next tag, if any

mos_buf_t

Contains the hidden portion of a buffer object.  It is located directly in front of the udi_buf_t structure Buffers are composed of segments of immutable data, stored in a linked-list fashion.  This gives O(1) access to the most expected operation (concatenations), but suffers on repeated random mutations.  However, buffer calls should be minimal compared to the actual amount of data stored due to general overhead.

Summary
Variables
firstContains a pointer to the first buffer part in the list, which is a mos_buf_part_t.
lastContains a pointer to the last buffer part in the list, which is a mos_buf_part_t.
tagsContains a pointer to the first tag in the list of associated tags as mos_buf_tag_t
allocatedContains the total size of the buffer, and therefore indirectly the offset of last allowing for reverse searches
Functions
_udi_buf_injectHelper function for modifying buffer segments

Variables

first

mos_buf_part_t * first

Contains a pointer to the first buffer part in the list, which is a mos_buf_part_t.

last

mos_buf_part_t * last

Contains a pointer to the last buffer part in the list, which is a mos_buf_part_t.

tags

mos_buf_tag_t * tags

Contains a pointer to the first tag in the list of associated tags as mos_buf_tag_t

allocated

udi_size_t allocated

Contains the total size of the buffer, and therefore indirectly the offset of last allowing for reverse searches

Functions

_udi_buf_inject

void _udi_buf_inject(mos_buf_t *buf,
mos_buf_part_t *part,
udi_size_t off,
udi_size_t len)

Helper function for modifying buffer segments

in

bufthe internal buffer object to modify
partthe segment to inject
offthe offset into the buffer where this segment belongs
lenthe amount of bytes to overwrite (0 to just insert)

out

none

mos_pio_impl_t

Contains the functions to perform PIO instructions

Summary
Variables
limitThe size of this array (for safety checking)

Variables

limit

udi_size_t limit

The size of this array (for safety checking)

mos_mmio_pio_impl_t

Contains the functions to perform PIO instructions

Summary
Variables
pio_implPointer to the internal implementation functions
baseThe starting virtual address where this area is mapped

Variables

pio_impl

mos_pio_impl_t pio_impl

Pointer to the internal implementation functions

base

void * base

The starting virtual address where this area is mapped

mos_pio_handle_list

typedef struct mos_pio_handle_list

List of available PIO regsets

mos_system_cb_t

contains the info the message handling backends needs to convert between system and UDI conventions.

Summary
Variables
origincontains the sender address of a message
requestindexcontains the request number for pipelined requests

Variables

origin

udi_ubit32_t origin

contains the sender address of a message

requestindex

udi_ubit32_t requestindex

contains the request number for pipelined requests

mos_cb_t

contains the private part of a UDI control blockit can be found directly in front of the udi_cb_t structure

mos_channel_t

contains the hidden part of the channel type.

udi_pio_local_trans_t

typedef struct udi_pio_local_trans_t

local storage of opcodes

udi_index_t refcount
Holds the amount of references to this data.
void (*free_op)(struct mos_buf_impl * buf)
a function pointer to the buffer deconstructor
void (
   *copy_op
)(struct mos_buf_impl * buf, void * dst, udi_size_t off, udi_size_t len)
a function pointer to a generic data copying function
const void * (
   *lock_op
)(struct mos_buf_impl * buf, udi_size_t off, udi_size_t len)
a function pointer that gives direct read-only access to the data, allowing to defer or avoid a copy operation This function may be NULL when direct exposure is not available
void (*unlock_op)(struct mos_buf_impl * buf, const void * pointer)
a function pointer to the unlock function this function may be NULL, but only if copy_op is NULL as well
mos_buf_impl_t * data
contains a reference to the actual data storage in an mos_buf_impl_t
Generic part of an actual storage buffer
struct mos_buf_part * next
Contains a reference to the next buffer part in the sequence
struct mos_buf_part * prev
Contains a reference to the previous buffer part in the sequence
udi_size_t size
amount of bytes referenced by this buffer part
udi_size_t offset
offset into the actual data that stores the data
udi_buf_tag_t tag
contains the tag info
struct mos_buf_tag * next
points to the next tag, if any
mos_buf_part_t * first
Contains a pointer to the first buffer part in the list, which is a mos_buf_part_t.
Describes a segment of data
mos_buf_part_t * last
Contains a pointer to the last buffer part in the list, which is a mos_buf_part_t.
mos_buf_tag_t * tags
Contains a pointer to the first tag in the list of associated tags as mos_buf_tag_t
A linked list of tags
udi_size_t allocated
Contains the total size of the buffer, and therefore indirectly the offset of last allowing for reverse searches
void _udi_buf_inject(mos_buf_t *buf,
mos_buf_part_t *part,
udi_size_t off,
udi_size_t len)
Helper function for modifying buffer segments
udi_size_t limit
The size of this array (for safety checking)
mos_pio_impl_t pio_impl
Pointer to the internal implementation functions
void * base
The starting virtual address where this area is mapped
typedef struct mos_pio_handle_list
List of available PIO regsets
udi_ubit32_t origin
contains the sender address of a message
udi_ubit32_t requestindex
contains the request number for pipelined requests
typedef struct udi_pio_local_trans_t
local storage of opcodes