Re: using IONVRAM functions
Re: using IONVRAM functions
- Subject: Re: using IONVRAM functions
- From: Ryan Rempel <email@hidden>
- Date: Wed, 20 Jul 2005 00:59:02 -0500
On 7/18/05, Herbert <email@hidden> wrote:
> Does anyone have code/ideas on how to use these functions? I've been
> on Google, all over Apple, and poked around in the Darwin source but
> no joy.
>
> I need to read an NVRAM value from my driver.
If you just need one of the Open Firmware variables, then you can look
at the properties of the /options node in the device tree (with the
standard IORegistryEntry getProperty methods). If you need something
else, then the /options node is an IODTNVRAM, so you can look at
IONVRAM.h to see how to talk to it. Depending on what you want, you
might be interested in readXPRAM or readNVRAMPartition.
Actually, it's probably easier to call the related methods in the
platform expert (they are basically wrappers around the IODTNVRAM
methods) -- see IOPlatformExpert.h.
One trick when doing this from a driver is that the nvram driver may
not have loaded yet when you are in your start method (the nvram
driver is just another driver, so it may load before or after yours).
There would be different ways to deal with this, depending on what
you're trying to do.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden