- 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);
-
+ IONVRAMController *_nvramController;
+ OSPtr<const OSSymbol> _registryPropertiesKey;
+ UInt8 *_nvramImage;
+ IOLock *_variableLock;
+ UInt32 _commonPartitionOffset;
+ UInt32 _commonPartitionSize;
+ UInt8 *_commonImage;
+ IODTNVRAMVariables *_commonService;
+ OSPtr<OSDictionary> _commonDict;
+ UInt32 _systemPartitionOffset;
+ UInt32 _systemPartitionSize;
+ UInt8 *_systemImage;
+ IODTNVRAMVariables *_systemService;
+ OSPtr<OSDictionary> _systemDict;
+ OSPtr<OSDictionary> _nvramPartitionOffsets;
+ OSPtr<OSDictionary> _nvramPartitionLengths;
+ bool _systemPanicked;
+ SInt32 _lastDeviceSync;
+ bool _freshInterval;
+ bool _isProxied;
+ UInt32 _nvramSize;
+
+ virtual UInt8 calculatePartitionChecksum(UInt8 *partitionHeader);
+ virtual IOReturn initVariables(void);
+ virtual UInt32 getOFVariableType(const char *propName) const;
+ virtual UInt32 getOFVariableType(const OSSymbol *propSymbol) const;
+ virtual UInt32 getOFVariablePerm(const char *propName) 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,
+ LIBKERN_RETURNS_RETAINED const OSSymbol **propSymbol,
+ LIBKERN_RETURNS_RETAINED OSObject **propObject);
+ bool convertPropToObject(UInt8 *propName, UInt32 propNameLength,
+ UInt8 *propData, UInt32 propDataLength,
+ OSSharedPtr<const OSSymbol>& propSymbol,
+ OSSharedPtr<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 OSPtr<OSData> unescapeBytesToData(const UInt8 *bytes, UInt32 length);
+ virtual OSPtr<OSData> escapeDataToData(OSData * value);
+
+ virtual IOReturn readNVRAMPropertyType1(IORegistryEntry *entry,
+ const OSSymbol **name,
+ OSData **value);
+ virtual IOReturn writeNVRAMPropertyType1(IORegistryEntry *entry,
+ const OSSymbol *name,
+ OSData *value);
+
+ UInt32 getNVRAMSize(void);
+ void initNVRAMImage(void);
+ void initProxyData(void);
+ IOReturn syncVariables(void);
+ IOReturn setPropertyInternal(const OSSymbol *aKey, OSObject *anObject);
+ IOReturn removePropertyInternal(const OSSymbol *aKey);
+ IOReturn chooseDictionary(IONVRAMOperation operation, const uuid_t *varGuid,
+ const char *variableName, OSDictionary **dict) const;
+ bool handleSpecialVariables(const char *name, uuid_t *guid, OSObject *obj, IOReturn *error);
+