-extern struct mach_header _mh_execute_header;
-void *sectTEXTB; int sectSizeTEXT;
-void *sectDATAB; int sectSizeDATA;
-void *sectOBJCB; int sectSizeOBJC;
-void *sectLINKB; int sectSizeLINK;
-void *sectPRELINKB; int sectSizePRELINK;
-void *sectHIBB; int sectSizeHIB;
-
-extern void *getsegdatafromheader(struct mach_header *, const char *, int *);
-extern struct segment_command *getsegbyname(const char *);
-extern struct section *firstsect(struct segment_command *);
-extern struct section *nextsect(struct segment_command *, struct section *);
-
-
-void
-i386_macho_zerofill(void)
-{
- struct segment_command *sgp;
- struct section *sp;
-
- sgp = getsegbyname("__DATA");
- if (sgp) {
- sp = firstsect(sgp);
- if (sp) {
- do {
- if ((sp->flags & S_ZEROFILL))
- bzero((char *) sp->addr, sp->size);
- } while ((sp = nextsect(sgp, sp)));
- }
- }
-
- return;
-}
-
+void *sectTEXTB; unsigned long sectSizeTEXT;
+void *sectDATAB; unsigned long sectSizeDATA;
+void *sectOBJCB; unsigned long sectSizeOBJC;
+void *sectLINKB; unsigned long sectSizeLINK;
+void *sectPRELINKB; unsigned long sectSizePRELINK;
+void *sectHIBB; unsigned long sectSizeHIB;
+void *sectINITPTB; unsigned long sectSizeINITPT;
+
+kernel_segment_command_t *segTEXT;
+kernel_section_t *cursectTEXT, *lastsectTEXT;
+
+extern uint64_t firmware_Conventional_bytes;
+extern uint64_t firmware_RuntimeServices_bytes;
+extern uint64_t firmware_ACPIReclaim_bytes;
+extern uint64_t firmware_ACPINVS_bytes;
+extern uint64_t firmware_PalCode_bytes;
+extern uint64_t firmware_Reserved_bytes;
+extern uint64_t firmware_Unusable_bytes;
+extern uint64_t firmware_other_bytes;
+uint64_t firmware_MMIO_bytes;
+
+#if DEBUG
+#define PRINT_PMAP_MEMORY_TABLE
+#endif /* DEBUG */