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