1 #ifndef __VTPMMGR_DISK_IO_H 2 #define __VTPMMGR_DISK_IO_H 3 4 void* disk_read_sector(sector_t sector); 5 void disk_write_sector(sector_t sector, void* buf, size_t siz); 6 void* disk_write_buf(void); 7 void disk_write_barrier(void); 8 9 sector_t disk_find_free(const struct mem_tpm_mgr *mgr); 10 void disk_flush_slot(const struct mem_tpm_mgr *mgr); 11 void disk_set_used(sector_t loc, const struct mem_tpm_mgr *mgr); 12 13 void disk_write_all(struct mem_tpm_mgr *mgr); 14 seal_loc(struct mem_tpm_mgr * mgr)15static inline sector_t seal_loc(struct mem_tpm_mgr *mgr) 16 { 17 return native_be32(mgr->active_root); 18 } 19 root_loc(struct mem_tpm_mgr * mgr)20static inline sector_t root_loc(struct mem_tpm_mgr *mgr) 21 { 22 return native_be32(2 + mgr->active_root); 23 } 24 25 #endif 26