common_library: gettid is multiple declaration in cl_error
[staging/basesystem.git] / video_in_hal / systemservice / rom_access_library / library / include / system_service / ss_sm_rom_access.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /**
18  * @file ss_sm_rom_access.h
19  * @brief This file provides API for get rom information from extension memory
20  */
21
22 /** @addtogroup BaseSystem
23  *  @{
24  */
25 /** @addtogroup system_service
26  *  @ingroup BaseSystem
27  *  @{
28  */
29 /** @addtogroup rom_access_library
30  *  @ingroup system_service
31  *  @{
32  */
33
34 #ifndef ROM_ACCESS_LIBRARY_LIBRARY_INCLUDE_SYSTEM_SERVICE_SS_SM_ROM_ACCESS_H_
35 #define ROM_ACCESS_LIBRARY_LIBRARY_INCLUDE_SYSTEM_SERVICE_SS_SM_ROM_ACCESS_H_
36
37 #include <native_service/frameworkunified_types.h>
38 #include <native_service/frameworkunified_framework_types.h>
39
40 #include "system_service/ss_sm_boot_access.h"
41
42 /**
43  * \~english boot mode information
44  */
45 typedef enum {
46   APPLICATION_MODE = 0,
47   PROGRAMMING_MODE
48 }EBOOT_MODE;
49
50 /**
51  * \~english active flash load information
52  */
53 typedef enum {
54   NEW_FLASHLOADER = 0,
55   OLD_FLASHLOADER
56 }EACTIVE_FLASHLOADER;
57
58 /**
59  * \~english user mode information
60  */
61 typedef enum {
62   USER_OFF = 0,
63   USER_ON
64 }EUSER_MODE;
65
66 /**
67  * \~english control mode information
68  */
69 typedef enum {
70   DISABLE_MODE = 0,
71   ENABLE_MODE
72 }ECONTROL_MODE;
73
74 /**
75  * \~english data reset mode information
76  */
77 typedef enum {
78   DATARESET_NONE = 0,
79   DATARESET_USER,
80   DATARESET_FACTORY
81 }EDATARESET_MODE;
82
83 /**
84  * \~english last illegal reset mode information
85  */
86 typedef enum {
87   LAST_ILGRESET_NORMAL = 0,
88   LAST_ILGRESET_NG
89 }ELASTILGRESET_MODE;
90
91 /**
92  * \~english Program update state information
93  */
94 typedef uint32_t EPROGUPDATE_STATE;
95
96 /**
97  * \~english next wakeup type
98  */
99 typedef enum {
100   NEXT_WAKEUP_TYPE_NONE = 0,
101   NEXT_WAKEUP_TYPE_COLD,
102   NEXT_WAKEUP_TYPE_HOT,
103 }ENEXT_WAKEUP_TYPE;
104
105 /**
106  * \~english DRAM backup state
107  */
108 typedef enum {
109   DRAM_BACKUP_STATE_OK = 0,
110   DRAM_BACKUP_STATE_NG
111 }DRAM_BACKUP_STATE;
112
113 /**
114  * \~english max length of rom product private
115  */
116 #define ROM_PRODUCT_PRIVATE_MAX 128
117
118 /**
119  * @class ROM_AccessIf
120  * \~english @brief ROM_AccessIf
121  * \~english @par   Brief Introduction
122  *        Class to provide the function of ROM AccessIf
123  *
124  */
125 class ROM_AccessIf {
126  private:
127   BOOT_AccessIf* m_pBoot;
128   static void*   g_m_plock;
129   static void*   g_m_bakup_map;
130   static bool    g_m_is_dram_valid;
131   LBM_NOR_t      m_nor;
132   bool           m_norIsDirty;
133
134   EFrameworkunifiedStatus LBA_Read(UI_32 offset, UI_32* buffer, UI_32 word_count);
135
136   EFrameworkunifiedStatus LBA_Write(UI_32 offset, UI_32 value);
137
138   EFrameworkunifiedStatus LBA_Write(UI_32 offset, UI_32* value, UI_32 size);
139
140   EFrameworkunifiedStatus GetDataResetMode_sub(EDATARESET_MODE* p_data_reset_mode);
141
142  public:
143 /**
144  * \ingroup ROM_AccessIf
145  * \~english @par Summary:
146  *       Obtain the access permission to SYS area (secondary storage area).
147  * \~english @param None
148  * \~english @retval None
149  * \~english @par Precondition:
150  *       - None
151  * \~english @par Change in the internal status:
152  *       - The change in the internal status does not occur by this API.
153  * \~english @par Conditions of processing failure
154  *       - None
155  * \~english @par Classification:
156  *       Public
157  * \~ english @par Type
158  *       None
159  * \~english @par Detail:
160  *       Obtain the access permission to SYS area. \n
161  *       When the access permission is locked, the API watis for Mutex until the access permission is released. \n
162  *       This API is assumed to be called by the SystemManager.
163  * \~english @see  ~ROM_AccessIf, CL_LockMap, CL_LockGet
164  */
165   ROM_AccessIf();
166
167 /**
168  * \ingroup ~ROM_AccessIf
169  * \~english @par Summary:
170  *       Release the access permission to SYS area (secondary storage area).
171  * \~english @param None
172  * \~english @retval None
173  * \~english @par Precondition:
174  *       - None
175  * \~english @par Change in the internal status:
176  *       - The change in the internal status does not occur by this API.
177  * \~english @par Conditions of processing failure
178  *       - None
179  * \~english @par Classification:
180  *       Public
181  * \~ english @par Type
182  *       None
183  * \~english @par Detail:
184  *       Release the access permission to SYS area.
185  * \~english @see  ROM_AccessIf, CL_LockRelease
186  */
187   ~ROM_AccessIf();
188
189 /**
190  * \ingroup Initialize
191  * \~english @par Summary:
192  *       Synchronize SYS area (secondary storage area) and the mirror data in DRAM
193  * \~english @param None
194  * \~english @retval eFrameworkunifiedStatusOK   Synchronization success
195  * \~english @retval eFrameworkunifiedStatusFail   Synchronization failed
196  * \~english @par Precondition:
197  *       - None
198  * \~english @par Change in the internal status:
199  *       - The change in the internal status does not occur by this API.
200  * \~english @par Conditions of processing failure
201  *       - If system call mmap failed. [eFrameworkunifiedStatusFail]
202  * \~english @par Classification:
203  *       Public
204  * \~ english @par Type
205  *       Sync only(None communication)
206  * \~english @par Detail:
207  *       Prepare the access to SYS area. \n
208  * \~english @see EL_mem_exram_mmap
209  */
210   EFrameworkunifiedStatus Initialize();
211
212 /**
213  * \ingroup SetProductPrivate
214  * \~english @par Summary:
215  *       Write data information depending on the product specification to the secondary storage area.
216  * \~english @param [in] buf[ROM_PRODUCT_PRIVATE_MAX]
217  *       UI_8[]  -  Data information depending on the product specification
218  * \~english @par
219  *   Definition of ROM_PRODUCT_PRIVATE_MAX
220  * \~english @code
221  *   #define ROM_PRODUCT_PRIVATE_MAX 128
222  *   @endcode
223  * \~english @retval eFrameworkunifiedStatusOK   Success
224  * \~english @retval eFrameworkunifiedStatusFail   Failed
225  * \~english @par Precondition:
226  *       - None
227  * \~english @par Change in the internal status:
228  *       - The change in the internal status does not occur by this API.
229  * \~english @par Conditions of processing failure
230  *       - If write data to secondary storage area failed [eFrameworkunifiedStatusFail]
231  * \~english @par Classification:
232  *       Public
233  * \~ english @par Type
234  *       Sync only(None communication)
235  * \~english @par Detail:
236  *       Write data information depending on the product specification to the secondary storage area. \n
237  * \~english @see  GetProductPrivate
238  */
239   EFrameworkunifiedStatus SetProductPrivate(UI_8 buf[ROM_PRODUCT_PRIVATE_MAX]);
240
241 /**
242  * \ingroup GetProductPrivate
243  * \~english @par Summary:
244  *       Read the data information depending on the product specification from the secondary storage area.
245  * \~english @param [out] buf[ROM_PRODUCT_PRIVATE_MAX]
246  *       UI_8[]  -  Storing destination of data information depending on the product specification
247  * \~english @par
248  *   Definition of ROM_PRODUCT_PRIVATE_MAX
249  * \~english @code
250  *   #define ROM_PRODUCT_PRIVATE_MAX 128
251  *   @endcode
252  * \~english @retval eFrameworkunifiedStatusOK   Success
253  * \~english @retval eFrameworkunifiedStatusFail   Failed
254  * \~english @par Precondition:
255  *       - None
256  * \~english @par Change in the internal status:
257  *       - The change in the internal status does not occur by this API.
258  * \~english @par Conditions of processing failure
259  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
260  * \~english @par Classification:
261  *       Public
262  * \~ english @par Type
263  *       Sync only(None communication)
264  * \~english @par Detail:
265  *       Read data information depending on the product specification from the secondary storage area. \n
266  * \~english @see   SetProductPrivate
267  */
268   EFrameworkunifiedStatus GetProductPrivate(UI_8 buf[ROM_PRODUCT_PRIVATE_MAX]);
269
270 /**
271  * \ingroup SystemInitialize
272  * \~english @par Summary:
273  *       Initialize the handles used for ROM access.
274  * \~english @param [in] bkup_state
275  * \~english @par
276  *       DRAM_BACKUP_STATE
277  *       - DRAM_BACKUP_STATE_OK
278  *       - DRAM_BACKUP_STATE_NG
279  * \~english @retval eFrameworkunifiedStatusOK   Initialize the handles used for ROM access success
280  * \~english @retval eFrameworkunifiedStatusFail   Initialize the handles used for ROM access failed
281  * \~english @par Precondition:
282  *       - None
283  * \~english @par Change in the internal status:
284  *       - The change in the internal status does not occur by this API.
285  * \~english @par Conditions of processing failure
286  *       - If system call mmap failed. [eFrameworkunifiedStatusFail]
287  * \~english @par Classification:
288  *       Public
289  * \~ english @par Type
290  *       Sync only(None communication)
291  * \~english @par Detail:
292  *       Initialize the handles used for ROM access. \n
293  * \~english @see EL_mem_exram_mmap
294  */
295   EFrameworkunifiedStatus SystemInitialize(DRAM_BACKUP_STATE bkup_state);
296
297 /**
298  * \ingroup GetBootMode
299  * \~english @par Summary:
300  *       Get boot mode information.
301  * \~english @param [out] p_boot_mode
302  *       EBOOT_MODE*  -  Destination buffer to store information of boot mode.
303  * \~english @par
304  *       EBOOT_MODE
305  *       - APPLICATION_MODE
306  *       - PROGRAMMING_MODE
307  * \~english @retval eFrameworkunifiedStatusOK   Success
308  * \~english @retval eFrameworkunifiedStatusFail   Failed
309  * \~english @par Precondition:
310  *       - None
311  * \~english @par Change in the internal status:
312  *       - The change in the internal status does not occur by this API.
313  * \~english @par Conditions of processing failure
314  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
315  * \~english @par Classification:
316  *       Public
317  * \~ english @par Type
318  *       Sync only(None communication)
319  * \~english @par Detail:
320  *       Get boot mode information from the secondary storage area. \n
321  * \~english @see   SetBootMode
322  */
323   EFrameworkunifiedStatus GetBootMode(EBOOT_MODE* p_boot_mode);
324
325 /**
326  * \ingroup SetBootMode
327  * \~english @par Summary:
328  *       Set boot mode information.
329  * \~english @param [in] boot_mode
330  *       EBOOT_MODE  -  Boot mode information which write to the secondary storage area.
331  * \~english @par
332  *       EBOOT_MODE
333  *       - APPLICATION_MODE
334  *       - PROGRAMMING_MODE
335  * \~english @retval eFrameworkunifiedStatusOK   Success
336  * \~english @retval eFrameworkunifiedStatusFail   Failed
337  * \~english @par Precondition:
338  *       - None
339  * \~english @par Change in the internal status:
340  *       - The change in the internal status does not occur by this API.
341  * \~english @par Conditions of processing failure
342  *       - If write data to secondary storage area failed [eFrameworkunifiedStatusFail]
343  * \~english @par Classification:
344  *       Public
345  * \~ english @par Type
346  *       Sync only(None communication)
347  * \~english @par Detail:
348  *       Set boot mode information to the secondary storage area. \n
349  * \~english @see   GetBootMode
350  */
351   EFrameworkunifiedStatus SetBootMode(EBOOT_MODE boot_mode);
352
353 /**
354  * \ingroup GetSignature
355  * \~english @par Summary:
356  *       Get signature information.
357  * \~english @param [out] p_sig_value
358  *       UI_32  -  Destination buffer to store signature information
359  * \~english @retval eFrameworkunifiedStatusOK   Success
360  * \~english @retval eFrameworkunifiedStatusFail   Failed
361  * \~english @par Precondition:
362  *       - None
363  * \~english @par Change in the internal status:
364  *       - The change in the internal status does not occur by this API.
365  * \~english @par Conditions of processing failure
366  *       - If write signature information to secondary storage area failed [eFrameworkunifiedStatusFail]
367  * \~english @par Classification:
368  *       Public
369  * \~ english @par Type
370  *       Sync only(None communication)
371  * \~english @par Detail:
372  *       Get signature information from the secondary storage area. \n
373  * \~english @see  SetSignature
374  */
375   EFrameworkunifiedStatus GetSignature(UI_32* p_sig_value);
376
377 /**
378  * \ingroup SetSignature
379  * \~english @par Summary:
380  *       Set signature information.
381  * \~english @param [in] sig_value
382  *       UI_32  -  Signature information which write to the secondary storage area.
383  * \~english @retval eFrameworkunifiedStatusOK   Success
384  * \~english @retval eFrameworkunifiedStatusFail   Failed
385  * \~english @par Precondition:
386  *       - None
387  * \~english @par Change in the internal status:
388  *       - The change in the internal status does not occur by this API.
389  * \~english @par Conditions of processing failure
390  *       - If write signature information to secondary storage area failed [eFrameworkunifiedStatusFail]
391  * \~english @par Classification:
392  *       Public
393  * \~ english @par Type
394  *       Sync only(None communication)
395  * \~english @par Detail:
396  *       Set signature information to the secondary storage area. \n
397  * \~english @see  GetSignature
398  */
399   EFrameworkunifiedStatus SetSignature(UI_32 sig_value);
400
401 /**
402  * \ingroup SetActiveFlashloader
403  * \~english @par Summary:
404  *       Set active flash loader information.
405  * \~english @param [in] active_flash_loader
406  *       EACTIVE_FLASHLOADER  -  Active flash loader information which write to secondary storage area.
407  * \~english @par
408  *       EBOOT_MODE
409  *       - APPLICATION_MODE
410  *       - PROGRAMMING_MODE
411  * \~english @retval eFrameworkunifiedStatusOK   Success
412  * \~english @retval eFrameworkunifiedStatusFail   Failed
413  * \~english @par Precondition:
414  *       - None
415  * \~english @par Change in the internal status:
416  *       - The change in the internal status does not occur by this API.
417  * \~english @par Conditions of processing failure
418  *       - If write data to secondary storage area failed [eFrameworkunifiedStatusFail]
419  * \~english @par Classification:
420  *       Public
421  * \~ english @par Type
422  *       Sync only(None communication)
423  * \~english @par Detail:
424  *       Set active flash loader information to the secondary storage area. \n
425  * \~english @see   GetBootMode
426  */
427   EFrameworkunifiedStatus SetActiveFlashloader(EACTIVE_FLASHLOADER active_flash_loader);
428
429 /**
430  * \ingroup GetLastUserMode
431  * \~english @par Summary:
432  *       Get last user mode information.
433  * \~english @param [out] p_user_mode
434  *       EUSER_MODE*  -  Destination buffer to store information of user mode.
435  * \~english @par
436  *       EUSER_MODE
437  *       - USER_ON
438  *       - USER_OFF
439  * \~english @retval eFrameworkunifiedStatusOK   Success
440  * \~english @retval eFrameworkunifiedStatusFail   Failed
441  * \~english @par Precondition:
442  *       - None
443  * \~english @par Change in the internal status:
444  *       - The change in the internal status does not occur by this API.
445  * \~english @par Conditions of processing failure
446  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
447  * \~english @par Classification:
448  *       Public
449  * \~ english @par Type
450  *       Sync only(None communication)
451  * \~english @par Detail:
452  *       Get last user mode information from the secondary storage area. \n
453  * \~english @see   SetLastUserMode
454  */
455   EFrameworkunifiedStatus GetLastUserMode(EUSER_MODE* p_user_mode);
456
457 /**
458  * \ingroup SetLastUserMode
459  * \~english @par Summary:
460  *       Set last user mode information.
461  * \~english @param [in] user_mode
462  *       EUSER_MODE  -  User mode information which write to the secondary storage area.
463  * \~english @par
464  *       EUSER_MODE
465  *       - USER_ON
466  *       - USER_OFF
467  * \~english @retval eFrameworkunifiedStatusOK   Success
468  * \~english @retval eFrameworkunifiedStatusFail   Failed
469  * \~english @par Precondition:
470  *       - None
471  * \~english @par Change in the internal status:
472  *       - The change in the internal status does not occur by this API.
473  * \~english @par Conditions of processing failure
474  *       - If write data to secondary storage area failed [eFrameworkunifiedStatusFail]
475  * \~english @par Classification:
476  *       Public
477  * \~ english @par Type
478  *       Sync only(None communication)
479  * \~english @par Detail:
480  *       Set last user mode information to the secondary storage area. \n
481  * \~english @see   GetLastUserMode
482  */
483   EFrameworkunifiedStatus SetLastUserMode(EUSER_MODE user_mode);
484
485 /**
486  * \ingroup GetTransportMode
487  * \~english @par Summary:
488  *       Get transport mode information.
489  * \~english @param [out] p_control_mode
490  *       ECONTROL_MODE*  -  Destination buffer to store information of transport mode.
491  * \~english @par
492  *       ECONTROL_MODE
493  *       - DISABLE_MODE
494  *       - ENABLE_MODE
495  * \~english @retval eFrameworkunifiedStatusOK   Success
496  * \~english @retval eFrameworkunifiedStatusFail   Failed
497  * \~english @par Precondition:
498  *       - None
499  * \~english @par Change in the internal status:
500  *       - The change in the internal status does not occur by this API.
501  * \~english @par Conditions of processing failure
502  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
503  * \~english @par Classification:
504  *       Public
505  * \~ english @par Type
506  *       Sync only(None communication)
507  * \~english @par Detail:
508  *       Get transport mode information from the secondary storage area. \n
509  * \~english @see   SetTransportMode
510  */
511   EFrameworkunifiedStatus GetTransportMode(ECONTROL_MODE* p_control_mode);
512
513 /**
514  * \ingroup SetTransportMode
515  * \~english @par Summary:
516  *       Set transport mode information.
517  * \~english @param [in] control_mode
518  *       ECONTROL_MODE  -  Transport mode information which write to the secondary storage area.
519  * \~english @par
520  *       ECONTROL_MODE
521  *       - DISABLE_MODE
522  *       - ENABLE_MODE
523  * \~english @retval eFrameworkunifiedStatusOK   Success
524  * \~english @retval eFrameworkunifiedStatusFail   Failed
525  * \~english @par Precondition:
526  *       - None
527  * \~english @par Change in the internal status:
528  *       - The change in the internal status does not occur by this API.
529  * \~english @par Conditions of processing failure
530  *       - If write data to secondary storage area failed [eFrameworkunifiedStatusFail]
531  * \~english @par Classification:
532  *       Public
533  * \~ english @par Type
534  *       Sync only(None communication)
535  * \~english @par Detail:
536  *       Set transport mode information to the secondary storage area. \n
537  * \~english @see   GetTransportMode
538  */
539   EFrameworkunifiedStatus SetTransportMode(ECONTROL_MODE control_mode);
540
541 /**
542  * \ingroup GetProductionMode
543  * \~english @par Summary:
544  *       Get production mode information.
545  * \~english @param [out] p_control_mode
546  *       ECONTROL_MODE*  -  Destination buffer to store information of production mode.
547  * \~english @par
548  *       ECONTROL_MODE
549  *       - DISABLE_MODE
550  *       - ENABLE_MODE
551  * \~english @retval eFrameworkunifiedStatusOK   Success
552  * \~english @retval eFrameworkunifiedStatusFail   Failed
553  * \~english @par Precondition:
554  *       - None
555  * \~english @par Change in the internal status:
556  *       - The change in the internal status does not occur by this API.
557  * \~english @par Conditions of processing failure
558  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
559  * \~english @par Classification:
560  *       Public
561  * \~ english @par Type
562  *       Sync only(None communication)
563  * \~english @par Detail:
564  *       Get production mode information from the secondary storage area. \n
565  * \~english @see   SetProductionMode
566  */
567   EFrameworkunifiedStatus GetProductionMode(ECONTROL_MODE* p_control_mode);
568
569 /**
570  * \ingroup SetProductionMode
571  * \~english @par Summary:
572  *       Set transport mode information.
573  * \~english @param [in] control_mode
574  *       ECONTROL_MODE  -  Production mode information which write to the secondary storage area.
575  * \~english @par
576  *       ECONTROL_MODE
577  *       - DISABLE_MODE
578  *       - ENABLE_MODE
579  * \~english @retval eFrameworkunifiedStatusOK   Success
580  * \~english @retval eFrameworkunifiedStatusFail   Failed
581  * \~english @par Precondition:
582  *       - None
583  * \~english @par Change in the internal status:
584  *       - The change in the internal status does not occur by this API.
585  * \~english @par Conditions of processing failure
586  *       - If write data to secondary storage area failed [eFrameworkunifiedStatusFail]
587  * \~english @par Classification:
588  *       Public
589  * \~ english @par Type
590  *       Sync only(None communication)
591  * \~english @par Detail:
592  *       Set production mode information to the secondary storage area. \n
593  * \~english @see   GetProductionMode
594  */
595   EFrameworkunifiedStatus SetProductionMode(ECONTROL_MODE control_mode);
596
597 /**
598  * \ingroup GetLimpHomeCutOffReqMode
599  * \~english @par Summary:
600  *       Get limp home cut off request mode information.
601  * \~english @param [out] p_control_mode
602  *       ECONTROL_MODE*  -  Destination buffer to store information of limp home cut off request mode.
603  * \~english @par
604  *       ECONTROL_MODE
605  *       - DISABLE_MODE
606  *       - ENABLE_MODE
607  * \~english @retval eFrameworkunifiedStatusOK   Success
608  * \~english @retval eFrameworkunifiedStatusFail   Failed
609  * \~english @par Precondition:
610  *       - None
611  * \~english @par Change in the internal status:
612  *       - The change in the internal status does not occur by this API.
613  * \~english @par Conditions of processing failure
614  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
615  * \~english @par Classification:
616  *       Public
617  * \~ english @par Type
618  *       Sync only(None communication)
619  * \~english @par Detail:
620  *       Get limp home cut off request mode information from the secondary storage area. \n
621  * \~english @see   SetLimpHomeCutOffReqMode
622  */
623   EFrameworkunifiedStatus GetLimpHomeCutOffReqMode(ECONTROL_MODE* p_control_mode);
624
625 /**
626  * \ingroup SetLimpHomeCutOffReqMode
627  * \~english @par Summary:
628  *       Set limp home cut off request mode information.
629  * \~english @param [in] control_mode
630  *       ECONTROL_MODE  -  Limp home cut off request mode information which write to the secondary storage area.
631  * \~english @par
632  *       ECONTROL_MODE
633  *       - DISABLE_MODE
634  *       - ENABLE_MODE
635  * \~english @retval eFrameworkunifiedStatusOK   Success
636  * \~english @retval eFrameworkunifiedStatusFail   Failed
637  * \~english @par Precondition:
638  *       - None
639  * \~english @par Change in the internal status:
640  *       - The change in the internal status does not occur by this API.
641  * \~english @par Conditions of processing failure
642  *       - If write data to secondary storage area failed [eFrameworkunifiedStatusFail]
643  * \~english @par Classification:
644  *       Public
645  * \~ english @par Type
646  *       Sync only(None communication)
647  * \~english @par Detail:
648  *       Set limp home cut off request mode information to the secondary storage area. \n
649  * \~english @see   GetLimpHomeCutOffReqMode
650  */
651   EFrameworkunifiedStatus SetLimpHomeCutOffReqMode(ECONTROL_MODE control_mode);
652
653 /**
654  * \ingroup GetDataResetMode
655  * \~english @par Summary:
656  *       Get reserved data reset mode information.
657  * \~english @param [out] p_data_reset_mode
658  *       EDATARESET_MODE*  -  Destination buffer to store information of reserved data reset mode.
659  * \~english @par
660  *       EDATARESET_MODE
661  *       - DATARESET_NONE
662  *       - DATARESET_USER
663  *       - DATARESET_FACTORY
664  * \~english @retval eFrameworkunifiedStatusOK   Success
665  * \~english @retval eFrameworkunifiedStatusFail   Failed
666  * \~english @par Precondition:
667  *       - None
668  * \~english @par Change in the internal status:
669  *       - The change in the internal status does not occur by this API.
670  * \~english @par Conditions of processing failure
671  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
672  * \~english @par Classification:
673  *       Public
674  * \~ english @par Type
675  *       Sync only(None communication)
676  * \~english @par Detail:
677  *       Get reserved data reset mode information from the secondary storage area. \n
678  * \~english @see   SetDataResetMode
679  */
680   EFrameworkunifiedStatus GetDataResetMode(EDATARESET_MODE* p_data_reset_mode);
681
682 /**
683  * \ingroup GetDataResetModeFast
684  * \~english @par Summary:
685  *       Get reserved data reset mode information faster.This api can get correct value before
686  *       calling SetDataResetMode.So it shoud be used only immediately after boot.
687  * \~english @param [out] p_data_reset_mode
688  *       EDATARESET_MODE*  -  Destination buffer to store information of reserved data reset mode faster.
689  * \~english @par
690  *       EDATARESET_MODE
691  *       - DATARESET_NONE
692  *       - DATARESET_USER
693  *       - DATARESET_FACTORY
694  * \~english @retval eFrameworkunifiedStatusOK   Success
695  * \~english @retval eFrameworkunifiedStatusFail   Failed
696  * \~english @par Precondition:
697  *       - None
698  * \~english @par Change in the internal status:
699  *       - The change in the internal status does not occur by this API.
700  * \~english @par Conditions of processing failure
701  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
702  *       - If system call mmap failed. [eFrameworkunifiedStatusFail]
703  * \~english @par Classification:
704  *       Public
705  * \~ english @par Type
706  *       Sync only(None communication)
707  * \~english @par Detail:
708  *       Get reserved data reset mode information faster from the secondary storage area.This api can get
709  *       correct value before calling SetDataResetMode.So it shoud be used only immediately after boot.
710  * \~english @see   SetDataResetMode
711  */
712   EFrameworkunifiedStatus GetDataResetModeFast(EDATARESET_MODE* p_data_reset_mode);
713
714 /**
715  * \ingroup SetDataResetMode
716  * \~english @par Summary:
717  *       Set reserve data reset mode information.
718  * \~english @param [in] data_reset_mode
719  *       EDATARESET_MODE  -  Reserve data reset mode information which write to the secondary storage area.
720  * \~english @par
721  *       EDATARESET_MODE
722  *       - DATARESET_NONE
723  *       - DATARESET_USER
724  *       - DATARESET_FACTORY
725  * \~english @retval eFrameworkunifiedStatusOK   Success
726  * \~english @retval eFrameworkunifiedStatusFail   Failed
727  * \~english @par Precondition:
728  *       - None
729  * \~english @par Change in the internal status:
730  *       - The change in the internal status does not occur by this API.
731  * \~english @par Conditions of processing failure
732  *       - If write data to secondary storage area failed [eFrameworkunifiedStatusFail]
733  * \~english @par Classification:
734  *       Public
735  * \~ english @par Type
736  *       Sync only(None communication)
737  * \~english @par Detail:
738  *       Set reserve data reset mode information to the secondary storage area. \n
739  * \~english @see   GetDataResetMode
740  */
741   EFrameworkunifiedStatus SetDataResetMode(EDATARESET_MODE data_reset_mode);
742
743 /**
744  * \ingroup GetResetCount
745  * \~english @par Summary:
746  *       Get reset count information.
747  * \~english @param [out] p_reset_count
748  *       UI_32*  -  Destination buffer to store information of reset count.
749  * \~english @retval eFrameworkunifiedStatusOK   Success
750  * \~english @retval eFrameworkunifiedStatusFail   Failed
751  * \~english @par Precondition:
752  *       - None
753  * \~english @par Change in the internal status:
754  *       - The change in the internal status does not occur by this API.
755  * \~english @par Conditions of processing failure
756  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
757  * \~english @par Classification:
758  *       Public
759  * \~ english @par Type
760  *       Sync only(None communication)
761  * \~english @par Detail:
762  *       Get reset count from the secondary storage area. \n
763  * \~english @see   SetResetCount
764  */
765   EFrameworkunifiedStatus GetResetCount(UI_32* p_reset_count);
766
767 /**
768  * \ingroup SetResetCount
769  * \~english @par Summary:
770  *       Set reset count information.
771  * \~english @param [in] reset_count
772  *       UI_32  -  Reset count information which write to the secondary storage area.
773  * \~english @retval eFrameworkunifiedStatusOK   Success
774  * \~english @retval eFrameworkunifiedStatusFail   Failed
775  * \~english @par Precondition:
776  *       - None
777  * \~english @par Change in the internal status:
778  *       - The change in the internal status does not occur by this API.
779  * \~english @par Conditions of processing failure
780  *       - If write data to secondary storage area failed [eFrameworkunifiedStatusFail]
781  * \~english @par Classification:
782  *       Public
783  * \~ english @par Type
784  *       Sync only(None communication)
785  * \~english @par Detail:
786  *       Set reset count information to the secondary storage area. \n
787  * \~english @see   GetResetCount
788  */
789   EFrameworkunifiedStatus SetResetCount(UI_32 reset_count);
790
791 /**
792  * \ingroup GetLastIlgReset
793  * \~english @par Summary:
794  *       Get last illegal reset information.
795  * \~english @param [out] p_last_ilg_reset
796  *       ELASTILGRESET_MODE*  -  Destination buffer to store information of last illegal reset.
797  * \~english @par
798  *       ELASTILGRESET_MODE
799  *       - LAST_ILGRESET_NORMAL
800  *       - LAST_ILGRESET_NG
801  * \~english @retval eFrameworkunifiedStatusOK   Success
802  * \~english @retval eFrameworkunifiedStatusFail   Failed
803  * \~english @par Precondition:
804  *       - None
805  * \~english @par Change in the internal status:
806  *       - The change in the internal status does not occur by this API.
807  * \~english @par Conditions of processing failure
808  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
809  * \~english @par Classification:
810  *       Public
811  * \~ english @par Type
812  *       Sync only(None communication)
813  * \~english @par Detail:
814  *       Get last illegal reset information from the secondary storage area. \n
815  * \~english @see   SetLastIlgReset
816  */
817   EFrameworkunifiedStatus GetLastIlgReset(ELASTILGRESET_MODE* p_last_ilg_reset);
818
819 /**
820  * \ingroup SetLastIlgReset
821  * \~english @par Summary:
822  *       Set last illegal reset information.
823  * \~english @param [in] last_ilg_reset
824  *       ELASTILGRESET_MODE  -  Last illegal reset information which write to the secondary storage area.
825  * \~english @par
826  *       ELASTILGRESET_MODE
827  *       - LAST_ILGRESET_NORMAL
828  *       - LAST_ILGRESET_NG
829  * \~english @retval eFrameworkunifiedStatusOK   Success
830  * \~english @retval eFrameworkunifiedStatusFail   Failed
831  * \~english @par Precondition:
832  *       - None
833  * \~english @par Change in the internal status:
834  *       - The change in the internal status does not occur by this API.
835  * \~english @par Conditions of processing failure
836  *       - If write data to secondary storage area failed [eFrameworkunifiedStatusFail]
837  * \~english @par Classification:
838  *       Public
839  * \~ english @par Type
840  *       Sync only(None communication)
841  * \~english @par Detail:
842  *       Set last illegal reset information to the secondary storage area. \n
843  * \~english @see   GetLastIlgReset
844  */
845   EFrameworkunifiedStatus SetLastIlgReset(ELASTILGRESET_MODE last_ilg_reset);
846
847 /**
848  * \ingroup GetProgUpdateState
849  * \~english @par Summary:
850  *       Get program update status information.
851  * \~english @param [out] p_prog_update_state
852  *       EPROGUPDATE_STATE*  -  Destination buffer to store information of program update status.
853  * \~english @par
854  *       typedef uint32_t EPROGUPDATE_STATE
855  * \~english @retval eFrameworkunifiedStatusOK   Success
856  * \~english @retval eFrameworkunifiedStatusFail   Failed
857  * \~english @par Precondition:
858  *       - None
859  * \~english @par Change in the internal status:
860  *       - The change in the internal status does not occur by this API.
861  * \~english @par Conditions of processing failure
862  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
863  * \~english @par Classification:
864  *       Public
865  * \~ english @par Type
866  *       Sync only(None communication)
867  * \~english @par Detail:
868  *       Get program update status information from the secondary storage area. \n
869  * \~english @see   SetProgUpdateState
870  */
871   EFrameworkunifiedStatus GetProgUpdateState(EPROGUPDATE_STATE* p_prog_update_state);
872
873 /**
874  * \ingroup SetProgUpdateState
875  * \~english @par Summary:
876  *       Set program update status information.
877  * \~english @param [in] prog_update_state
878  *       EPROGUPDATE_STATE  -  Program update status information which write to the secondary storage area.
879  * \~english @par
880  *      typedef uint32_t EPROGUPDATE_STATE
881  * \~english @retval eFrameworkunifiedStatusOK   Success
882  * \~english @retval eFrameworkunifiedStatusFail   Failed
883  * \~english @par Precondition:
884  *       - None
885  * \~english @par Change in the internal status:
886  *       - The change in the internal status does not occur by this API.
887  * \~english @par Conditions of processing failure
888  *       - If write data to secondary storage area failed [eFrameworkunifiedStatusFail]
889  * \~english @par Classification:
890  *       Public
891  * \~ english @par Type
892  *       Sync only(None communication)
893  * \~english @par Detail:
894  *       Set program update status information to the secondary storage area. \n
895  * \~english @see   GetProgUpdateState
896  */
897   EFrameworkunifiedStatus SetProgUpdateState(EPROGUPDATE_STATE prog_update_state);
898
899 /**
900  * \ingroup GetErrLogCount
901  * \~english @par Summary:
902  *       Get error logging count information.
903  * \~english @param [out] p_err_log_count
904  *       UI_32*  -  Destination buffer to store information of error logging count.
905  * \~english @retval eFrameworkunifiedStatusOK   Success
906  * \~english @retval eFrameworkunifiedStatusFail   Failed
907  * \~english @par Precondition:
908  *       - None
909  * \~english @par Change in the internal status:
910  *       - The change in the internal status does not occur by this API.
911  * \~english @par Conditions of processing failure
912  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
913  * \~english @par Classification:
914  *       Public
915  * \~ english @par Type
916  *       Sync only(None communication)
917  * \~english @par Detail:
918  *       Get error logging count information from the secondary storage area. \n
919  * \~english @see   SetErrLogCount
920  */
921   EFrameworkunifiedStatus GetErrLogCount(UI_32* p_err_log_count);
922
923 /**
924  * \ingroup SetErrLogCount
925  * \~english @par Summary:
926  *       Get error logging count information.
927  * \~english @param [out] err_log_count
928  *       UI_32*  -  Destination buffer to store information of error logging count.
929  * \~english @retval eFrameworkunifiedStatusOK   Success
930  * \~english @retval eFrameworkunifiedStatusFail   Failed
931  * \~english @par Precondition:
932  *       - None
933  * \~english @par Change in the internal status:
934  *       - The change in the internal status does not occur by this API.
935  * \~english @par Conditions of processing failure
936  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
937  * \~english @par Classification:
938  *       Public
939  * \~ english @par Type
940  *       Sync only(None communication)
941  * \~english @par Detail:
942  *       Get error logging count information from the secondary storage area. \n
943  * \~english @see   GetErrLogCount
944  */
945   EFrameworkunifiedStatus SetErrLogCount(UI_32 err_log_count);
946
947 /**
948  * \ingroup GetNextWakeupType
949  * \~english @par Summary:
950  *       Get next wakeup type information.
951  * \~english @param [out] p_next_wakeup_type
952  *       ENEXT_WAKEUP_TYPE*  -  Destination buffer to store information of next wakeup type.
953  * \~english @par
954  *       ENEXT_WAKEUP_TYPE
955  *       - NEXT_WAKEUP_TYPE_NONE
956  *       - NEXT_WAKEUP_TYPE_COLD
957  *       - NEXT_WAKEUP_TYPE_HOT
958  * \~english @retval eFrameworkunifiedStatusOK   Success
959  * \~english @retval eFrameworkunifiedStatusFail   Failed
960  * \~english @par Precondition:
961  *       - None
962  * \~english @par Change in the internal status:
963  *       - The change in the internal status does not occur by this API.
964  * \~english @par Conditions of processing failure
965  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
966  * \~english @par Classification:
967  *       Public
968  * \~ english @par Type
969  *       Sync only(None communication)
970  * \~english @par Detail:
971  *       Get next wakeup type information from the secondary storage area. \n
972  * \~english @see   SetNextWakeupType
973  */
974   EFrameworkunifiedStatus GetNextWakeupType(ENEXT_WAKEUP_TYPE *p_next_wakeup_type);
975
976 /**
977  * \ingroup SetNextWakeupType
978  * \~english @par Summary:
979  *       Get next wakeup type information.
980  * \~english @param [out] next_wakeup_type
981  *       ENEXT_WAKEUP_TYPE*  -  Destination buffer to store information of next wakeup type.
982  * \~english @par
983  *       ENEXT_WAKEUP_TYPE
984  *       - NEXT_WAKEUP_TYPE_NONE
985  *       - NEXT_WAKEUP_TYPE_COLD
986  *       - NEXT_WAKEUP_TYPE_HOT
987  * \~english @retval eFrameworkunifiedStatusOK   Success
988  * \~english @retval eFrameworkunifiedStatusFail   Failed
989  * \~english @par Precondition:
990  *       - None
991  * \~english @par Change in the internal status:
992  *       - The change in the internal status does not occur by this API.
993  * \~english @par Conditions of processing failure
994  *       - If read data from secondary storage area failed [eFrameworkunifiedStatusFail]
995  * \~english @par Classification:
996  *       Public
997  * \~ english @par Type
998  *       Sync only(None communication)
999  * \~english @par Detail:
1000  *       Get next wakeup type information from the secondary storage area. \n
1001  * \~english @see   GetNextWakeupType
1002  */
1003   EFrameworkunifiedStatus SetNextWakeupType(ENEXT_WAKEUP_TYPE next_wakeup_type);
1004 };
1005
1006 #endif  // ROM_ACCESS_LIBRARY_LIBRARY_INCLUDE_SYSTEM_SERVICE_SS_SM_ROM_ACCESS_H_
1007
1008 /** @}*/  // end of rom_access_library
1009 /** @}*/  // end of system_service
1010 /** @}*/  // end of BaseSystem