Re: using IONVRAM functions
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Qb80Xo+AI7svecDV1J3S43mPHIT4Za3YPcKoVKzYI3Rr3mMqcOBsXhuN359MU21HWSy4tNvJZZYMLBbzweGAyD1V7HMPdFgTMp4m650uOZS2uysfASeISySA1H4ChsYvrr6/kmJZ9jMNcMbUXhYTrLRb1+emoyJXUlhrrPl0f78= On 7/18/05, Herbert <herbyLoveBug@shaw.ca> 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 (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Ryan Rempel