]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/i386/i386_vm_init.c
xnu-2782.10.72.tar.gz
[apple/xnu.git] / osfmk / i386 / i386_vm_init.c
index 4ec9f5cbe5d70f0107d0017f4f89e39523ed0d9c..8a1d753b588ff8fbf8d5474f1c4d5a806f680133 100644 (file)
@@ -100,10 +100,17 @@ vm_offset_t       vm_kernel_top;
 vm_offset_t    vm_kernel_stext;
 vm_offset_t    vm_kernel_etext;
 vm_offset_t    vm_kernel_slide;
-vm_offset_t     vm_hib_base;
+vm_offset_t vm_hib_base;
 vm_offset_t    vm_kext_base = VM_MIN_KERNEL_AND_KEXT_ADDRESS;
 vm_offset_t    vm_kext_top = VM_MIN_KERNEL_ADDRESS;
 
+vm_offset_t vm_prelink_stext;
+vm_offset_t vm_prelink_etext;
+vm_offset_t vm_prelink_sinfo;
+vm_offset_t vm_prelink_einfo;
+vm_offset_t vm_slinkedit;
+vm_offset_t vm_elinkedit;
+
 #define MAXLORESERVE   (32 * 1024 * 1024)
 
 ppnum_t                max_ppnum = 0;
@@ -133,6 +140,7 @@ vm_offset_t segTEXTB; unsigned long segSizeTEXT;
 vm_offset_t segDATAB; unsigned long segSizeDATA;
 vm_offset_t segLINKB; unsigned long segSizeLINK;
 vm_offset_t segPRELINKB; unsigned long segSizePRELINK;
+vm_offset_t segPRELINKINFOB; unsigned long segSizePRELINKINFO;
 vm_offset_t segHIBB; unsigned long segSizeHIB;
 vm_offset_t sectCONSTB; unsigned long sectSizeConst;
 
@@ -245,6 +253,8 @@ i386_vm_init(uint64_t       maxmem,
                                        "__HIB", &segSizeHIB);
        segPRELINKB = (vm_offset_t) getsegdatafromheader(&_mh_execute_header,
                                        "__PRELINK_TEXT", &segSizePRELINK);
+    segPRELINKINFOB = (vm_offset_t) getsegdatafromheader(&_mh_execute_header,
+                    "__PRELINK_INFO", &segSizePRELINKINFO);
        segTEXT = getsegbynamefromheader(&_mh_execute_header,
                                        "__TEXT");
        segDATA = getsegbynamefromheader(&_mh_execute_header,
@@ -285,6 +295,7 @@ i386_vm_init(uint64_t       maxmem,
        DBG("segLINKB    = %p\n", (void *) segLINKB);
        DBG("segHIBB     = %p\n", (void *) segHIBB);
        DBG("segPRELINKB = %p\n", (void *) segPRELINKB);
+    DBG("segPRELINKINFOB = %p\n", (void *) segPRELINKINFOB);
        DBG("sHIB        = %p\n", (void *) sHIB);
        DBG("eHIB        = %p\n", (void *) eHIB);
        DBG("stext       = %p\n", (void *) stext);
@@ -299,6 +310,12 @@ i386_vm_init(uint64_t      maxmem,
        vm_kernel_top   = (vm_offset_t) &last_kernel_symbol;
        vm_kernel_stext = stext;
        vm_kernel_etext = etext;
+    vm_prelink_stext = segPRELINKB;
+    vm_prelink_etext = segPRELINKB + segSizePRELINK;
+    vm_prelink_sinfo = segPRELINKINFOB;
+    vm_prelink_einfo = segPRELINKINFOB + segSizePRELINKINFO;
+    vm_slinkedit = segLINKB;
+    vm_elinkedit = segLINKB + segSizePRELINK;
 
        vm_set_page_size();