Re: Using NVRAM for boot-time kext settings?
Re: Using NVRAM for boot-time kext settings?
- Subject: Re: Using NVRAM for boot-time kext settings?
- From: Regis Duchesne <email@hidden>
- Date: Thu, 26 Mar 2015 17:08:43 +0000
- Thread-topic: Using NVRAM for boot-time kext settings?
Using the NVRAM for boot-time kext settings works (we use it here at VMware). I know of two ways to do that:
1) via boot-args, using PE_parse_boot_argn()
That is fine if the driver only reads the variable.
2) via your own variables, using setProperty() and getProperty() on IORegistryEntry::fromPath("/options", gIODTPlane).
The driver can read and write variables this way, but be aware that writes are actually committed to NVRAM only when OS X shuts down/reboots.
The property name must be a string of the form [<UPPERCASED GUID>:]<NAME>. If <UPPERCASED GUID> is omitted, it defaults to the string 7C436110-AB2A-4BBB-A880-FE41995C9F82.
But remember: the NVRAM space is very limited (to 64 KB, if I remember correctly)...
Cheers,
--
hpreg
_______________________________________________
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