1 // SPDX-License-Identifier: GPL-2.0+
9 char __data_save_start[0] __section(.__data_save_start);
10 char __data_save_end[0] __section(.__data_save_end);
12 u32 cold_reboot_flag = 1;
14 void spl_save_restore_data(void)
16 u32 data_size = __data_save_end - __data_save_start;
18 if (cold_reboot_flag == 1) {
19 /* Save data section to data_save section */
20 memcpy(__data_save_start, __data_save_start - data_size,
23 /* Restore the data_save section to data section */
24 memcpy(__data_save_start - data_size, __data_save_start,