1/* @ajax/mesh-abi-load-page: The load page: the host block's load regions mirrored into the mailbox.
2 *
3 * Part of alpha-c-mesh, a C port of alpha-rust-mesh (README.md says from where). */
4#ifndef MESH_ABI_LOAD_PAGE_H
5#define MESH_ABI_LOAD_PAGE_H
67#include <stdbool.h>
8#include <stddef.h>
9#include <stdint.h>
10#include "mesh/abi/host_load.h"
1112/* ---------------------------------------------------------------- load page */
13/* The host block's load regions (S_LOAD .. S_LOAD_END: this machine, its
14 * cores, the members, the programs) mirrored into the mailbox by meshd's
15 * load sampler after each sample, so GPU programs can read them (http's
16 * /status, schedulers). Byte for byte the host block's layout:
17 * `load_page(S_GPU_SHARE)` is the mailbox offset of S_GPU_SHARE.
18 * Informational: written with plain stores, not under a seqlock. */
19#define MESH_LOAD_PAGE 0x48000
2021/* The mailbox offset of host-block offset s_off (S_LOAD <= s_off < S_LOAD_END). */
22static inline size_t mesh_load_page(size_t s_off) { return MESH_LOAD_PAGE + s_off - MESH_S_LOAD; }
2324#endif