x86: Support QEMU x86 targets

This commit introduces the initial U-Boot support for QEMU x86 targets.
U-Boot can boot from coreboot as a payload, or directly without coreboot.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Merged in patch 'x86: qemu: Add CMD_NET to qemu-x86_defconfig
   https://patchwork.ozlabs.org/patch/479745/
This commit is contained in:
Bin Meng
2015-05-07 21:34:08 +08:00
committed by Simon Glass
parent 238fe16c40
commit a65b25d148
20 changed files with 407 additions and 1 deletions

25
board/emulation/Kconfig Normal file
View File

@@ -0,0 +1,25 @@
#
# Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
#
# SPDX-License-Identifier: GPL-2.0+
#
if VENDOR_EMULATION
choice
prompt "Mainboard model"
config TARGET_QEMU_X86
bool "QEMU x86"
help
This is the QEMU emulated x86 board. U-Boot supports running
as a coreboot payload as well as bare boot without coreboot.
There are two types of x86 boards supported by QEMU which are
supported by U-Boot. They are via QEMU '-M pc', an i440FX/PIIX
chipset platform and '-M q35', a Q35/ICH9 chipset platform.
endchoice
source "board/emulation/qemu-x86/Kconfig"
endif

View File

@@ -0,0 +1,24 @@
if TARGET_QEMU_X86
config SYS_BOARD
default "qemu-x86"
config SYS_VENDOR
default "emulation"
config SYS_SOC
default "qemu"
config SYS_CONFIG_NAME
default "qemu-x86"
config SYS_TEXT_BASE
default 0xfff00000
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select X86_RESET_VECTOR
select QEMU
select BOARD_ROMSIZE_KB_1024
endif

View File

@@ -0,0 +1,6 @@
QEMU X86 BOARD
M: Bin Meng <bmeng.cn@gmail.com>
S: Maintained
F: board/emulation/qemu-x86/
F: include/configs/qemu-x86.h
F: configs/qemu-x86_defconfig

View File

@@ -0,0 +1,7 @@
#
# Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
#
# SPDX-License-Identifier: GPL-2.0+
#
obj-y += qemu-x86.o start.o

View File

@@ -0,0 +1,13 @@
/*
* Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <netdev.h>
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

View File

@@ -0,0 +1,9 @@
/*
* Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
.globl early_board_init
early_board_init:
jmp early_board_init_ret