site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soggywizards-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=2yoSsDKZc4VVLtrdpJdnQsfDaJKApFIxdI7c5IFk/3A=; b=P8P45Le9roZlXu/DBGtBUiG6XLw3wWGo8QeKcP6ptpCdm8wcOiGgefuFwl4AJzMVXG vha7gphzNX3/MzQ36of6EfvCzVpIEmrVaNSqLY0qp5vTVL27xwqqvYth/wOwr6RWiufg GNkIVtNwjcb61vFUDdGUpYuxeK+1BVikt5mYO/znYAPu1dKY8piznzBxMUJ4tJN0+rDH MfIUQIPTIviGJNrehWms2pwMYNJcv/8odDGnpnfdajTJN7NN9JwQd+vscZjtyMceJPp5 SRvALfv8qDKHcwtIzfc3Y5opsBZ6FdDWbCeaLL5m6Vl6UvVVXYFr4L7GOnHug4ZDSjJT rSsw== Good for you. I'm always happy when the young people exhibit initiative. Recent releases of Mac OS X (now macOS) require kernel extensions - drivers mostly - to be digitally signed when used in the "normal way". However you can disable the signing requirement by disabling System Integrity Protection in the Recovery System: Reboot your Mac. At the very beginning of boot, hold down the option key. (This works more reliably for me than Command-R or whatever it is.) Eventually a row of icons will appear. Click on the one that has "Recovery" in its name. Click the up-arrow just below the Recovery icon. When you're in the Recovery desktop, select Terminal from the Utilities menu. It's slow to load - be patient. The terminal will have a root shell. No need for "sudo". This command disables System Integrity Protection: $ csrutil disable You will also want to set some debugging flags in the nvram. The nvram can only be changed in Recovery mode. $ nvram -p | grep boot-args ... will display the current value of boot-args. You will want to do something like: $ nvram boot-args="debug=0x14e" There are various lists of what you can do with boot-args. Here's one: https://osxeon.wordpress.com/2015/08/10/boot-argument-options-in-os-x/ IMHO the two-machine debugger works best with Firewire. If your boxes don't have firewire port you can use Thunderbolt Firewire dongles. For this you will need: $ nvram boot-args="debug=0x14e kdp_match_name=firewire fwkdp=0x8000" fwkdp only needs to be set when using the Thunderbolt dongle. Reboot again but don't hold the option key. If you _do_ have your boxes attached via firewire, you can also get the kernel printfs sent over firewire: $ fwkpfv On the host machine (the one with the debugger UI): $ fwkdp Apple recommends hiding the terminal window. I'm not clear why one shouldn't use "nohup fwkdp &" but maybe that's because someone's grandmother did it that way. In another Terminal window: $ lldb
kdp-remote localhost
Enter the two-machine debugger on the target: PE_enter_debugger( "message" ) Staple my email to your monitor and you'll do just fine. Don't be shy about asking questions. On Sun, Apr 1, 2018 at 2:28 PM, N <scandium@me.com> wrote:
Unfortunately, XNU is not very well documented (compared to some other kernels). The documentation should mostly correspond to the current version of the kernel. Another excellent piece of documentation is Amit Singh's book on OS X, which is quite dated, but still remains highly relevant.
XNU directory structure reflects the components of the kernel. For example, osfmk/ is the mach part, and bsd/ is the BSD part. The above book also maps functionality of the kernel to its components.
On 1 Apr 2018, at 22:49, Pranav Vyas <vyas.pranav4@gmail.com> wrote:
Hey everyone,
I am an undergrad studying Operating Systems. We have been asked to do a case study on any operating system of our choice. Detailing how it handles process scheduling, memory management, disk scheduling etc. I wanted to do mine on macOS, and I found this guide online: https://developer.apple.com/library/content/documentation/Darwin/Conceptual/...
It is perfect for my needs, but it appears to have last been updated in 2013. So I was wondering, 1) Is there a more recent version of this guide? 2) Or failing that, is there some way to find what substantive changes have been made to the kernel since 2013?
Also, I found the source code for Darwin on Github, however, I have very little experience navigating such a huge database, any tips on how to get started?
Thank you for your time. Pranav _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-kernel/scandium%40me.com
This email sent to scandium@me.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-kernel/mike%40soggywizards.co...
This email sent to mike@soggywizards.com
-- Mike Crawford Portland Custom Software Development mike@soggywizards.com http://soggywizards.com One Must Not Trifle With Wizards For It Makes Us Soggy And Hard To Light _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com