Commit 0ed2e2d8 authored by Tom Rini's avatar Tom Rini

Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86

- QEMU build warning fix when CONFIG_DISTRO_DEFAULTS=n
- Small fixes on x86 reST docs
- Allow CBFS to be used in SPL
- Remove x86 specific GD flags
parents 81fed78c d117f917
......@@ -73,9 +73,6 @@ static void board_final_cleanup(void)
int last_stage_init(void)
{
if (gd->flags & GD_FLG_COLD_BOOT)
timestamp_add_to_bootstage();
/* start usb so that usb keyboard can be used as input device */
if (CONFIG_IS_ENABLED(USB_KEYBOARD))
usb_init();
......
......@@ -40,9 +40,6 @@ _x86boot_start:
movl %eax, %cr0
wbinvd
/* Tell 32-bit code it is being entered from an in-RAM copy */
movl $GD_FLG_WARM_BOOT, %ebx
/*
* Zero the BIST (Built-In Self Test) value since we don't have it.
* It must be 0 or the previous loader would have reported an error.
......@@ -55,11 +52,7 @@ _x86boot_start:
.align 4
.long 0x12345678
_start:
/*
* This is the 32-bit cold-reset entry point, coming from start16.
* Set %ebx to GD_FLG_COLD_BOOT to indicate this.
*/
movl $GD_FLG_COLD_BOOT, %ebx
/* This is the 32-bit cold-reset entry point, coming from start16 */
/* Save BIST */
movl %eax, %ebp
......
......@@ -23,9 +23,6 @@ start16:
/* Save BIST */
movl %eax, %ecx
/* Set the Cold Boot / Hard Reset flag */
movl $GD_FLG_COLD_BOOT, %ebx
xorl %eax, %eax
movl %eax, %cr3 /* Invalidate TLB */
......
......@@ -137,10 +137,4 @@ static inline __attribute__((no_instrument_function)) gd_t *get_fs_gd_ptr(void)
#endif
/*
* Our private Global Data Flags
*/
#define GD_FLG_COLD_BOOT 0x10000 /* Cold Boot */
#define GD_FLG_WARM_BOOT 0x20000 /* Warm Boot */
#endif /* __ASM_GBL_DATA_H */
......@@ -29,7 +29,7 @@ static int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc,
}
}
file_cbfs_init(end_of_rom);
if (file_cbfs_result != CBFS_SUCCESS) {
if (cbfs_get_result() != CBFS_SUCCESS) {
printf("%s.\n", file_cbfs_error());
return 1;
}
......@@ -67,7 +67,7 @@ static int do_cbfs_fsload(cmd_tbl_t *cmdtp, int flag, int argc,
file = file_cbfs_find(argv[2]);
if (!file) {
if (file_cbfs_result == CBFS_FILE_NOT_FOUND)
if (cbfs_get_result() == CBFS_FILE_NOT_FOUND)
printf("%s: %s\n", file_cbfs_error(), argv[2]);
else
printf("%s.\n", file_cbfs_error());
......
......@@ -709,7 +709,8 @@ to load a 'u-boot-payload.efi', see below test logs on QEMU.
No controllers found
Hit any key to stop autoboot: 0
See README.u-boot_on_efi and README.uefi for details of EFI support in U-Boot.
See :doc:`../uefi/u-boot_on_efi` and :doc:`../uefi/uefi` for details of
EFI support in U-Boot.
TODO List
---------
......
......@@ -87,7 +87,7 @@ The PayloadId can be any 4 Bytes value.
$ qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio -pflash Outputs/qemu/SlimBootloader.bin
Build Instruction for Slim Bootloader for LeafHill (APL) target
--------------------------------------------------------------
---------------------------------------------------------------
LeafHill is using PCI UART2 device as a serial port.
For MEM32 serial port, CONFIG_SYS_NS16550_MEM32 needs to be enabled in U-Boot.
......
......@@ -8,6 +8,7 @@ ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_FS_LOADER) += fs.o
obj-$(CONFIG_SPL_FS_FAT) += fat/
obj-$(CONFIG_SPL_FS_EXT4) += ext4/
obj-$(CONFIG_SPL_FS_CBFS) += cbfs/
else
obj-y += fs.o
......
......@@ -6,3 +6,15 @@ config FS_CBFS
on systems that use coreboot as the first boot-loader and then load
U-Boot to actually boot the Operating System. You can also enable
CMD_CBFS to get command-line access.
config SPL_FS_CBFS
bool "Enable CBFS (Coreboot Filesystem) in SPL"
help
Define this to enable support for reading from a Coreboot
filesystem. This is a ROM-based filesystem used for accessing files
on systems that use coreboot as the first boot-loader and then load
U-Boot to actually boot the Operating System.
Note that most functions in the CBFS API do not work with SPL. Only
those which accept a cbfs_priv * can be used, since BSS is not
available.
This diff is collapsed.
......@@ -150,7 +150,7 @@ typedef struct global_data {
#endif
/*
* Global Data Flags - the top 16 bits are reserved for arch-specific flags
* Global Data Flags
*/
#define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */
#define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */
......
......@@ -90,6 +90,13 @@ extern enum cbfs_result file_cbfs_result;
*/
const char *file_cbfs_error(void);
/**
* cbfs_get_result() - Get the result of the last CBFS operation
*
*@return last result
*/
enum cbfs_result cbfs_get_result(void);
/**
* file_cbfs_init() - Initialize the CBFS driver and load metadata into RAM.
*
......@@ -128,6 +135,28 @@ void file_cbfs_get_next(const struct cbfs_cachenode **file);
*/
const struct cbfs_cachenode *file_cbfs_find(const char *name);
struct cbfs_priv *priv;
/**
* cbfs_find_file() - Find a file in a given CBFS
*
* @cbfs: CBFS to look in (use cbfs_init_mem() to set it up)
* @name: Filename to look for
* @return pointer to CBFS node if found, else NULL
*/
const struct cbfs_cachenode *cbfs_find_file(struct cbfs_priv *cbfs,
const char *name);
/**
* cbfs_init_mem() - Set up a new CBFS
*
* @base: Base address of CBFS
* @size: Size of CBFS in bytes
* @cbfsp: Returns a pointer to CBFS on success
* @return 0 if OK, -ve on error
*/
int cbfs_init_mem(ulong base, ulong size, struct cbfs_priv **privp);
/***************************************************************************/
/* All of the functions below can be used without first initializing CBFS. */
......
......@@ -105,11 +105,14 @@
#define CONFIG_OTHBOOTARGS "othbootargs=acpi=off\0"
#endif
#ifndef CONFIG_DISTRO_DEFAULTS
#define BOOTENV
#if defined(CONFIG_DISTRO_DEFAULTS)
#define DISTRO_BOOTENV BOOTENV
#else
#define DISTRO_BOOTENV
#endif
#define CONFIG_EXTRA_ENV_SETTINGS \
DISTRO_BOOTENV \
CONFIG_STD_DEVICES_SETTINGS \
"pciconfighost=1\0" \
"netdev=eth0\0" \
......@@ -118,8 +121,8 @@
"scriptaddr=0x7000000\0" \
"kernel_addr_r=0x1000000\0" \
"ramdisk_addr_r=0x4000000\0" \
"ramdiskfile=initramfs.gz\0" \
BOOTENV
"ramdiskfile=initramfs.gz\0"
#define CONFIG_RAMBOOTCOMMAND \
"setenv bootargs root=/dev/ram rw " \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment