2 * SPDX-License-Identifier: GPL-2.0 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_p(base, sizeof(struct bi_record)); \
23 #define BOOTINFO1(base, id, value) \
27 stw_p(base, sizeof(struct bi_record) + 4); \
33 #define BOOTINFO2(base, id, value1, value2) \
37 stw_p(base, sizeof(struct bi_record) + 8); \
39 stl_p(base, value1); \
41 stl_p(base, value2); \
45 #define BOOTINFOSTR(base, id, string) \
51 (sizeof(struct bi_record) + strlen(string) + \
52 1 /* null termination */ + 3 /* padding */) & ~3); \
54 for (i = 0; string[i]; i++) { \
55 stb_p(base++, string[i]); \
58 base = QEMU_ALIGN_PTR_UP(base, 4); \
61 #define BOOTINFODATA(base, id, data, len) \
67 (sizeof(struct bi_record) + len + \
68 2 /* length field */ + 3 /* padding */) & ~3); \
72 for (i = 0; i < len; ++i) { \
73 stb_p(base++, data[i]); \
75 base = QEMU_ALIGN_PTR_UP(base, 4); \