2 * SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note
4 * Bootinfo tags from linux bootinfo.h and bootinfo-mac.h:
5 * This is an easily parsable and extendable structure containing all
6 * information to be passed from the bootstrap to the kernel
8 * This structure is copied right after the kernel by the bootstrap
12 #ifndef HW_M68K_BOOTINFO_H
13 #define HW_M68K_BOOTINFO_H
15 #define BOOTINFO0(base, id) \
19 stw_be_p(base, sizeof(struct bi_record)); \
23 #define BOOTINFO1(base, id, value) \
27 stw_be_p(base, sizeof(struct bi_record) + 4); \
29 stl_be_p(base, value); \
33 #define BOOTINFO2(base, id, value1, value2) \
37 stw_be_p(base, sizeof(struct bi_record) + 8); \
39 stl_be_p(base, value1); \
41 stl_be_p(base, value2); \
45 #define BOOTINFOSTR(base, id, string) \
50 (sizeof(struct bi_record) + strlen(string) + \
51 1 /* null termination */ + 3 /* padding */) & ~3); \
53 for (unsigned i_ = 0; string[i_]; i_++) { \
54 stb_p(base++, string[i_]); \
57 base = QEMU_ALIGN_PTR_UP(base, 4); \
60 #define BOOTINFODATA(base, id, data, len) \
65 (sizeof(struct bi_record) + len + \
66 2 /* length field */ + 3 /* padding */) & ~3); \
68 stw_be_p(base, len); \
70 for (unsigned i_ = 0; i_ < len; ++i_) { \
71 stb_p(base++, data[i_]); \
73 base = QEMU_ALIGN_PTR_UP(base, 4); \