Go to the source code of this file.
|
#define | CVMX_MIPS32_SPACE_KSEG0 1l |
|
#define | CVMX_ADD_SEG32(segment, add) (((int32_t)segment << 31) | (int32_t)(add)) |
|
#define | CVMX_IO_SEG CVMX_MIPS_SPACE_XKPHYS |
|
#define | CVMX_ADD_SEG(segment, add) ((((uint64_t)segment) << 62) | (add)) |
|
#define | CVMX_ADD_IO_SEG(add) CVMX_ADD_SEG(CVMX_IO_SEG, (add)) |
|
#define | CVMX_ENABLE_DEBUG_PRINTS 1 |
|
#define | cvmx_dprintf printk |
|
#define | CVMX_MAX_CORES (16) |
|
#define | CVMX_CACHE_LINE_SIZE (128) /* In bytes */ |
|
#define | CVMX_CACHE_LINE_MASK (CVMX_CACHE_LINE_SIZE - 1) /* In bytes */ |
|
#define | CVMX_CACHE_LINE_ALIGNED __attribute__ ((aligned(CVMX_CACHE_LINE_SIZE))) |
|
#define | CAST64(v) ((long long)(long)(v)) |
|
#define | CASTPTR(type, v) ((type *)(long)(v)) |
|
#define | CVMX_TMP_STR(x) CVMX_TMP_STR2(x) |
|
#define | CVMX_TMP_STR2(x) #x |
|
#define | CVMX_BUILD_WRITE64(TYPE, ST) |
|
#define | CVMX_BUILD_READ64(TYPE, LT) |
|
#define | cvmx_write64 cvmx_write64_uint64 |
|
#define | cvmx_read64 cvmx_read64_uint64 |
|
#define | CVMX_WAIT_FOR_FIELD64(address, type, field, op, value, timeout_usec) |
|
|
| CVMX_BUILD_WRITE64 (int64,"sd") |
|
| CVMX_BUILD_WRITE64 (int32,"sw") |
|
| CVMX_BUILD_WRITE64 (int16,"sh") |
|
| CVMX_BUILD_WRITE64 (int8,"sb") |
|
| CVMX_BUILD_WRITE64 (uint64,"sd") |
|
| CVMX_BUILD_WRITE64 (uint32,"sw") |
|
| CVMX_BUILD_WRITE64 (uint8,"sb") |
|
| CVMX_BUILD_READ64 (int64,"ld") |
|
| CVMX_BUILD_READ64 (int32,"lw") |
|
| CVMX_BUILD_READ64 (int16,"lh") |
|
| CVMX_BUILD_READ64 (int8,"lb") |
|
| CVMX_BUILD_READ64 (uint64,"ld") |
|
| CVMX_BUILD_READ64 (uint32,"lw") |
|
| CVMX_BUILD_READ64 (uint16,"lhu") |
|
| CVMX_BUILD_READ64 (uint8,"lbu") |
|
#define CVMX_BUILD_READ64 |
( |
|
TYPE, |
|
|
|
LT |
|
) |
| |
Value:
Definition at line 224 of file cvmx.h.
#define CVMX_BUILD_WRITE64 |
( |
|
TYPE, |
|
|
|
ST |
|
) |
| |
Value:
Definition at line 210 of file cvmx.h.
#define CVMX_CACHE_LINE_SIZE (128) /* In bytes */ |
#define CVMX_ENABLE_DEBUG_PRINTS 1 |
#define CVMX_MAX_CORES (16) |
#define CVMX_MIPS32_SPACE_KSEG0 1l |
#define cvmx_read64 cvmx_read64_uint64 |
#define CVMX_TMP_STR2 |
( |
|
x | ) |
#x |
Value:( \
{ \
while (1) { \
result = 0; \
break; \
} else if (cvmx_get_cycle() > done) { \
result = -1; \
break; \
} else \
cvmx_wait(100); \
} \
} while (0); \
result; \
})
This macro spins on a field waiting for it to reach a value. It is common in code to need to wait for a specific field in a CSR to match a specific value. Conceptually this macro expands to:
1) read csr at "address" with a csr typedef of "type" 2) Check if ("type".s."field" "op" "value") 3) If #2 isn't true loop to #1 unless too much time has passed.
Definition at line 414 of file cvmx.h.
#define cvmx_write64 cvmx_write64_uint64 |
- Enumerator:
CVMX_MIPS_SPACE_XKSEG |
|
CVMX_MIPS_SPACE_XKPHYS |
|
CVMX_MIPS_SPACE_XSSEG |
|
CVMX_MIPS_SPACE_XUSEG |
|
Definition at line 34 of file cvmx.h.
CVMX_BUILD_READ64 |
( |
int64 |
, |
|
|
"ld" |
|
|
) |
| |
CVMX_BUILD_READ64 |
( |
int32 |
, |
|
|
"lw" |
|
|
) |
| |
CVMX_BUILD_READ64 |
( |
int16 |
, |
|
|
"lh" |
|
|
) |
| |
CVMX_BUILD_READ64 |
( |
int8 |
, |
|
|
"lb" |
|
|
) |
| |
CVMX_BUILD_READ64 |
( |
uint64 |
, |
|
|
"ld" |
|
|
) |
| |
CVMX_BUILD_READ64 |
( |
uint32 |
, |
|
|
"lw" |
|
|
) |
| |
CVMX_BUILD_READ64 |
( |
uint16 |
, |
|
|
"lhu" |
|
|
) |
| |
CVMX_BUILD_READ64 |
( |
uint8 |
, |
|
|
"lbu" |
|
|
) |
| |
CVMX_BUILD_WRITE64 |
( |
int64 |
, |
|
|
"sd" |
|
|
) |
| |
CVMX_BUILD_WRITE64 |
( |
int32 |
, |
|
|
"sw" |
|
|
) |
| |
CVMX_BUILD_WRITE64 |
( |
int16 |
, |
|
|
"sh" |
|
|
) |
| |
CVMX_BUILD_WRITE64 |
( |
int8 |
, |
|
|
"sb" |
|
|
) |
| |
CVMX_BUILD_WRITE64 |
( |
uint64 |
, |
|
|
"sd" |
|
|
) |
| |
CVMX_BUILD_WRITE64 |
( |
uint32 |
, |
|
|
"sw" |
|
|
) |
| |
CVMX_BUILD_WRITE64 |
( |
uint8 |
, |
|
|
"sb" |
|
|
) |
| |