* [U-Boot] [PATCH 2/5] x86: Make QEMU the default vendor [not found] <1430839470-22950-1-git-send-email-bmeng.cn@gmail.com> @ 2015-05-05 15:24 ` Bin Meng 2015-05-06 4:01 ` Simon Glass 2015-05-05 15:24 ` [U-Boot] [PATCH 3/5] x86: qemu: Wrap E1000 driver only when DM_PCI is not used Bin Meng ` (2 subsequent siblings) 3 siblings, 1 reply; 10+ messages in thread From: Bin Meng @ 2015-05-05 15:24 UTC (permalink / raw) To: u-boot Now that we have QEMU support, make it the default vendor in the 'make menuconfig' screen. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> --- arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 3d02620..0b78f10 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -12,7 +12,7 @@ config SYS_VSNPRINTF choice prompt "Mainboard vendor" - default VENDOR_COREBOOT + default VENDOR_EMULATION config VENDOR_COREBOOT bool "coreboot" -- 1.8.2.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 2/5] x86: Make QEMU the default vendor 2015-05-05 15:24 ` [U-Boot] [PATCH 2/5] x86: Make QEMU the default vendor Bin Meng @ 2015-05-06 4:01 ` Simon Glass 0 siblings, 0 replies; 10+ messages in thread From: Simon Glass @ 2015-05-06 4:01 UTC (permalink / raw) To: u-boot On 5 May 2015 at 09:24, Bin Meng <bmeng.cn@gmail.com> wrote: > Now that we have QEMU support, make it the default vendor in the > 'make menuconfig' screen. > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com> > --- > > arch/x86/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 3d02620..0b78f10 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -12,7 +12,7 @@ config SYS_VSNPRINTF > > choice > prompt "Mainboard vendor" > - default VENDOR_COREBOOT > + default VENDOR_EMULATION > > config VENDOR_COREBOOT > bool "coreboot" > -- > 1.8.2.1 > Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 3/5] x86: qemu: Wrap E1000 driver only when DM_PCI is not used [not found] <1430839470-22950-1-git-send-email-bmeng.cn@gmail.com> 2015-05-05 15:24 ` [U-Boot] [PATCH 2/5] x86: Make QEMU the default vendor Bin Meng @ 2015-05-05 15:24 ` Bin Meng 2015-05-05 15:35 ` Bin Meng 2015-05-05 15:24 ` [U-Boot] [PATCH 4/5] x86: Change coreboot default build configuration to QEMU Bin Meng 2015-05-05 15:24 ` [U-Boot] [PATCH 5/5] x86: Update README.x86 for QEMU support Bin Meng 3 siblings, 1 reply; 10+ messages in thread From: Bin Meng @ 2015-05-05 15:24 UTC (permalink / raw) To: u-boot E1000 driver has not been converted to driver model, so wrap it only when DM_PCI is not used. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> --- include/configs/qemu-x86.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h index 463620d..281aaa5 100644 --- a/include/configs/qemu-x86.h +++ b/include/configs/qemu-x86.h @@ -32,7 +32,9 @@ #define CONFIG_PCI_IO_SIZE 0xe000 #define CONFIG_PCI_PNP +#ifndef CONFIG_DM_PCI #define CONFIG_E1000 +#endif #define CONFIG_STD_DEVICES_SETTINGS "stdin=serial\0" \ "stdout=serial\0" \ -- 1.8.2.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 3/5] x86: qemu: Wrap E1000 driver only when DM_PCI is not used 2015-05-05 15:24 ` [U-Boot] [PATCH 3/5] x86: qemu: Wrap E1000 driver only when DM_PCI is not used Bin Meng @ 2015-05-05 15:35 ` Bin Meng 2015-05-05 15:43 ` Simon Glass 0 siblings, 1 reply; 10+ messages in thread From: Bin Meng @ 2015-05-05 15:35 UTC (permalink / raw) To: u-boot Hi Simon, On Tue, May 5, 2015 at 11:24 PM, Bin Meng <bmeng.cn@gmail.com> wrote: > E1000 driver has not been converted to driver model, so wrap it > only when DM_PCI is not used. > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com> > --- > > include/configs/qemu-x86.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h > index 463620d..281aaa5 100644 > --- a/include/configs/qemu-x86.h > +++ b/include/configs/qemu-x86.h > @@ -32,7 +32,9 @@ > #define CONFIG_PCI_IO_SIZE 0xe000 > > #define CONFIG_PCI_PNP > +#ifndef CONFIG_DM_PCI > #define CONFIG_E1000 This is because E1000 driver is using pci_hose_phys_to_bus() API which DM_PCI does not provide. Do you plan to fix this? > +#endif > > #define CONFIG_STD_DEVICES_SETTINGS "stdin=serial\0" \ > "stdout=serial\0" \ > -- Regards, Bin ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 3/5] x86: qemu: Wrap E1000 driver only when DM_PCI is not used 2015-05-05 15:35 ` Bin Meng @ 2015-05-05 15:43 ` Simon Glass 2015-05-07 11:43 ` Bin Meng 0 siblings, 1 reply; 10+ messages in thread From: Simon Glass @ 2015-05-05 15:43 UTC (permalink / raw) To: u-boot Hi Bin, On 5 May 2015 at 09:35, Bin Meng <bmeng.cn@gmail.com> wrote: > Hi Simon, > > On Tue, May 5, 2015 at 11:24 PM, Bin Meng <bmeng.cn@gmail.com> wrote: >> E1000 driver has not been converted to driver model, so wrap it >> only when DM_PCI is not used. >> >> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> >> --- >> >> include/configs/qemu-x86.h | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h >> index 463620d..281aaa5 100644 >> --- a/include/configs/qemu-x86.h >> +++ b/include/configs/qemu-x86.h >> @@ -32,7 +32,9 @@ >> #define CONFIG_PCI_IO_SIZE 0xe000 >> >> #define CONFIG_PCI_PNP >> +#ifndef CONFIG_DM_PCI >> #define CONFIG_E1000 > > This is because E1000 driver is using pci_hose_phys_to_bus() API which > DM_PCI does not provide. Do you plan to fix this? That function can be moved to pci_compat.c to get things building. However I believe it does not work and I don't have hardware to test it. Do you have time to take a look? > >> +#endif >> >> #define CONFIG_STD_DEVICES_SETTINGS "stdin=serial\0" \ >> "stdout=serial\0" \ >> -- Regards, Simon ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 3/5] x86: qemu: Wrap E1000 driver only when DM_PCI is not used 2015-05-05 15:43 ` Simon Glass @ 2015-05-07 11:43 ` Bin Meng 0 siblings, 0 replies; 10+ messages in thread From: Bin Meng @ 2015-05-07 11:43 UTC (permalink / raw) To: u-boot Hi Simon, On Tue, May 5, 2015 at 11:43 PM, Simon Glass <sjg@chromium.org> wrote: > Hi Bin, > > On 5 May 2015 at 09:35, Bin Meng <bmeng.cn@gmail.com> wrote: >> Hi Simon, >> >> On Tue, May 5, 2015 at 11:24 PM, Bin Meng <bmeng.cn@gmail.com> wrote: >>> E1000 driver has not been converted to driver model, so wrap it >>> only when DM_PCI is not used. >>> >>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> >>> --- >>> >>> include/configs/qemu-x86.h | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h >>> index 463620d..281aaa5 100644 >>> --- a/include/configs/qemu-x86.h >>> +++ b/include/configs/qemu-x86.h >>> @@ -32,7 +32,9 @@ >>> #define CONFIG_PCI_IO_SIZE 0xe000 >>> >>> #define CONFIG_PCI_PNP >>> +#ifndef CONFIG_DM_PCI >>> #define CONFIG_E1000 >> >> This is because E1000 driver is using pci_hose_phys_to_bus() API which >> DM_PCI does not provide. Do you plan to fix this? > > That function can be moved to pci_compat.c to get things building. > > However I believe it does not work and I don't have hardware to test > it. Do you have time to take a look? > Looks like moving it to pci_common.c can fix this and the driver still works. I will send a v2 soon. Regards, Bin ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 4/5] x86: Change coreboot default build configuration to QEMU [not found] <1430839470-22950-1-git-send-email-bmeng.cn@gmail.com> 2015-05-05 15:24 ` [U-Boot] [PATCH 2/5] x86: Make QEMU the default vendor Bin Meng 2015-05-05 15:24 ` [U-Boot] [PATCH 3/5] x86: qemu: Wrap E1000 driver only when DM_PCI is not used Bin Meng @ 2015-05-05 15:24 ` Bin Meng 2015-05-06 4:01 ` Simon Glass 2015-05-05 15:24 ` [U-Boot] [PATCH 5/5] x86: Update README.x86 for QEMU support Bin Meng 3 siblings, 1 reply; 10+ messages in thread From: Bin Meng @ 2015-05-05 15:24 UTC (permalink / raw) To: u-boot QEMU is much easier for us test booting U-Boot as a coreboot payload than having a real board like chromebook_link. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> --- board/coreboot/coreboot/Kconfig | 6 +++--- configs/coreboot-x86_defconfig | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/board/coreboot/coreboot/Kconfig b/board/coreboot/coreboot/Kconfig index 6a04158..69e3437 100644 --- a/board/coreboot/coreboot/Kconfig +++ b/board/coreboot/coreboot/Kconfig @@ -16,21 +16,21 @@ comment "coreboot-specific options" config SYS_CONFIG_NAME string "Board configuration file" - default "chromebook_link" + default "qemu-x86" help This option selects the board configuration file in include/configs/ directory to be used to build U-Boot for coreboot. config DEFAULT_DEVICE_TREE string "Board Device Tree Source (dts) file" - default "chromebook_link" + default "qemu-x86" help This option selects the board Device Tree Source (dts) file in arch/x86/dts/ directory to be used to build U-Boot for coreboot. config SYS_CAR_ADDR hex "Board specific Cache-As-RAM (CAR) address" - default 0x19200000 + default 0x01920000 help This option specifies the board specific Cache-As-RAM (CAR) address. diff --git a/configs/coreboot-x86_defconfig b/configs/coreboot-x86_defconfig index 799853f..4af38f5 100644 --- a/configs/coreboot-x86_defconfig +++ b/configs/coreboot-x86_defconfig @@ -3,3 +3,4 @@ CONFIG_VENDOR_COREBOOT=y CONFIG_TARGET_COREBOOT=y CONFIG_OF_CONTROL=y CONFIG_DM_PCI=y +CONFIG_TSC_CALIBRATION_BYPASS=y -- 1.8.2.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 4/5] x86: Change coreboot default build configuration to QEMU 2015-05-05 15:24 ` [U-Boot] [PATCH 4/5] x86: Change coreboot default build configuration to QEMU Bin Meng @ 2015-05-06 4:01 ` Simon Glass 0 siblings, 0 replies; 10+ messages in thread From: Simon Glass @ 2015-05-06 4:01 UTC (permalink / raw) To: u-boot On 5 May 2015 at 09:24, Bin Meng <bmeng.cn@gmail.com> wrote: > QEMU is much easier for us test booting U-Boot as a coreboot payload > than having a real board like chromebook_link. > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com> > --- > > board/coreboot/coreboot/Kconfig | 6 +++--- > configs/coreboot-x86_defconfig | 1 + > 2 files changed, 4 insertions(+), 3 deletions(-) Agreed. Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 5/5] x86: Update README.x86 for QEMU support [not found] <1430839470-22950-1-git-send-email-bmeng.cn@gmail.com> ` (2 preceding siblings ...) 2015-05-05 15:24 ` [U-Boot] [PATCH 4/5] x86: Change coreboot default build configuration to QEMU Bin Meng @ 2015-05-05 15:24 ` Bin Meng 2015-05-06 4:01 ` Simon Glass 3 siblings, 1 reply; 10+ messages in thread From: Bin Meng @ 2015-05-05 15:24 UTC (permalink / raw) To: u-boot Document how to build and test U-Boot with QEMU. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> --- doc/README.x86 | 65 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 17 deletions(-) diff --git a/doc/README.x86 b/doc/README.x86 index ef13fb4..4a30f68 100644 --- a/doc/README.x86 +++ b/doc/README.x86 @@ -14,12 +14,13 @@ including supported boards, build instructions, todo list, etc. Status ------ U-Boot supports running as a coreboot [1] payload on x86. So far only Link -(Chromebook Pixel) has been tested, but it should work with minimal adjustments -on other x86 boards since coreboot deals with most of the low-level details. +(Chromebook Pixel) and QEMU [2] x86 targets have been tested, but it should +work with minimal adjustments on other x86 boards since coreboot deals with +most of the low-level details. U-Boot also supports booting directly from x86 reset vector without coreboot, -aka raw support or bare support. Currently Link, Intel Crown Bay, Intel -Minnowboard Max and Intel Galileo support running U-Boot 'bare metal'. +aka raw support or bare support. Currently Link, QEMU x86 targets and all +Intel boards support running U-Boot 'bare metal'. As for loading an OS, U-Boot supports directly booting a 32-bit or 64-bit Linux kernel as part of a FIT image. It also supports a compressed zImage. @@ -32,15 +33,15 @@ on other architectures, like below: $ make coreboot-x86_defconfig $ make all -Note this default configuration will build a U-Boot payload for the Link board. +Note this default configuration will build a U-Boot payload for the QEMU board. To build a coreboot payload against another board, you can change the build configuration during the 'make menuconfig' process. x86 architecture ---> ... - (chromebook_link) Board configuration file - (chromebook_link) Board Device Tree Source (dts) file - (0x19200000) Board specific Cache-As-RAM (CAR) address + (qemu-x86) Board configuration file + (qemu-x86) Board Device Tree Source (dts) file + (0x01920000) Board specific Cache-As-RAM (CAR) address (0x4000) Board specific Cache-As-RAM (CAR) size Change the 'Board configuration file' and 'Board Device Tree Source (dts) file' @@ -78,7 +79,7 @@ Find the following files: * ./northbridge/intel/sandybridge/systemagent-r6.bin The 3rd one should be renamed to mrc.bin. -As for the video ROM, you can get it here [2]. +As for the video ROM, you can get it here [3]. Make sure all these binary blobs are put in the board directory. Now you can build U-Boot and obtain u-boot.rom: @@ -88,8 +89,8 @@ $ make all Intel Crown Bay specific instructions: -U-Boot support of Intel Crown Bay board [3] relies on a binary blob called -Firmware Support Package [4] to perform all the necessary initialization steps +U-Boot support of Intel Crown Bay board [4] relies on a binary blob called +Firmware Support Package [5] to perform all the necessary initialization steps as documented in the BIOS Writer Guide, including initialization of the CPU, memory controller, chipset and certain bus interfaces. @@ -178,6 +179,13 @@ Now you can build U-Boot and obtain u-boot.rom $ make galileo_defconfig $ make all +QEMU x86 target instructions: + +To build u-boot.rom for QEMU x86 targets, just simply run + +$ make qemu-x86_defconfig +$ make all + Test with coreboot ------------------ For testing U-Boot as the coreboot payload, there are things that need be paid @@ -207,10 +215,33 @@ At present it seems that for Minnowboard Max, coreboot does not pass through the video information correctly (it always says the resolution is 0x0). This works correctly for link though. +Test with QEMU +-------------- +QEMU is a fancy emulator that can enable us to test U-Boot without access to +a real x86 board. To launch QEMU with u-boot.rom, call QEMU as follows: + +$ qemu-system-i386 -nographic -bios path/to/u-boot.rom + +This will instantiate an emulated x86 board with i440FX and PIIX chipset. QEMU +also supports emulating an x86 board with Q35 and ICH9 based chipset, which is +also supported by U-Boot. To instantiate such a machine, call QEMU with: + +$ qemu-system-i386 -nographic -bios path/to/u-boot.rom -M q35 + +Note by default QEMU instantiated boards only have 128 MiB system memory. But +it is enough to have U-Boot boot and function correctly. You can increase the +system memory by pass '-m' parameter to QEMU if you want more memory: + +$ qemu-system-i386 -nographic -bios path/to/u-boot.rom -m 1024 + +This creates a board with 1 GiB system memory. Currently U-Boot for QEMU only +supports 3 GiB maximum system memory and reserves the last 1 GiB address space +for PCI device memory-mapped I/O and other stuff, so the maximum value of '-m' +would be 3072. CPU Microcode ------------- -Modern CPUs usually require a special bit stream called microcode [5] to be +Modern CPUs usually require a special bit stream called microcode [6] to be loaded on the processor after power up in order to function properly. U-Boot has already integrated these as hex dumps in the source tree. @@ -227,7 +258,6 @@ arch/x86/dts/ for these device tree source files. Useful Commands --------------- - In keeping with the U-Boot philosophy of providing functions to check and adjust internal settings, there are several x86-specific commands that may be useful: @@ -314,7 +344,8 @@ TODO List References ---------- [1] http://www.coreboot.org -[2] http://www.coreboot.org/~stepan/pci8086,0166.rom -[3] http://www.intel.com/content/www/us/en/embedded/design-tools/evaluation-platforms/atom-e660-eg20t-development-kit.html -[4] http://www.intel.com/fsp -[5] http://en.wikipedia.org/wiki/Microcode +[2] http://www.qemu.org +[3] http://www.coreboot.org/~stepan/pci8086,0166.rom +[4] http://www.intel.com/content/www/us/en/embedded/design-tools/evaluation-platforms/atom-e660-eg20t-development-kit.html +[5] http://www.intel.com/fsp +[6] http://en.wikipedia.org/wiki/Microcode -- 1.8.2.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 5/5] x86: Update README.x86 for QEMU support 2015-05-05 15:24 ` [U-Boot] [PATCH 5/5] x86: Update README.x86 for QEMU support Bin Meng @ 2015-05-06 4:01 ` Simon Glass 0 siblings, 0 replies; 10+ messages in thread From: Simon Glass @ 2015-05-06 4:01 UTC (permalink / raw) To: u-boot On 5 May 2015 at 09:24, Bin Meng <bmeng.cn@gmail.com> wrote: > Document how to build and test U-Boot with QEMU. > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com> > --- > > doc/README.x86 | 65 +++++++++++++++++++++++++++++++++++++++++++--------------- > 1 file changed, 48 insertions(+), 17 deletions(-) Acked-by: Simon Glass <sjg@chromium.org> ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-05-07 11:43 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1430839470-22950-1-git-send-email-bmeng.cn@gmail.com> 2015-05-05 15:24 ` [U-Boot] [PATCH 2/5] x86: Make QEMU the default vendor Bin Meng 2015-05-06 4:01 ` Simon Glass 2015-05-05 15:24 ` [U-Boot] [PATCH 3/5] x86: qemu: Wrap E1000 driver only when DM_PCI is not used Bin Meng 2015-05-05 15:35 ` Bin Meng 2015-05-05 15:43 ` Simon Glass 2015-05-07 11:43 ` Bin Meng 2015-05-05 15:24 ` [U-Boot] [PATCH 4/5] x86: Change coreboot default build configuration to QEMU Bin Meng 2015-05-06 4:01 ` Simon Glass 2015-05-05 15:24 ` [U-Boot] [PATCH 5/5] x86: Update README.x86 for QEMU support Bin Meng 2015-05-06 4:01 ` Simon Glass
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.