]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ppc/ppc_vm_init.c
xnu-792.13.8.tar.gz
[apple/xnu.git] / osfmk / ppc / ppc_vm_init.c
index db76fff5185cb4e64405e90a6764b335a57f73b5..3a15694d11ea64cec4db29a245faa72b54b5fdee 100644 (file)
@@ -46,6 +46,7 @@
 #include <kern/assert.h>
 #include <kern/cpu_number.h>
 #include <kern/thread.h>
+#include <console/serial_protos.h>
 
 #include <ppc/proc_reg.h>
 #include <ppc/Firmware.h>
@@ -67,7 +68,6 @@ unsigned int hash_table_size;                 /* Hash table size */
 int         hash_table_shift;           /* "ht_shift" boot arg, used to scale hash_table_size */
 vm_offset_t taproot_addr;                              /* (BRINGUP) */
 unsigned int taproot_size;                             /* (BRINGUP) */
-unsigned int serialmode;                               /* Serial mode keyboard and console control */
 extern int disableConsoleOutput;
 
 struct shadowBAT shadow_BAT;
@@ -242,13 +242,13 @@ void ppc_vm_init(uint64_t mem_limit, boot_args *args)
        pmap_bootstrap(max_mem, &first_avail, kmapsize);
 
        pmap_map(trunc_page(exception_entry), trunc_page(exception_entry), 
-               round_page(exception_end), VM_PROT_READ|VM_PROT_EXECUTE);
+               round_page(exception_end), VM_PROT_READ|VM_PROT_EXECUTE, VM_WIMG_USE_DEFAULT);
 
        pmap_map(trunc_page(sectTEXTB), trunc_page(sectTEXTB), 
-               round_page(sectTEXTB+sectSizeTEXT), VM_PROT_READ|VM_PROT_EXECUTE);
+               round_page(sectTEXTB+sectSizeTEXT), VM_PROT_READ|VM_PROT_EXECUTE, VM_WIMG_USE_DEFAULT);
 
        pmap_map(trunc_page(sectDATAB), trunc_page(sectDATAB), 
-               round_page(sectDATAB+sectSizeDATA), VM_PROT_READ|VM_PROT_WRITE);
+               round_page(sectDATAB+sectSizeDATA), VM_PROT_READ|VM_PROT_WRITE, VM_WIMG_USE_DEFAULT);
 
 /* The KLD and LINKEDIT segments are unloaded in toto after boot completes,
 * but via ml_static_mfree(), through IODTFreeLoaderInfo(). Hence, we have
@@ -260,7 +260,7 @@ void ppc_vm_init(uint64_t mem_limit, boot_args *args)
              addr += PAGE_SIZE) {
 
             pmap_enter(kernel_pmap, (vm_map_offset_t)addr, (ppnum_t)(addr>>12), 
-                       VM_PROT_READ|VM_PROT_WRITE, 
+                       VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE
                        VM_WIMG_USE_DEFAULT, TRUE);
 
        }
@@ -270,7 +270,7 @@ void ppc_vm_init(uint64_t mem_limit, boot_args *args)
              addr += PAGE_SIZE) {
 
             pmap_enter(kernel_pmap, (vm_map_offset_t)addr, (ppnum_t)(addr>>12), 
-                       VM_PROT_READ|VM_PROT_WRITE, 
+                       VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE
                        VM_WIMG_USE_DEFAULT, TRUE);
 
        }
@@ -281,7 +281,7 @@ void ppc_vm_init(uint64_t mem_limit, boot_args *args)
 
            pmap_enter(kernel_pmap, (vm_map_offset_t)addr,
                        (ppnum_t)(addr>>12), 
-                       VM_PROT_READ|VM_PROT_WRITE, 
+                       VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE
                        VM_WIMG_USE_DEFAULT, TRUE);
 
        }
@@ -291,7 +291,7 @@ void ppc_vm_init(uint64_t mem_limit, boot_args *args)
              addr += PAGE_SIZE) {
 
             pmap_enter(kernel_pmap, (vm_map_offset_t)addr, (ppnum_t)(addr>>12), 
-                       VM_PROT_READ|VM_PROT_WRITE, 
+                       VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE
                        VM_WIMG_USE_DEFAULT, TRUE);
 
        }
@@ -314,7 +314,7 @@ void ppc_vm_init(uint64_t mem_limit, boot_args *args)
        for(addr = trunc_page(end); addr < round_page(static_memory_end); addr += PAGE_SIZE) {
 
                pmap_enter(kernel_pmap, (vm_map_address_t)addr, (ppnum_t)addr>>12, 
-                       VM_PROT_READ|VM_PROT_WRITE, 
+                       VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE
                        VM_WIMG_USE_DEFAULT, TRUE);
 
        }