Advertisement
Guest User

10.8.4 haswell

a guest
Sep 22nd, 2013
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.92 KB | None | 0 0
  1. diff -x.DS_Store -Naur xnu-2050.24.15.orig/libkern/c++/OSKext.cpp xnu-2050.24.15/libkern/c++/OSKext.cpp
  2. --- xnu-2050.24.15.orig/libkern/c++/OSKext.cpp 2013-08-02 12:36:30.000000000 -0400
  3. +++ xnu-2050.24.15/libkern/c++/OSKext.cpp 2013-08-15 19:20:33.000000000 -0400
  4. @@ -1822,7 +1822,7 @@
  5. OSKextLog(this,
  6. kOSKextLogWarningLevel |
  7. kOSKextLogKextBookkeepingFlag,
  8. - "Refusing new kext %s, v%s: already have %s v%s.",
  9. + "Using new kext %s, v%s: to override %s v%s.",
  10. getIdentifierCString(),
  11. newVersionCString,
  12. (existingIsLoaded ? "loaded" : "prelinked"),
  13. @@ -1838,7 +1838,6 @@
  14. (existingIsLoaded ? "loaded" : "prelinked"));
  15. }
  16. }
  17. - goto finish;
  18. } /* if (existingIsLoaded || existingIsPrelinked) */
  19.  
  20. /* We have two nonloaded/nonprelinked kexts, so our decision depends on whether
  21. diff -x.DS_Store -Naur xnu-2050.24.15.orig/libsa/bootstrap.cpp xnu-2050.24.15/libsa/bootstrap.cpp
  22. --- xnu-2050.24.15.orig/libsa/bootstrap.cpp 2013-08-02 12:36:30.000000000 -0400
  23. +++ xnu-2050.24.15/libsa/bootstrap.cpp 2013-08-15 19:22:59.000000000 -0400
  24. @@ -470,12 +470,7 @@
  25. registryRoot->setProperty(kOSPrelinkKextCountKey, prelinkCountObj);
  26. }
  27.  
  28. - OSKextLog(/* kext */ NULL,
  29. - kOSKextLogProgressLevel |
  30. - kOSKextLogGeneralFlag | kOSKextLogKextBookkeepingFlag |
  31. - kOSKextLogDirectoryScanFlag | kOSKextLogArchiveFlag,
  32. - "%u prelinked kexts",
  33. - infoDictArray->getCount());
  34. + readBooterExtensions();
  35.  
  36. #if CONFIG_KEXT_BASEMENT
  37. /* On CONFIG_KEXT_BASEMENT systems, kexts are copied to their own
  38. diff -x.DS_Store -Naur xnu-2050.24.15.orig/osfmk/i386/commpage/commpage.c xnu-2050.24.15/osfmk/i386/commpage/commpage.c
  39. --- xnu-2050.24.15.orig/osfmk/i386/commpage/commpage.c 2012-08-22 17:35:34.000000000 -0400
  40. +++ xnu-2050.24.15/osfmk/i386/commpage/commpage.c 2013-08-15 19:26:39.000000000 -0400
  41. @@ -121,13 +121,13 @@
  42. kern_return_t kr;
  43.  
  44. if (submap == NULL)
  45. - panic("commpage submap is null");
  46. + printf("commpage submap is null");
  47.  
  48. 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)))
  49. - panic("cannot allocate commpage %d", kr);
  50. + printf("cannot allocate commpage %d", kr);
  51.  
  52. if ((kr = vm_map_wire(kernel_map,kernel_addr,kernel_addr+area_used,VM_PROT_DEFAULT,FALSE)))
  53. - panic("cannot wire commpage: %d", kr);
  54. + printf("cannot wire commpage: %d", kr);
  55.  
  56. /*
  57. * Now that the object is created and wired into the kernel map, mark it so that no delay
  58. @@ -138,7 +138,7 @@
  59. * JMM - What we really need is a way to create it like this in the first place.
  60. */
  61. if (!(kr = vm_map_lookup_entry( kernel_map, vm_map_trunc_page(kernel_addr), &entry) || entry->is_sub_map))
  62. - panic("cannot find commpage entry %d", kr);
  63. + printf("cannot find commpage entry %d", kr);
  64. entry->object.vm_object->copy_strategy = MEMORY_OBJECT_COPY_NONE;
  65.  
  66. if ((kr = mach_make_memory_entry( kernel_map, // target map
  67. @@ -147,7 +147,7 @@
  68. uperm, // protections as specified
  69. &handle, // this is the object handle we get
  70. NULL ))) // parent_entry (what is this?)
  71. - panic("cannot make entry for commpage %d", kr);
  72. + printf("cannot make entry for commpage %d", kr);
  73.  
  74. if ((kr = vm_map_64( submap, // target map (shared submap)
  75. &zero, // address (map into 1st page in submap)
  76. @@ -160,7 +160,7 @@
  77. uperm, // cur_protection (R-only in user map)
  78. uperm, // max_protection
  79. VM_INHERIT_SHARE ))) // inheritance
  80. - panic("cannot map commpage %d", kr);
  81. + printf("cannot map commpage %d", kr);
  82.  
  83. ipc_port_release(handle);
  84. /* Make the kernel mapping non-executable. This cannot be done
  85. @@ -193,7 +193,7 @@
  86. cpus = ml_get_max_cpus(); // NB: this call can block
  87.  
  88. if (cpus == 0)
  89. - panic("commpage cpus==0");
  90. + printf("commpage cpus==0");
  91. if (cpus > 0xFF)
  92. cpus = 0xFF;
  93.  
  94. @@ -294,7 +294,7 @@
  95. void *dest = commpage_addr_of(address);
  96.  
  97. if (address < next)
  98. - panic("commpage overlap at address 0x%p, 0x%x < 0x%x", dest, address, next);
  99. + printf("commpage overlap at address 0x%p, 0x%x < 0x%x", dest, address, next);
  100.  
  101. bcopy(source,dest,length);
  102.  
  103. @@ -311,7 +311,6 @@
  104.  
  105. if (rd->commpage_address != cur_routine) {
  106. if ((cur_routine!=0) && (matched==0))
  107. - panic("commpage no match for last, next address %08x", rd->commpage_address);
  108. cur_routine = rd->commpage_address;
  109. matched = 0;
  110. }
  111. @@ -321,7 +320,7 @@
  112.  
  113. if ((must == rd->musthave) && (cant == 0)) {
  114. if (matched)
  115. - panic("commpage multiple matches for address %08x", rd->commpage_address);
  116. + printf("commpage multiple matches for address %08x", rd->commpage_address);
  117. matched = 1;
  118.  
  119. commpage_stuff(rd->commpage_address,rd->code_address,rd->code_length);
  120. @@ -386,7 +385,7 @@
  121. commpage_stuff(_COMM_PAGE_CPUFAMILY, &cfamily, 4);
  122.  
  123. if (next > _COMM_PAGE_END)
  124. - panic("commpage overflow: next = 0x%08x, commPagePtr = 0x%p", next, commPagePtr);
  125. + printf("commpage overflow: next = 0x%08x, commPagePtr = 0x%p", next, commPagePtr);
  126.  
  127. }
  128.  
  129. @@ -458,7 +457,7 @@
  130. commpage_stuff_routine(*rd);
  131. }
  132. if (!matched)
  133. - panic(" commpage_text no match for last routine ");
  134. + printf(" commpage_text no match for last routine ");
  135.  
  136. #ifndef __LP64__
  137. pmap_commpage32_init((vm_offset_t) commPageTextPtr32, _COMM_PAGE_TEXT_START,
  138. @@ -487,10 +486,10 @@
  139. }
  140.  
  141. if (!matched)
  142. - panic(" commpage_text no match for last routine ");
  143. + printf(" commpage_text no match for last routine ");
  144.  
  145. if (next > _COMM_PAGE_TEXT_END)
  146. - panic("commpage text overflow: next=0x%08x, commPagePtr=%p", next, commPagePtr);
  147. + printf("commpage text overflow: next=0x%08x, commPagePtr=%p", next, commPagePtr);
  148.  
  149. }
  150.  
  151. @@ -517,11 +516,11 @@
  152. return;
  153.  
  154. if ( generation != p32->nt_generation )
  155. - panic("nanotime trouble 1"); /* possibly not serialized */
  156. + printf("nanotime trouble 1"); /* possibly not serialized */
  157. if ( ns_base < p32->nt_ns_base )
  158. - panic("nanotime trouble 2");
  159. + printf("nanotime trouble 2");
  160. if ((shift != 32) && ((_cpu_capabilities & kSlow)==0) )
  161. - panic("nanotime trouble 3");
  162. + printf("nanotime trouble 3");
  163.  
  164. next_gen = ++generation;
  165. if (next_gen == 0)
  166. diff -x.DS_Store -Naur xnu-2050.24.15.orig/osfmk/i386/cpuid.c xnu-2050.24.15/osfmk/i386/cpuid.c
  167. --- xnu-2050.24.15.orig/osfmk/i386/cpuid.c 2013-08-02 12:36:32.000000000 -0400
  168. +++ xnu-2050.24.15/osfmk/i386/cpuid.c 2013-08-15 19:28:15.000000000 -0400
  169. @@ -743,7 +743,7 @@
  170. static uint32_t
  171. cpuid_set_cpufamily(i386_cpu_info_t *info_p)
  172. {
  173. - uint32_t cpufamily = CPUFAMILY_UNKNOWN;
  174. + uint32_t cpufamily = CPUFAMILY_INTEL_IVYBRIDGE;
  175.  
  176. switch (info_p->cpuid_family) {
  177. case 6:
  178. @@ -801,11 +801,7 @@
  179. cpuid_set_generic_info(info_p);
  180.  
  181. /* verify we are running on a supported CPU */
  182. - if ((strncmp(CPUID_VID_INTEL, info_p->cpuid_vendor,
  183. - min(strlen(CPUID_STRING_UNKNOWN) + 1,
  184. - sizeof(info_p->cpuid_vendor)))) ||
  185. - (cpuid_set_cpufamily(info_p) == CPUFAMILY_UNKNOWN))
  186. - panic("Unsupported CPU");
  187. + cpuid_set_cpufamily(info_p);
  188.  
  189. info_p->cpuid_cpu_type = CPU_TYPE_X86;
  190. info_p->cpuid_cpu_subtype = CPU_SUBTYPE_X86_ARCH1;
  191. diff -x.DS_Store -Naur xnu-2050.24.15.orig/osfmk/i386/lapic_native.c xnu-2050.24.15/osfmk/i386/lapic_native.c
  192. --- xnu-2050.24.15.orig/osfmk/i386/lapic_native.c 2012-08-22 17:35:34.000000000 -0400
  193. +++ xnu-2050.24.15/osfmk/i386/lapic_native.c 2013-08-15 19:29:47.000000000 -0400
  194. @@ -466,6 +466,9 @@
  195. LAPIC_WRITE(LVT_LINT0, value);
  196. }
  197.  
  198. + /* NMI: ummasked, off course */
  199. + LAPIC_WRITE(LVT_LINT1, LAPIC_LVT_DM_NMI);
  200. +
  201. /* Timer: unmasked, one-shot */
  202. LAPIC_WRITE(LVT_TIMER, LAPIC_VECTOR(TIMER));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement