Jump to content

Mavericks kernel testing on AMD (formerly Mountain Lion kernel testing on AMD)


theconnactic
 Share

6,414 posts in this topic

Recommended Posts

NEW BETA KERNEL!

 

Will post the diff later (UPDATE: here it is XNU.diff.zip). Only one change, i added cpu_infop->vector_unit = 6 to the bottom of the if/else that starts at line 424 of MachineRoutines.c.

 

All credits to bholland, it was him that created this workaround.

 

Test it. Post reports and pics. Boot with connatic (yeah, with a typo). connatic.zip

 

I'll do the test tonight, I am now at work. I'll tell you tonight. :wink2:

_______________________________________________________________

here is my first result with boot flag: -v -f cpus=6 arch=x86_64

 

 

rtclock_init: Taking bus ratio path 3 AMD Phenom

rtclock_init: Phenom MSR 0xc0010071 returned:0x140000c15

TSC: Verification of clock speed not available in x86_64.

Darwin Kernel Version 12.0.0: Wed Oct 24 02.34.15 BRST 2012: bronzovkANVoodoo v0.9.30;XNUPATCHED2/BUILD/obj/RELEASE_X86_64

vm_page_bootstrap: 823914 free pages and 3370390 wired pages

Kext supmap 0xffffff7f8080b000 - 0xffffff8000000000 , kernel text 0xffffff8000200000 - 0xffffff800080b000

zone leak detection enabled

standard timeslicing quantum is 10000 us

standard background quantum is 2500 us

mig_table_max_displ=74

SAFE BOOT DETECTED - only valid OSBundleRequired kexts will be loaded.

Link to comment
Share on other sites

here is my second result: :wallbash:

what should I do?

 

In case you read this there has been a kernel panic.

There is no {censored} suport for running Lion on AMD.

You have to try fixing this yourself.

panic (cpu 0 caller 0xffffff80002871b7 ) "pmap_steal_memory" @/Users/Jimihendrix/Desktop/XNUPATCHED2/osfmk/vm/vm_resident.c:757

Debugger called:

Backtrace (CPU 0), Frame : Return Address

0xffffff800010be00 : 0xffffff800021d496 mach_kernel : _panic + 0xc6

0xffffff800010be70 : 0xffffff80002871b7 mach_kernel : _pmap_steal_memory + 0xa7

0xffffff800010bec0 : 0xffffff80002428fe mach_kernel : _zone_steal_memory + 0x1e

0xffffff800010bed0 : 0xffffff800070efec mach_kernel : _vm_page_bootstrap + 0x62c

0xffffff800010bf30 : 0xffffff800070e016mach_kernel : _vm_mem_bootstrap + 0x16

0xffffff800010bf60 : 0xffffff800070d3a9 mach_kernel : _kernel_bootstrap + 0x99

0xffffff800010bfa0 : 0xffffff80002bafd2 mach_kernel : _machine_startup + 0x1b2

0xffffff800010bfc0 : 0xffffff80002ad893 mach_kernel : _i386_init + 0x293

0xffffff800010bff0 : 0xffffff80002b2318 mach_kernel : _x86_init_wrapper + 0x8

can't perform kext scan: no kext summary

BSD process name corresponding to current thread: Unknown

Boot args: boot-uuid=BE275D42-FA96-91BA-FDFD940E6B3D rd=*uuid -v npci=0x2000 legacy -v -x cpus=6 arch=x86_64 busratio=20 maxmem=4096

 

Mac OS version:

Not yet set

Kernel version:

Darwin Kernel Version 12.0.0: Wed Oct 24 02:34:15 BRST 2012; bronzovkAnVoodoo v0.9.30:XNUPATCHED2/BUILD/obj/RELEASE_X86_64

 

System uptime in nanoseconds: 0

Link to comment
Share on other sites

.....................@theconnactic

 

I thought that the current kernel implements ssse3emu, however, is only implemented in the xnu.diff sse3emu. Is it possible to integrate the linux kernel SSSE3emu in Mountain Lion?

Link to comment
Share on other sites

Is there a ssse3 emu for Linux? Give the link for it, spakk, i'll see what can i do :)

 

sorry, I mean you've found the snippets on the website. :whistle::blush:

Link to comment
Share on other sites

P.S.: bholland is working on it too: he's indeed closer than me at this point to make it work. However, his patches target Pentium D 64-bit (hear it, PookyMacMan?), but should be adaptable to AMD somehow. So, good luck and many thanks to him!

Haha, yup I heard it. :D I'm very happy to see this progress. Man if I didn't have school, I would love to get into this more...in the meantime, great job!! :)

 

Later on I might be able to throw my old Pentium D hack together to test kernel stuff...I'll have to make sure I still have all the parts.

  • Like 1
Link to comment
Share on other sites

NEW BETA KERNEL!

 

Will post the diff later (UPDATE: here it is XNU.diff.zip). Only one change, i added cpu_infop->vector_unit = 6 to the bottom of the if/else that starts at line 424 of MachineRoutines.c.

 

All credits to bholland, it was him that created this workaround.

 

Test it. Post reports and pics. Boot with connatic (yeah, with a typo). connatic.zip

Here are my two machines with this kernel--I don't think the panic's any different from last time, but here goes anyway.

post-969896-0-66426900-1351108843_thumb.png

post-969896-0-53701500-1351108861_thumb.png

  • Like 1
Link to comment
Share on other sites

Spakk, i swear to you: if we had five more like you, AMD would have been roaring the Mountain Lion tune long time ago. Thank you very much indeed for your enthusiasm and engagement on our little project.

 

I already have the maxxus see emulator - it's precisely the one i've been trying to use as a draft for a ssse3 emulator, with little succes yet. Meklort once sent me a link to it, but at the time i'd already found it by myself. Now i'm looking desperately for the new one, from the voodoo team, since it's newer, faster and written in a language i'm confortable with, plain C. But, thanks to your links to pages i'd had already read, now i remember why i can't find the voodoo emulator anywhere: it was this rift, this awful mess, that made some devs decide to keep their sources closed, unfortunately. Shameful.

 

For myself, i'm working on it: started these days to learn the syntax for a new assembler, HLA, and i'm already playing with it. As soon as i become comfortable with this syntax, which is btw far simpler than traditional asm, i start to deal with our major issue again. At the same time, Brandon Holland is making great advances on patching the ML kernel for Pentium-Ds, so good news on the legacy Intel front.

 

Stay tuned!

 

can this

http://pintool.org/

and this

http://software.inte...opment-emulator

help?

 

reading the GCC manpages, is there a way to tell the compiler to generate a target for a non supplementalsse3 capable target?

 

The Intel emulator sounds promising: thank you very much indeed!

  • Like 1
Link to comment
Share on other sites

Spakk, i swear to you: if we had five more like you, AMD would have been roaring the Mountain Lion tune long time ago. Thank you very much indeed for your enthusiasm and engagement on our little project.

 

I already have the maxxus see emulator - it's precisely the one i've been trying to use as a draft for a ssse3 emulator, with little succes yet. Meklort once sent me a link to it, but at the time i'd already found it by myself. Now i'm looking desperately for the new one, from the voodoo team, since it's newer, faster and written in a language i'm confortable with, plain C. But, thanks to your links to pages i'd had already read, now i remember why i can't find the voodoo emulator anywhere: it was this rift, this awful mess, that made some devs decide to keep their sources closed, unfortunately. Shameful.

 

For myself, i'm working on it: started these days to learn the syntax for a new assembler, HLA, and i'm already playing with it. As soon as i become comfortable with this syntax, which is btw far simpler than traditional asm, i start to deal with our major issue again. At the same time, Brandon Holland is making great advances on patching the ML kernel for Pentium-Ds, so good news on the legacy Intel front.

 

Stay tuned!

 

 

 

The Intel emulator sounds promising: thank you very much indeed!

 

 

thanks for the flowers theconnatic,

 

I try to do my Best. It's just a shame I can not programming. I have somewhere once in the course of time found a Linux code file, where many AMD CPUS had been raised therein.

Once I find this code snippet, I'll write the link in here.

 

thanks for the flowers theconnatic,

 

I try to do my Best. It's just a shame I can not programming. I have somewhere once in the course of time found a Linux code file, where many AMD CPUS had been raised therein.

Once I find this code snippet, I'll write the link in here.

 

Maybe you could use something from here,

Mac Lion AMD kernel source diff from ZackehSoul http://pastebin.com/z4K2idrf ZackehSoul has also listed in the diff file the AMD Phenom K10 processor.

Link to comment
Share on other sites

Spakk, i swear to you: if we had five more like you, AMD would have been roaring the Mountain Lion tune long time ago. Thank you very much indeed for your enthusiasm and engagement on our little project.

 

I already have the maxxus see emulator - it's precisely the one i've been trying to use as a draft for a ssse3 emulator, with little succes yet. Meklort once sent me a link to it, but at the time i'd already found it by myself. Now i'm looking desperately for the new one, from the voodoo team, since it's newer, faster and written in a language i'm confortable with, plain C. But, thanks to your links to pages i'd had already read, now i remember why i can't find the voodoo emulator anywhere: it was this rift, this awful mess, that made some devs decide to keep their sources closed, unfortunately. Shameful.

 

For myself, i'm working on it: started these days to learn the syntax for a new assembler, HLA, and i'm already playing with it. As soon as i become comfortable with this syntax, which is btw far simpler than traditional asm, i start to deal with our major issue again. At the same time, Brandon Holland is making great advances on patching the ML kernel for Pentium-Ds, so good news on the legacy Intel front.

 

Stay tuned!

 

 

 

The Intel emulator sounds promising: thank you very much indeed!

 

 

and that's good>> http://www.phoronix....r2_tuning&num=1

 

 

here is the patch http://gcc.gnu.org/m...10/txt00154.txt

 

I hope it brings us a little further forward and do not unnecessarily confused. :king:

 

 

 

x86 Open64 Compiler Suite more here with download> http://developer.amd...es/default.aspx

 

Overview

 

The x86 Open64 compiler system is a high performance, production quality code generation tool designed for high performance parallel computing workloads. The x86 Open64 environment provides the developer the essential choices when building and optimizing C, C++, and Fortran applications targeting 32-bit and 64-bit Linux platforms.

The x86 Open64 compiler system offers a high level of advanced optimizations, multi-threading, and processor support that includes global optimization, vectorization, interprocedural analysis, feedback directed optimizations, loop transformations, and code generation which extracts the optimal performance from each x86 processor core.

The x86 Open64 Compiler Suite simplifies and accelerates development and tuning for x86, AMD64 (AMD® x86-64 Architecture), and Intel64 (Intel® x86-64 Architecture) applications. The x86 Open64 compilers create a strong foundation for building robust, high performance parallel code through MPI, OpenMP®, and auto-parallelization along with highly optimized libraries*.

 

Features

 

The x86 Open64 Compiler Suite provides the following features to help you generate high-performance multi-threaded applications for multi-core platforms.

  • Extended proactive loop optimizations for improved loop-fusion, if-merging, loop-unswitching, loop-interchange and if-condition pre-computation.
     
  • Added support for partial vectorization(simdization). We now have two slightly different approaches which may help different cases. –LNO:simd=3 could help certain cases and could use -LNO:psimd_iso=ON and -LNO:psimd_iso_unroll=ON which could benefit other cases
     
  • Added new peep-hole optimizations including improve sign extension codes, register, usage etc.
     
  • Improvements to dispatch scheduling in terms of alignment, padding, instruction size etc. You can enable this using the flag -CG:dsched
     
  • Improved performance of certain class of intrinsic such as mm_set* through better handling of CONSTRUCTORs and CONSTs
     
  • Added support to unconditionally generate non-temporal stores.
     
  • General correctness improvements including bug fixes for problems in handling BOZ constants, constant folding in Fortran data statements, better handling of floating point rules, handling complex division overflows etc.
     
  • You can enable this new instructions in Piledriver core using the -march=bdver2. Alternately you can pick and choose the ISA to be enabled using -mfma (for FMA3), -mfma4, -mbmi, -mtbm flags
     
  • Please refer to ReleaseNotes for further details

Language Standards Platform Highlights

  • ANSI C99, ISO C++98
    • Conforms to ISO/IEC 9899: 1999, Programming Languages - C standard
       
    • Conforms to ISO/IEC 14882:1998(E), Programming Languages - C++ standard

    [*]Fortran 77, 90, 95

    • Conforms to ISO/IEC 1539-1: 1997 Programming Languages - Fortran

    [*]Inter-language calling

     

    [*]IEEE 754 floating point support

  • x86 32-bit and x86 64-bit code generation
     
  • Large File support on 32-bit systems
     
  • Byte-swapping I/O
     
  • Vector and scalar SSE/SSE2/SSE3/SSE4.1/SSE4.2/AVX/XOP/FMA4/FMA3 code generation
     
  • OpenMP 2.5 for shared memory models
     
  • MPICH2/OpenMPI for distributed and shared memory models
     
  • Optimized AMD Core Math Library (ACML)

@ genben, bcobco, zchef2k, theconnactic, Lordadmiral Drake

helps us continue to come forward, or is this the wrong way?

 

PSS: I have deleted the download link. If it wants to send me a message.


     

Link to comment
Share on other sites

Managed to build a custom libsystem_c.dylib with no ssse3 code, but it doesn't seem to work. Probably has something to do with the fact that other libraries link to it and its probably missing dependencies. Doesn't log anything just freezes in the usual place :/ Either way your going to want an ssse3 emulator cause I'm sure there are plenty of other places where ssse3 is being used throughout the entire os. I'm going to have to put the project on the back burner for now until work calms down a bit. Good luck.

Link to comment
Share on other sites

sorry if I was nervous again. I read Prashant Vaibhav worked for the mercuryquad developers team also.

As written, the code tell me nothing. If you checking whether this is important or not here.

 

https://bitbucket.org/mercurysquad

 

 

http://www.insanelymac.com/forum/topic/127896-the-care-feeding-of-xnu/

Link to comment
Share on other sites

spakk, thanks for your effort.

im sorry to tell that i dont know programming, i cannot help in this hard task.

my cpu is amd kuma 7850 (k10 family) wich has no SupplementalSSE3 extensions, i dont see how to install osx-10.8.

actually the only thing that i can do is test kernel on osx-10.6 but i suppose that kernel and modular extensions are not compatible due to different version target between them.

my testing scenario is not optimal. first thing i think i should have is a working osx-10.8 copied on a partition. is this possible with a non-ssse3 cpu?

  • Like 1
Link to comment
Share on other sites

spakk, thanks for your effort.

im sorry to tell that i dont know programming, i cannot help in this hard task.

my cpu is amd kuma 7850 (k10 family) wich has no SupplementalSSE3 extensions, i dont see how to install osx-10.8.

actually the only thing that i can do is test kernel on osx-10.6 but i suppose that kernel and modular extensions are not compatible due to different version target between them.

my testing scenario is not optimal. first thing i think i should have is a working osx-10.8 copied on a partition. is this possible with a non-ssse3 cpu?

 

 

 

You can try my method. So far I have installed many versions of OSX with this method for AMD.

 

1.) You need a PC with Intel SSSE3 CPU with running (Installed) Lion 10.7 * version.

2.) An external HDD with min. 40 GB of storage

3.) A "Install OSX Lion Mountain 10.8" from Mac App Store

4.) Download Uni_Beast for Mountain Lion

5.) TonyMac How-To http://www.tonymacx8...l-based-pc.html

6.) modified kext driver for your AMD-Hardware

 

7.) After you install (see TonyMac How-to) "Mountain Lion on your first partition on your external hard drive (about 8-10 GB 1.Partition) then you put all modified AMD kexts

in S/L/E your 1st partition. Then you copy your "Extra" folder from 10.6.* and put it on root of your first partition.

8.) Install from your Intel PC Mountain Lion 10.8 on your 2.Partition your external hard drive.

Start Mountain Lion Install with boot flag: -v -f cpus=2 arch=x86_64 . Finally, you install the "XNU.diff" and 'connatic" modified kernel on root

9.) connect external hard drive to the AMD PC

10.) Adjust AMD PC BIOS!

11.) Start Your AMD PC and test if system starts

 

The installation work but we have to wait a while on the modified kernel and hope theconnatic realize it.

 

Good luck

  • Like 2
Link to comment
Share on other sites

Hi theconnatic

Hi Brandon Holland

 

I liked to ask whether the last source code (by Maxxuss, rufus, and semthex from 07/26/07) I've uploaded here, for the new kernel patch is useful or not?

Link to comment
Share on other sites

It's undoubtedly useful.

 

I'm traveling right now, so i won't be working on the kernel until the second week of november.

 

Ok, thanks for the good response :wink2:

Link to comment
Share on other sites

Hi theconnatic.

 

I had recently this kernel panic message on my AMD (see # 278).

/osfmk/vm/vm_resident.c:757 ---> in the original "vm_resident.c" in line 757 is nothing! can you check your vm_resident.c , please

 

 

here is my second result: :wallbash:

what should I do?

 

In case you read this there has been a kernel panic.

There is no {censored} suport for running Lion on AMD.

You have to try fixing this yourself.

panic (cpu 0 caller 0xffffff80002871b7 ) "pmap_steal_memory" @/Users/Jimihendrix/Desktop/XNUPATCHED2/osfmk/vm/vm_resident.c:757

Debugger called:

Backtrace (CPU 0), Frame : Return Address

0xffffff800010be00 : 0xffffff800021d496 mach_kernel : _panic + 0xc6

0xffffff800010be70 : 0xffffff80002871b7 mach_kernel : _pmap_steal_memory + 0xa7

0xffffff800010bec0 : 0xffffff80002428fe mach_kernel : _zone_steal_memory + 0x1e

0xffffff800010bed0 : 0xffffff800070efec mach_kernel : _vm_page_bootstrap + 0x62c

0xffffff800010bf30 : 0xffffff800070e016mach_kernel : _vm_mem_bootstrap + 0x16

0xffffff800010bf60 : 0xffffff800070d3a9 mach_kernel : _kernel_bootstrap + 0x99

0xffffff800010bfa0 : 0xffffff80002bafd2 mach_kernel : _machine_startup + 0x1b2

0xffffff800010bfc0 : 0xffffff80002ad893 mach_kernel : _i386_init + 0x293

0xffffff800010bff0 : 0xffffff80002b2318 mach_kernel : _x86_init_wrapper + 0x8

can't perform kext scan: no kext summary

BSD process name corresponding to current thread: Unknown

Boot args: boot-uuid=BE275D42-FA96-91BA-FDFD940E6B3D rd=*uuid -v npci=0x2000 legacy -v -x cpus=6 arch=x86_64 busratio=20 maxmem=4096

 

Mac OS version:

Not yet set

Kernel version:

Darwin Kernel Version 12.0.0: Wed Oct 24 02:34:15 BRST 2012; bronzovkAnVoodoo v0.9.30:XNUPATCHED2/BUILD/obj/RELEASE_X86_64

 

System uptime in nanoseconds: 0

 

 

 

In fact, it is so that when you boot with boot flag: - x , then comes the panic message

 

I think that the error is since Leopard 10.5 and nobody has adjusted this error.

Link to comment
Share on other sites

I already have the maxxus see emulator - it's precisely the one i've been trying to use as a draft for a ssse3 emulator, with little succes yet. Meklort once sent me a link to it, but at the time i'd already found it by myself. Now i'm looking desperately for the new one, from the voodoo team, since it's newer, faster and written in a language i'm confortable with, plain C. But, thanks to your links to pages i'd had already read, now i remember why i can't find the voodoo emulator anywhere: it was this rift, this awful mess, that made some devs decide to keep their sources closed, unfortunately.

 

I don't know if I am being helpful here, it's been years since I last came here but the Leopard Voodoo XNU source is here: http://code.google.com/p/xnu-dev/wiki/SourceCode?tm=4

 

Hopefully that can be of some use. I don't code but yeah.

Link to comment
Share on other sites

How I create with XCode Mountain Lion mach_kernel, can someone explain to me step by step?. Although I have the version 4.5 but I am an absolute beginner and need urgent help.

 

Thanks in advance

Link to comment
Share on other sites

spakk, here is a guide for tiger, just download the 10.8 version of all the linked files http://www.enigma.id...ompile_xnu.html

 

Thank you for your quick response SS01. The website I already know, I can not handle it, that's my problem.

 

@ SS01, I found this website, I will try to create mach_kernel

 

http://3rr0rists.net...ntain-lion.html

Link to comment
Share on other sites

 Share

×
×
  • Create New...