+
+ return (uintptr_t)d;
+}
+#undef hibprintf
+
+void hibprintf(const char *fmt, ...);
+
+uintptr_t
+pal_hib_map(uintptr_t virt, uint64_t phys)
+{
+ uintptr_t index;
+
+ switch (virt)
+ {
+ case DEST_COPY_AREA:
+ case SRC_COPY_AREA:
+ case COPY_PAGE_AREA:
+ case BITMAP_AREA:
+ case IMAGE_AREA:
+ case IMAGE2_AREA:
+ break;
+ default:
+ asm("cli;hlt;");
+ break;
+ }
+
+ index = (virt >> I386_LPGSHIFT);
+ virt += (uintptr_t)(phys & I386_LPGMASK);
+ phys = ((phys & ~((uint64_t)I386_LPGMASK)) | INTEL_PTE_PS | INTEL_PTE_VALID | INTEL_PTE_WRITE);
+ if (phys == BootPTD[index]) return (virt);
+ BootPTD[index] = phys;
+ invlpg(virt);
+ BootPTD[index + 1] = (phys + I386_LPGBYTES);
+ invlpg(virt + I386_LPGBYTES);
+
+ return (virt);
+}
+
+void hibernateRestorePALState(uint32_t *arg)
+{
+ (void)arg;
+}
+
+void
+pal_hib_patchup(void)
+{