u-boot/arch/m68k/include/asm/bootinfo.h
Kuan-Wei Chiu c69b6aeaa3 m68k: Add support for M68040 CPU
Add support for the Motorola 68040 architecture. Currently, m68k
support in U-Boot is primarily focused on ColdFire variants. Introduce
the necessary infrastructure to support the classic M680x0 series,
specifically targeting the M68040 as emulated by QEMU.

The implementation includes exception vectors, early startup code, and
minimal CPU initialization and relocation stubs. It also defines the
standard m68k boot information structure used for passing hardware
information to the operating system. To ensure compatibility, ColdFire-
specific library objects such as cache and interrupt handling are
excluded from the build when M68040 is selected.

Additionally, apply a specific workaround during the early memory
reservation stage. Use a manual loop to clear global data instead of
the standard memset() function, as utilizing memset() at this point was
observed to cause a hang on the QEMU platform.

Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Acked-by: Angelo Dureghello <angelo@kernel-space.org>
Reviewed-by: Simon Glass <simon.glass@canonical.com>
2026-02-02 14:24:41 -06:00

40 lines
1.0 KiB
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2025, Kuan-Wei Chiu <visitorckw@gmail.com>
*
* Definitions for the m68k bootinfo interface.
*/
#ifndef _ASM_M68K_BOOTINFO_H
#define _ASM_M68K_BOOTINFO_H
#ifndef __ASSEMBLY__
struct bi_record {
unsigned short tag; /* tag ID */
unsigned short size; /* size of record (in bytes) */
unsigned long data[0]; /* data */
};
#endif /* __ASSEMBLY__ */
/* Bootinfo Tag IDs */
#define BI_LAST 0x0000
#define BI_MACHTYPE 0x0001
#define BI_CPUTYPE 0x0002
#define BI_FPUTYPE 0x0003
#define BI_MMUTYPE 0x0004
#define BI_MEMCHUNK 0x0005
#define BI_RAMDISK 0x0006
#define BI_COMMAND_LINE 0x0007
/* QEMU virt specific tags */
#define BI_VIRT_QEMU_VERSION 0x8000
#define BI_VIRT_GF_PIC_BASE 0x8001
#define BI_VIRT_GF_RTC_BASE 0x8002
#define BI_VIRT_GF_TTY_BASE 0x8003
#define BI_VIRT_VIRTIO_BASE 0x8004
#define BI_VIRT_CTRL_BASE 0x8005
#endif /* _ASM_M68K_BOOTINFO_H */