Lines Matching refs:sfile

61 struct statefile sfile;  variable
279 sfile.fd = cpr_statefile_open(cpr_statefile, cpr_filesystem); in cb_open_sf()
280 if (sfile.fd == -1) { in cb_open_sf()
292 (void) cpr_fs_seek(sfile.fd, CPR_SPEC_OFFSET); in cb_open_sf()
294 (void) prom_seek(sfile.fd, CPR_SPEC_OFFSET); in cb_open_sf()
307 (void) cpr_statefile_close(sfile.fd); in cb_close_sf()
358 if (cpr_read_cdump(sfile.fd, &cdump, CPR_MACHTYPE_4U) == -1) in cb_read_statefile()
365 sfile.kpages = cdump.cdd_dumppgsize; in cb_read_statefile()
366 CPR_DEBUG(CPR_DEBUG4, "%s: total kpages %d\n", prog, sfile.kpages); in cb_read_statefile()
372 sfile.size = PAGE_ROUNDUP(cdump.cdd_filesize); in cb_read_statefile()
376 err = cb_alloc(alsize, MMU_PAGESIZE512K, &sfile.buf, &phys); in cb_read_statefile()
379 str, alsize, sfile.size, (void *)sfile.buf, phys)); in cb_read_statefile()
382 str, sfile.size, rsvp); in cb_read_statefile()
389 sfile.low_ppn = ADDR_TO_PN(phys); in cb_read_statefile()
390 sfile.high_ppn = sfile.low_ppn + mmu_btop(sfile.size) - 1; in cb_read_statefile()
404 (void) cpr_fs_seek(sfile.fd, CPR_SPEC_OFFSET); in cb_read_statefile()
406 (void) prom_seek(sfile.fd, CPR_SPEC_OFFSET); in cb_read_statefile()
408 (void) cpr_fs_seek(sfile.fd, 0); in cb_read_statefile()
423 dst_virt = sfile.buf; in cb_read_statefile()
431 nread = cpr_read(sfile.fd, dst_virt, len); in cb_read_statefile()
446 if (alsize > sfile.size) { in cb_read_statefile()
447 len = alsize - sfile.size; in cb_read_statefile()
448 prom_free_phys(len, phys + sfile.size); in cb_read_statefile()
451 (unsigned long long)(phys + sfile.size), in cb_read_statefile()
459 sfile.buf_offset = 0; in cb_read_statefile()
468 cb_mapin(sfile.buf, sfile.low_ppn, in cb_read_statefile()