- virtual bool init(IORegistryEntry *old, const IORegistryPlane *plane);
-
- virtual void registerNVRAMController(IONVRAMController *nvram);
-
- virtual void sync(void);
-
- virtual bool serializeProperties(OSSerialize * serialize) const;
- virtual OSObject *getProperty(const OSSymbol *aKey) const;
- virtual OSObject *getProperty(const char *aKey) const;
- virtual bool setProperty(const OSSymbol *aKey, OSObject *anObject);
- virtual IOReturn setProperties(OSObject *properties);
-
- virtual IOReturn readXPRAM(IOByteCount offset, UInt8 *buffer,
- IOByteCount length);
- virtual IOReturn writeXPRAM(IOByteCount offset, UInt8 *buffer,
- IOByteCount length);
-
- virtual IOReturn readNVRAMProperty(IORegistryEntry *entry,
- const OSSymbol **name,
- OSData **value);
- virtual IOReturn writeNVRAMProperty(IORegistryEntry *entry,
- const OSSymbol *name,
- OSData *value);
-
- virtual OSDictionary *getNVRAMPartitions(void);
-
- virtual IOReturn readNVRAMPartition(const OSSymbol *partitionID,
- IOByteCount offset, UInt8 *buffer,
- IOByteCount length);
-
- virtual IOReturn writeNVRAMPartition(const OSSymbol *partitionID,
- IOByteCount offset, UInt8 *buffer,
- IOByteCount length);
-
- virtual IOByteCount savePanicInfo(UInt8 *buffer, IOByteCount length);
+ virtual IOReturn syncOFVariables(void);
+private:
+ virtual UInt32 getOFVariableType(const OSSymbol *propSymbol) const;
+ virtual UInt32 getOFVariablePerm(const OSSymbol *propSymbol) const;
+ virtual bool getOWVariableInfo(UInt32 variableNumber, const OSSymbol **propSymbol,
+ UInt32 *propType, UInt32 *propOffset);
+ virtual bool convertPropToObject(UInt8 *propName, UInt32 propNameLength,
+ UInt8 *propData, UInt32 propDataLength,
+ const OSSymbol **propSymbol,
+ OSObject **propObject);
+ virtual bool convertObjectToProp(UInt8 *buffer, UInt32 *length,
+ const OSSymbol *propSymbol, OSObject *propObject);
+ virtual UInt16 generateOWChecksum(UInt8 *buffer);
+ virtual bool validateOWChecksum(UInt8 *buffer);
+ virtual void updateOWBootArgs(const OSSymbol *key, OSObject *value);
+ virtual bool searchNVRAMProperty(struct IONVRAMDescriptor *hdr,
+ UInt32 *where);
+
+ virtual IOReturn readNVRAMPropertyType0(IORegistryEntry *entry,
+ const OSSymbol **name,
+ OSData **value);
+ virtual IOReturn writeNVRAMPropertyType0(IORegistryEntry *entry,
+ const OSSymbol *name,
+ OSData * value);
+
+ virtual OSData *unescapeBytesToData(const UInt8 *bytes, UInt32 length);
+ virtual OSData *escapeDataToData(OSData * value);
+
+ virtual IOReturn readNVRAMPropertyType1(IORegistryEntry *entry,
+ const OSSymbol **name,
+ OSData **value);
+ virtual IOReturn writeNVRAMPropertyType1(IORegistryEntry *entry,
+ const OSSymbol *name,
+ OSData *value);
+
+ void initNVRAMImage(void);
+ void initProxyData(void);
+ IOReturn syncVariables(void);
+
+public:
+ virtual bool init(IORegistryEntry *old, const IORegistryPlane *plane) APPLE_KEXT_OVERRIDE;
+
+ virtual void registerNVRAMController(IONVRAMController *nvram);
+
+ virtual void sync(void);
+
+ virtual bool serializeProperties(OSSerialize *s) const APPLE_KEXT_OVERRIDE;
+ virtual OSObject *copyProperty(const OSSymbol *aKey) const APPLE_KEXT_OVERRIDE;
+ virtual OSObject *copyProperty(const char *aKey) const APPLE_KEXT_OVERRIDE;
+ virtual OSObject *getProperty(const OSSymbol *aKey) const APPLE_KEXT_OVERRIDE;
+ virtual OSObject *getProperty(const char *aKey) const APPLE_KEXT_OVERRIDE;
+ virtual bool setProperty(const OSSymbol *aKey, OSObject *anObject) APPLE_KEXT_OVERRIDE;
+ virtual void removeProperty(const OSSymbol *aKey) APPLE_KEXT_OVERRIDE;
+ virtual IOReturn setProperties(OSObject *properties) APPLE_KEXT_OVERRIDE;
+
+ virtual IOReturn readXPRAM(IOByteCount offset, UInt8 *buffer,
+ IOByteCount length);
+ virtual IOReturn writeXPRAM(IOByteCount offset, UInt8 *buffer,
+ IOByteCount length);
+
+ virtual IOReturn readNVRAMProperty(IORegistryEntry *entry,
+ const OSSymbol **name,
+ OSData **value);
+ virtual IOReturn writeNVRAMProperty(IORegistryEntry *entry,
+ const OSSymbol *name,
+ OSData *value);
+
+ virtual OSDictionary *getNVRAMPartitions(void);
+
+ virtual IOReturn readNVRAMPartition(const OSSymbol *partitionID,
+ IOByteCount offset, UInt8 *buffer,
+ IOByteCount length);
+
+ virtual IOReturn writeNVRAMPartition(const OSSymbol *partitionID,
+ IOByteCount offset, UInt8 *buffer,
+ IOByteCount length);
+
+ virtual IOByteCount savePanicInfo(UInt8 *buffer, IOByteCount length);
+ virtual bool safeToSync(void);
+ void syncInternal(bool rateLimit);