blob: 2e05dd096858cabd7aeb871a9bc06068631cb095 [file] [log] [blame]
Amaury Pouly44bb2852016-11-11 15:40:56 +01001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2016 Amaury Pouly
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
15 *
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
18 *
19 ****************************************************************************/
20#ifndef __NWZ_DB_H__
21#define __NWZ_DB_H__
22
23/** /!\ This file was automatically generated, DO NOT MODIFY IT DIRECTLY /!\ */
24
25/* List of all known NVP nodes */
26enum nwz_nvp_node_t
27{
28 NWZ_NVP_APD, /* application debug mode flag */
29 NWZ_NVP_APP, /* application parameter */
30 NWZ_NVP_BFD, /* btmw factory scdb */
31 NWZ_NVP_BFP, /* btmw factory pair info */
32 NWZ_NVP_BLF, /* browser log mode flag */
33 NWZ_NVP_BML, /* btmw log mode flag */
34 NWZ_NVP_BOK, /* beep ok flag */
35 NWZ_NVP_BPR, /* bluetooth address | bluetooth parameter */
36 NWZ_NVP_BTC, /* battery calibration */
37 NWZ_NVP_BTI, /* boot image */
Amaury Pouly44bb2852016-11-11 15:40:56 +010038 NWZ_NVP_CLV, /* color variation */
Amaury Poulybe68b6a2017-01-07 17:32:47 +010039 NWZ_NVP_CNG, /* aad key | aad/empr key */
Amaury Pouly44bb2852016-11-11 15:40:56 +010040 NWZ_NVP_CTR, /* */
41 NWZ_NVP_DBA, /* aad icv */
42 NWZ_NVP_DBG, /* */
43 NWZ_NVP_DBI, /* dead battery image */
Igor Skochinsky03dd4b92017-04-03 15:13:46 +020044 NWZ_NVP_DBS, /* */
Amaury Poulybe68b6a2017-01-07 17:32:47 +010045 NWZ_NVP_DBV, /* empr icv | empr key */
Amaury Pouly44bb2852016-11-11 15:40:56 +010046 NWZ_NVP_DCC, /* secure clock */
Igor Skochinsky03dd4b92017-04-03 15:13:46 +020047 NWZ_NVP_DG0, /* */
48 NWZ_NVP_DG1, /* */
Amaury Pouly44bb2852016-11-11 15:40:56 +010049 NWZ_NVP_DOR, /* key mode (debug/release) */
50 NWZ_NVP_E00, /* EMPR 0 */
51 NWZ_NVP_E01, /* EMPR 1 */
52 NWZ_NVP_E02, /* EMPR 2 */
53 NWZ_NVP_E03, /* EMPR 3 */
54 NWZ_NVP_E04, /* EMPR 4 */
55 NWZ_NVP_E05, /* EMPR 5 */
56 NWZ_NVP_E06, /* EMPR 6 */
57 NWZ_NVP_E07, /* EMPR 7 */
58 NWZ_NVP_E08, /* EMPR 8 */
59 NWZ_NVP_E09, /* EMPR 9 */
60 NWZ_NVP_E10, /* EMPR 10 */
61 NWZ_NVP_E11, /* EMPR 11 */
62 NWZ_NVP_E12, /* EMPR 12 */
63 NWZ_NVP_E13, /* EMPR 13 */
64 NWZ_NVP_E14, /* EMPR 14 */
65 NWZ_NVP_E15, /* EMPR 15 */
66 NWZ_NVP_E16, /* EMPR 16 */
67 NWZ_NVP_E17, /* EMPR 17 */
68 NWZ_NVP_E18, /* EMPR 18 */
69 NWZ_NVP_E19, /* EMPR 19 */
70 NWZ_NVP_E20, /* EMPR 20 */
71 NWZ_NVP_E21, /* EMPR 21 */
72 NWZ_NVP_E22, /* EMPR 22 */
73 NWZ_NVP_E23, /* EMPR 23 */
74 NWZ_NVP_E24, /* EMPR 24 */
75 NWZ_NVP_E25, /* EMPR 25 */
76 NWZ_NVP_E26, /* EMPR 26 */
77 NWZ_NVP_E27, /* EMPR 27 */
78 NWZ_NVP_E28, /* EMPR 28 */
79 NWZ_NVP_E29, /* EMPR 29 */
80 NWZ_NVP_E30, /* EMPR 30 */
81 NWZ_NVP_E31, /* EMPR 31 */
82 NWZ_NVP_EDW, /* quick shutdown flag */
Igor Skochinsky03dd4b92017-04-03 15:13:46 +020083 NWZ_NVP_EP0, /* */
84 NWZ_NVP_EP1, /* */
85 NWZ_NVP_EP2, /* */
86 NWZ_NVP_EP3, /* */
Amaury Pouly44bb2852016-11-11 15:40:56 +010087 NWZ_NVP_ERI, /* update error image */
88 NWZ_NVP_EXM, /* exception monitor mode */
89 NWZ_NVP_FMP, /* fm parameter */
90 NWZ_NVP_FNI, /* function information */
91 NWZ_NVP_FPI, /* */
92 NWZ_NVP_FUI, /* update image */
93 NWZ_NVP_FUP, /* firmware update flag */
94 NWZ_NVP_FUR, /* */
95 NWZ_NVP_FVI, /* */
96 NWZ_NVP_GTY, /* getty mode flag */
97 NWZ_NVP_HDI, /* hold image */
98 NWZ_NVP_HLD, /* hold mode */
99 NWZ_NVP_INS, /* */
100 NWZ_NVP_IPT, /* disable iptable flag */
101 NWZ_NVP_KAS, /* key and signature */
102 NWZ_NVP_LBI, /* low battery image */
103 NWZ_NVP_LYR, /* */
104 NWZ_NVP_MAC, /* wifi mac address */
105 NWZ_NVP_MCR, /* marlin crl */
106 NWZ_NVP_MDK, /* marlin device key */
107 NWZ_NVP_MDL, /* middleware parameter */
108 NWZ_NVP_MID, /* model id */
109 NWZ_NVP_MLK, /* marlin key */
110 NWZ_NVP_MSC, /* mass storage class mode */
111 NWZ_NVP_MSO, /* MSC only mode flag */
112 NWZ_NVP_MTM, /* marlin time */
113 NWZ_NVP_MUK, /* marlin user key */
114 NWZ_NVP_NCP, /* noise cancel driver parameter */
115 NWZ_NVP_NVR, /* */
116 NWZ_NVP_PCD, /* product code */
117 NWZ_NVP_PCI, /* precharge image */
Igor Skochinsky03dd4b92017-04-03 15:13:46 +0200118 NWZ_NVP_PNC, /* */
Amaury Pouly44bb2852016-11-11 15:40:56 +0100119 NWZ_NVP_PRK, /* */
120 NWZ_NVP_PSK, /* bluetooth pskey */
121 NWZ_NVP_PTS, /* wifi protected setup */
122 NWZ_NVP_RBT, /* */
Amaury Poulybe68b6a2017-01-07 17:32:47 +0100123 NWZ_NVP_RND, /* random data | wmt key */
Amaury Pouly44bb2852016-11-11 15:40:56 +0100124 NWZ_NVP_RTC, /* rtc alarm */
125 NWZ_NVP_SDC, /* SD Card export flag */
126 NWZ_NVP_SDP, /* sound driver parameter */
127 NWZ_NVP_SER, /* serial number */
128 NWZ_NVP_SFI, /* starfish id */
129 NWZ_NVP_SHE, /* */
130 NWZ_NVP_SHP, /* ship information */
131 NWZ_NVP_SID, /* service id */
132 NWZ_NVP_SKD, /* slacker id file */
133 NWZ_NVP_SKT, /* slacker time */
134 NWZ_NVP_SKU, /* */
135 NWZ_NVP_SLP, /* time out to sleep */
136 NWZ_NVP_SPS, /* speaker ship info */
137 NWZ_NVP_SYI, /* system information */
138 NWZ_NVP_TR0, /* EKB 0 */
139 NWZ_NVP_TR1, /* EKB 1 */
140 NWZ_NVP_TST, /* test mode flag */
141 NWZ_NVP_UBP, /* u-boot password */
142 NWZ_NVP_UFN, /* update file name */
143 NWZ_NVP_UMS, /* */
144 NWZ_NVP_UPS, /* */
Igor Skochinsky03dd4b92017-04-03 15:13:46 +0200145 NWZ_NVP_VAR, /* */
Amaury Pouly44bb2852016-11-11 15:40:56 +0100146 NWZ_NVP_VRT, /* europe vol regulation flag */
147 NWZ_NVP_COUNT /* Number of nvp nodes */
148};
149
150/* Invalid NVP index */
151#define NWZ_NVP_INVALID -1 /* Non-existent entry */
152/* Number of models */
Amaury Pouly80d91e02017-01-08 12:30:46 +0100153#define NWZ_MODEL_COUNT 184
Amaury Pouly44bb2852016-11-11 15:40:56 +0100154/* Number of series */
Amaury Pouly5a0a7b82017-01-07 22:20:14 +0100155#define NWZ_SERIES_COUNT 36
Amaury Pouly44bb2852016-11-11 15:40:56 +0100156
157/* NVP node info */
158struct nwz_nvp_info_t
159{
160 const char *name; /* Sony's name: "bti" */
161 unsigned long size; /* Size in bytes */
162 const char *desc; /* Description: "bootloader image" */
163};
164
165/* NVP index map (nwz_nvp_node_t -> index) */
166typedef int nwz_nvp_index_t[NWZ_NVP_COUNT];
167
168/* Model info */
169struct nwz_model_info_t
170{
171 unsigned long mid; /* Model ID: first 4 bytes of the NVP mid entry */
172 const char *name; /* Human name: "NWZ-E463" */
173};
174
175/* Series info */
176struct nwz_series_info_t
177{
178 const char *codename; /* Rockbox codename: nwz-e460 */
179 const char *name; /* Human name: "NWZ-E460 Series" */
180 int mid_count; /* number of entries in mid_list */
181 unsigned long *mid; /* List of model IDs */
182 /* Pointer to a name -> index map, nonexistent entries map to NWZ_NVP_INVALID */
183 nwz_nvp_index_t *nvp_index;
184};
185
186/* List of all NVP entries, indexed by nwz_nvp_node_t */
187extern struct nwz_nvp_info_t nwz_nvp[NWZ_NVP_COUNT];
188/* List of all models, sorted by increasing values of model ID */
189extern struct nwz_model_info_t nwz_model[NWZ_MODEL_COUNT];
190/* List of all series */
191extern struct nwz_series_info_t nwz_series[NWZ_SERIES_COUNT];
192
193#endif /* __NWZ_DB_H__ */