Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -x.DS_Store -Naur xnu-2050.24.15.orig/libkern/c++/OSKext.cpp xnu-2050.24.15/libkern/c++/OSKext.cpp
- --- xnu-2050.24.15.orig/libkern/c++/OSKext.cpp 2013-08-02 12:36:30.000000000 -0400
- +++ xnu-2050.24.15/libkern/c++/OSKext.cpp 2013-08-15 19:20:33.000000000 -0400
- @@ -1822,7 +1822,7 @@
- OSKextLog(this,
- kOSKextLogWarningLevel |
- kOSKextLogKextBookkeepingFlag,
- - "Refusing new kext %s, v%s: already have %s v%s.",
- + "Using new kext %s, v%s: to override %s v%s.",
- getIdentifierCString(),
- newVersionCString,
- (existingIsLoaded ? "loaded" : "prelinked"),
- @@ -1838,7 +1838,6 @@
- (existingIsLoaded ? "loaded" : "prelinked"));
- }
- }
- - goto finish;
- } /* if (existingIsLoaded || existingIsPrelinked) */
- /* We have two nonloaded/nonprelinked kexts, so our decision depends on whether
- diff -x.DS_Store -Naur xnu-2050.24.15.orig/libsa/bootstrap.cpp xnu-2050.24.15/libsa/bootstrap.cpp
- --- xnu-2050.24.15.orig/libsa/bootstrap.cpp 2013-08-02 12:36:30.000000000 -0400
- +++ xnu-2050.24.15/libsa/bootstrap.cpp 2013-08-15 19:22:59.000000000 -0400
- @@ -470,12 +470,7 @@
- registryRoot->setProperty(kOSPrelinkKextCountKey, prelinkCountObj);
- }
- - OSKextLog(/* kext */ NULL,
- - kOSKextLogProgressLevel |
- - kOSKextLogGeneralFlag | kOSKextLogKextBookkeepingFlag |
- - kOSKextLogDirectoryScanFlag | kOSKextLogArchiveFlag,
- - "%u prelinked kexts",
- - infoDictArray->getCount());
- + readBooterExtensions();
- #if CONFIG_KEXT_BASEMENT
- /* On CONFIG_KEXT_BASEMENT systems, kexts are copied to their own
- diff -x.DS_Store -Naur xnu-2050.24.15.orig/osfmk/i386/commpage/commpage.c xnu-2050.24.15/osfmk/i386/commpage/commpage.c
- --- xnu-2050.24.15.orig/osfmk/i386/commpage/commpage.c 2012-08-22 17:35:34.000000000 -0400
- +++ xnu-2050.24.15/osfmk/i386/commpage/commpage.c 2013-08-15 19:26:39.000000000 -0400
- @@ -121,13 +121,13 @@
- kern_return_t kr;
- if (submap == NULL)
- - panic("commpage submap is null");
- + printf("commpage submap is null");
- if ((kr = vm_map(kernel_map,&kernel_addr,area_used,0,VM_FLAGS_ANYWHERE,NULL,0,FALSE,VM_PROT_ALL,VM_PROT_ALL,VM_INHERIT_NONE)))
- - panic("cannot allocate commpage %d", kr);
- + printf("cannot allocate commpage %d", kr);
- if ((kr = vm_map_wire(kernel_map,kernel_addr,kernel_addr+area_used,VM_PROT_DEFAULT,FALSE)))
- - panic("cannot wire commpage: %d", kr);
- + printf("cannot wire commpage: %d", kr);
- /*
- * Now that the object is created and wired into the kernel map, mark it so that no delay
- @@ -138,7 +138,7 @@
- * JMM - What we really need is a way to create it like this in the first place.
- */
- if (!(kr = vm_map_lookup_entry( kernel_map, vm_map_trunc_page(kernel_addr), &entry) || entry->is_sub_map))
- - panic("cannot find commpage entry %d", kr);
- + printf("cannot find commpage entry %d", kr);
- entry->object.vm_object->copy_strategy = MEMORY_OBJECT_COPY_NONE;
- if ((kr = mach_make_memory_entry( kernel_map, // target map
- @@ -147,7 +147,7 @@
- uperm, // protections as specified
- &handle, // this is the object handle we get
- NULL ))) // parent_entry (what is this?)
- - panic("cannot make entry for commpage %d", kr);
- + printf("cannot make entry for commpage %d", kr);
- if ((kr = vm_map_64( submap, // target map (shared submap)
- &zero, // address (map into 1st page in submap)
- @@ -160,7 +160,7 @@
- uperm, // cur_protection (R-only in user map)
- uperm, // max_protection
- VM_INHERIT_SHARE ))) // inheritance
- - panic("cannot map commpage %d", kr);
- + printf("cannot map commpage %d", kr);
- ipc_port_release(handle);
- /* Make the kernel mapping non-executable. This cannot be done
- @@ -193,7 +193,7 @@
- cpus = ml_get_max_cpus(); // NB: this call can block
- if (cpus == 0)
- - panic("commpage cpus==0");
- + printf("commpage cpus==0");
- if (cpus > 0xFF)
- cpus = 0xFF;
- @@ -294,7 +294,7 @@
- void *dest = commpage_addr_of(address);
- if (address < next)
- - panic("commpage overlap at address 0x%p, 0x%x < 0x%x", dest, address, next);
- + printf("commpage overlap at address 0x%p, 0x%x < 0x%x", dest, address, next);
- bcopy(source,dest,length);
- @@ -311,7 +311,6 @@
- if (rd->commpage_address != cur_routine) {
- if ((cur_routine!=0) && (matched==0))
- - panic("commpage no match for last, next address %08x", rd->commpage_address);
- cur_routine = rd->commpage_address;
- matched = 0;
- }
- @@ -321,7 +320,7 @@
- if ((must == rd->musthave) && (cant == 0)) {
- if (matched)
- - panic("commpage multiple matches for address %08x", rd->commpage_address);
- + printf("commpage multiple matches for address %08x", rd->commpage_address);
- matched = 1;
- commpage_stuff(rd->commpage_address,rd->code_address,rd->code_length);
- @@ -386,7 +385,7 @@
- commpage_stuff(_COMM_PAGE_CPUFAMILY, &cfamily, 4);
- if (next > _COMM_PAGE_END)
- - panic("commpage overflow: next = 0x%08x, commPagePtr = 0x%p", next, commPagePtr);
- + printf("commpage overflow: next = 0x%08x, commPagePtr = 0x%p", next, commPagePtr);
- }
- @@ -458,7 +457,7 @@
- commpage_stuff_routine(*rd);
- }
- if (!matched)
- - panic(" commpage_text no match for last routine ");
- + printf(" commpage_text no match for last routine ");
- #ifndef __LP64__
- pmap_commpage32_init((vm_offset_t) commPageTextPtr32, _COMM_PAGE_TEXT_START,
- @@ -487,10 +486,10 @@
- }
- if (!matched)
- - panic(" commpage_text no match for last routine ");
- + printf(" commpage_text no match for last routine ");
- if (next > _COMM_PAGE_TEXT_END)
- - panic("commpage text overflow: next=0x%08x, commPagePtr=%p", next, commPagePtr);
- + printf("commpage text overflow: next=0x%08x, commPagePtr=%p", next, commPagePtr);
- }
- @@ -517,11 +516,11 @@
- return;
- if ( generation != p32->nt_generation )
- - panic("nanotime trouble 1"); /* possibly not serialized */
- + printf("nanotime trouble 1"); /* possibly not serialized */
- if ( ns_base < p32->nt_ns_base )
- - panic("nanotime trouble 2");
- + printf("nanotime trouble 2");
- if ((shift != 32) && ((_cpu_capabilities & kSlow)==0) )
- - panic("nanotime trouble 3");
- + printf("nanotime trouble 3");
- next_gen = ++generation;
- if (next_gen == 0)
- diff -x.DS_Store -Naur xnu-2050.24.15.orig/osfmk/i386/cpuid.c xnu-2050.24.15/osfmk/i386/cpuid.c
- --- xnu-2050.24.15.orig/osfmk/i386/cpuid.c 2013-08-02 12:36:32.000000000 -0400
- +++ xnu-2050.24.15/osfmk/i386/cpuid.c 2013-08-15 19:28:15.000000000 -0400
- @@ -743,7 +743,7 @@
- static uint32_t
- cpuid_set_cpufamily(i386_cpu_info_t *info_p)
- {
- - uint32_t cpufamily = CPUFAMILY_UNKNOWN;
- + uint32_t cpufamily = CPUFAMILY_INTEL_IVYBRIDGE;
- switch (info_p->cpuid_family) {
- case 6:
- @@ -801,11 +801,7 @@
- cpuid_set_generic_info(info_p);
- /* verify we are running on a supported CPU */
- - if ((strncmp(CPUID_VID_INTEL, info_p->cpuid_vendor,
- - min(strlen(CPUID_STRING_UNKNOWN) + 1,
- - sizeof(info_p->cpuid_vendor)))) ||
- - (cpuid_set_cpufamily(info_p) == CPUFAMILY_UNKNOWN))
- - panic("Unsupported CPU");
- + cpuid_set_cpufamily(info_p);
- info_p->cpuid_cpu_type = CPU_TYPE_X86;
- info_p->cpuid_cpu_subtype = CPU_SUBTYPE_X86_ARCH1;
- diff -x.DS_Store -Naur xnu-2050.24.15.orig/osfmk/i386/lapic_native.c xnu-2050.24.15/osfmk/i386/lapic_native.c
- --- xnu-2050.24.15.orig/osfmk/i386/lapic_native.c 2012-08-22 17:35:34.000000000 -0400
- +++ xnu-2050.24.15/osfmk/i386/lapic_native.c 2013-08-15 19:29:47.000000000 -0400
- @@ -466,6 +466,9 @@
- LAPIC_WRITE(LVT_LINT0, value);
- }
- + /* NMI: ummasked, off course */
- + LAPIC_WRITE(LVT_LINT1, LAPIC_LVT_DM_NMI);
- +
- /* Timer: unmasked, one-shot */
- LAPIC_WRITE(LVT_TIMER, LAPIC_VECTOR(TIMER));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement