From: Alexander Graf <agraf@suse.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: suse@csgraf.de, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] AppleSMC device emulation
Date: Wed, 30 Jun 2010 10:26:16 +0200 [thread overview]
Message-ID: <1966955F-EF05-4F2C-B2FF-5228AF486528@suse.de> (raw)
In-Reply-To: <AANLkTilUT6vKd2Ao-7WXnZzc4iWh10Mk3_MlmNcK7hBw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1650 bytes --]
On 29.06.2010, at 20:38, Blue Swirl wrote:
> On Tue, Jun 29, 2010 at 2:35 PM, Alexander Graf <agraf@suse.de> wrote:
>> Intel Macs have a chip called the "AppleSMC" which they use to control
>> certain Apple specific parts of the hardware, like the keyboard background
>> light.
>>
>> That chip is also used to store a key that Mac OS X uses to decrypt binaries.
>>
>> This patch adds emulation for that chip, so we're getting one step further
>> to having Mac OS X run natively on Qemu.
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>> ---
>> Makefile.target | 2 +-
>> hw/applesmc.c | 225 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 226 insertions(+), 1 deletions(-)
>> create mode 100644 hw/applesmc.c
>>
>>
[...]
>>
>> +#ifdef DEBUG_SMC
>> +#define smc_debug(...) printf(__VA_ARGS__)
>
> How about:
> #define smc_debug(fmt, ...) printf("APPLESMC: " fmt, ## __VA_ARGS__)
Well, I went with smc_debug(...) fprintf(stderr, "APPLESMC: " __VA_ARGS__). That way you can do fun things like smc_debug("Hello World");
:)
[...]
>>
>> +
>> + applesmc_add_key(s, "REV ", 6, "\0x01\0x13\0x0f\0x00\0x00\0x03");
>> + applesmc_add_key(s, "OSK0", 32, s->osk);
>> + applesmc_add_key(s, "OSK1", 32, s->osk + 32);
>> + applesmc_add_key(s, "NATJ", 1, "\0");
>> + applesmc_add_key(s, "MSSP", 1, "\0");
>> + applesmc_add_key(s, "MSSD", 1, "\0x3");
>
> Please add a reset function which sets these, possibly freeing the old
> keys. That is, if it is the correct action in reset.
Hrm. I guess it's the closest thing to "correct".
Alex
[-- Attachment #2: Type: text/html, Size: 3383 bytes --]
next prev parent reply other threads:[~2010-06-30 8:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-29 14:35 [Qemu-devel] [PATCH] AppleSMC device emulation Alexander Graf
2010-06-29 18:38 ` Blue Swirl
2010-06-30 8:26 ` Alexander Graf [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-06-30 8:41 Alexander Graf
2010-07-11 7:15 ` Alexander Graf
2010-07-11 19:28 ` Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1966955F-EF05-4F2C-B2FF-5228AF486528@suse.de \
--to=agraf@suse.de \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=suse@csgraf.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).