Difference between revisions of "NOR (NVRAM)"

From The iPhone Wiki
Jump to: navigation, search
m (more)
m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
This section of [[NOR]] stores environmental variables. There are two copies of it.
+
'''NVRAM''', or '''[[wikipedia:Non-volatile random-access memory|non-volatile random-access memory]]''', is a section of the [[NOR]] that stores environmental variables. There are two copies of it.
   
 
== Various Decompilations ==
 
== Various Decompilations ==
Line 6: Line 6:
 
kCmdArgTypeInteger = 1
 
kCmdArgTypeInteger = 1
 
};
 
};
  +
 
 
typedef struct {
 
typedef struct {
 
signed int _unk0;
 
signed int _unk0;

Latest revision as of 00:25, 18 February 2015

NVRAM, or non-volatile random-access memory, is a section of the NOR that stores environmental variables. There are two copies of it.

Various Decompilations

enum {
    kCmdArgTypeString = 0,
    kCmdArgTypeInteger = 1
};
typedef struct {
    signed int _unk0;
    unsigned int uinteger;
    signed int integer;
    unsigned int type;
    unsigned char* string;
} CmdArg;
typedef struct {
    struct NvramVar* prev;
    struct NvramVar* next;
    unsigned char* string;
    unsigned int integer;
    unsigned int doSave;
    char name[64];
} NvramVar;
unsigned int nvram_getint(const char* name, unsigned int default) {
    NvramVar* var = nvram_getvar(name);
    if (var != NULL) {
        return var->integer;	
    }
    return default;
}
Hacking.png This hardware article is a "stub", an incomplete page. Please add more content to this article and remove this tag.