xref: /xnu-10063.141.1/tests/nvram_tests/nvram_helper.h (revision d8b80295118ef25ac3a784134bcf95cd8e88109f)
1 #ifndef NVRAM_HELPER_H
2 #define NVRAM_HELPER_H
3 
4 #include <IOKit/IOKitLib.h>
5 #include <CoreFoundation/CoreFoundation.h>
6 
7 typedef enum{
8 	OP_SET = 0,
9 	OP_GET,
10 	OP_DEL,
11 	OP_DEL_RET,
12 	OP_RES,
13 	OP_OBL,
14 	OP_SYN
15 } nvram_op;
16 
17 #define SystemNVRAMGuidString "40A0DDD2-77F8-4392-B4A3-1E7304206516"
18 #define CommonNVRAMGuidString "7C436110-AB2A-4BBB-A880-FE41995C9F82"
19 #define RandomNVRAMGuidString "11112222-77F8-4392-B4A3-1E7304206516"
20 
21 #define KernelOnlyVariablePrefix "krn."
22 #define kIONVRAMForceSyncNowPropertyKey "IONVRAM-FORCESYNCNOW-PROPERTY"
23 #define DefaultSetVal         "1234"
24 
25 io_registry_entry_t CreateOptionsRef(void);
26 void ReleaseOptionsRef(io_registry_entry_t optionsRef);
27 void TestVarOp(nvram_op op, const char *var, const char *val, kern_return_t exp_ret, io_registry_entry_t optionsRef);
28 CFTypeID GetVarType(const char *name, io_registry_entry_t optionsRef);
29 #endif /* NVRAM_HELPER_H */
30