2026-07-02 15:40:39 +08:00
|
|
|
#ifndef UTSM_UTRW_H
|
|
|
|
|
#define UTSM_UTRW_H
|
|
|
|
|
|
|
|
|
|
#include <utsm/types.h>
|
|
|
|
|
#include <utsm/status.h>
|
|
|
|
|
#include <utsm/capability.h>
|
|
|
|
|
|
|
|
|
|
int utsm_read(utsm_capability cap, u64 offset, void *dst, u64 len);
|
|
|
|
|
int utsm_write(utsm_capability cap, u64 offset, const void *src, u64 len);
|
2026-10-02 14:29:28 +08:00
|
|
|
|
|
|
|
|
/* U2: Slow Path —— Fast Path 失败后的恢复分支。
|
|
|
|
|
* reason 为 Fast Path 返回的错误码;恢复成功返回 UTSM_OK(可重试),
|
|
|
|
|
* EPOCH 场景经 out_cap 回传刷新后的凭证(可为 NULL)。
|
|
|
|
|
* 其余返回值为不可恢复错误。 */
|
|
|
|
|
int utsm_slow_path(utsm_capability cap, u32 rights, u64 offset, u64 len,
|
|
|
|
|
int reason, utsm_capability *out_cap);
|
2026-07-02 15:40:39 +08:00
|
|
|
|
2026-10-02 14:40:26 +08:00
|
|
|
/* U4: 密文页 dump(调试特权:串口输出 offset_in_page 起 64B 密文/明文 hex 对照) */
|
|
|
|
|
int utrw_debug_dump_page(u32 segment_slot, u64 page_index, u64 offset_in_page);
|
|
|
|
|
|
2026-07-02 15:40:39 +08:00
|
|
|
#endif
|