18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#include <asm/page.h> 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci/* 58c2ecf20Sopenharmony_ci * .boot.data section is shared between the decompressor code and the 68c2ecf20Sopenharmony_ci * decompressed kernel. The decompressor will store values in it, and copy 78c2ecf20Sopenharmony_ci * over to the decompressed image before starting it. 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * .boot.data variables are kept in separate .boot.data.<var name> sections, 108c2ecf20Sopenharmony_ci * which are sorted by alignment first, then by name before being merged 118c2ecf20Sopenharmony_ci * into single .boot.data section. This way big holes cased by page aligned 128c2ecf20Sopenharmony_ci * structs are avoided and linker produces consistent result. 138c2ecf20Sopenharmony_ci */ 148c2ecf20Sopenharmony_ci#define BOOT_DATA \ 158c2ecf20Sopenharmony_ci . = ALIGN(PAGE_SIZE); \ 168c2ecf20Sopenharmony_ci .boot.data : { \ 178c2ecf20Sopenharmony_ci __boot_data_start = .; \ 188c2ecf20Sopenharmony_ci *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.boot.data*))) \ 198c2ecf20Sopenharmony_ci __boot_data_end = .; \ 208c2ecf20Sopenharmony_ci } 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci/* 238c2ecf20Sopenharmony_ci * .boot.preserved.data is similar to .boot.data, but it is not part of the 248c2ecf20Sopenharmony_ci * .init section and thus will be preserved for later use in the decompressed 258c2ecf20Sopenharmony_ci * kernel. 268c2ecf20Sopenharmony_ci */ 278c2ecf20Sopenharmony_ci#define BOOT_DATA_PRESERVED \ 288c2ecf20Sopenharmony_ci . = ALIGN(PAGE_SIZE); \ 298c2ecf20Sopenharmony_ci .boot.preserved.data : { \ 308c2ecf20Sopenharmony_ci __boot_data_preserved_start = .; \ 318c2ecf20Sopenharmony_ci *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.boot.preserved.data*))) \ 328c2ecf20Sopenharmony_ci __boot_data_preserved_end = .; \ 338c2ecf20Sopenharmony_ci } 34