Re: [U-Boot] [PATCH 2/2] x86: qemu: qfw: Implement acpi_get_rsdp_addr()

2018-02-04 Thread Miao Yan
On Tue, Jan 30, 2018 at 9:01 PM, Bin Meng wrote: > U-Boot on QEMU does not build ACPI table by ourself, instead it uses > the prebuilt ACPI table via the qfw interface. This implements the > qfw version of acpi_get_rsdp_addr() for setup_zimage(). > > Signed-off-by: Bin Meng > --- > > drivers/mis

[U-Boot] [PATCH v3 13/13] config: sandbox: enable qfw and cmd_qfw for testing

2016-05-22 Thread Miao Yan
This patch enables qfw and cmd_qfw on sandbox for build coverage test Signed-off-by: Miao Yan --- Changes in v3: - fix config option order configs/sandbox_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index afdf4a3

[U-Boot] [PATCH v3 09/13] cmd: qfw: do not require default macros when building qfw command

2016-05-22 Thread Miao Yan
The qfw command interface makes use of CONFIG_LOADADDR and CONFIG_RAMDISKADDR to setup kernel. But not all boards have these macros, which causes build problem on those platforms. This patch fixes this issue. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- Changes in v3: - none cmd/qfw.c

[U-Boot] [PATCH v3 10/13] cmd: qfw: do not depend on x86

2016-05-22 Thread Miao Yan
The qfw command interface used to depend on X86, this patch removes this restriction so it can be built for sandbox for testing. For normal usage, it can only be used with CONFIG_QEMU. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- Changes in v3: - none cmd/Kconfig | 1 - 1 file changed

[U-Boot] [PATCH v3 11/13] cmd: qfw: bring ACPI generation code into qfw core

2016-05-22 Thread Miao Yan
Loading ACPI table from QEMU's fw_cfg interface is not x86 specific (ARM64 may also make use of it). So move the code to common place. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- Changes in v3: - none arch/x86/cpu/qemu/acpi_table.c

[U-Boot] [PATCH v3 12/13] x86: qemu: rename qemu/acpi_table.c

2016-05-22 Thread Miao Yan
Rename qemu/acpi_table.c to qemu/e820.c, because ACPI stuff is moved to qfw core, this file only contains code for installing e820 table. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- Changes in v3: - none arch/x86/cpu/qemu/Makefile | 3 +-- arch/x86/cpu/qemu

[U-Boot] [PATCH v3 06/13] x86: qemu: move x86 specific operations out of qfw core

2016-05-22 Thread Miao Yan
The original implementation of qfw includes several x86 specific operations, like directly calling outb/inb and using some inline assembly code which prevents it being ported to other architectures. This patch adds callback functions and moves those to arch/x86/ Signed-off-by: Miao Yan Reviewed

[U-Boot] [PATCH v3 08/13] cmd: qfw: rename qemu_fw_cfg.[c|h] to qfw.[c|h]

2016-05-22 Thread Miao Yan
Make file names consistent with CONFIG_QFW and CONFIG_CMD_QFW Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- Changes in v3: - squash with patch v2 #13 arch/x86/cpu/mp_init.c| 2 +- arch/x86/cpu/qemu/acpi_table.c| 2 +- arch/x86/cpu/qemu/cpu.c | 2

[U-Boot] [PATCH v3 05/13] x86: qemu: split qfw command interface and qfw core

2016-05-22 Thread Miao Yan
-off-by: Miao Yan Reviewed-by: Bin Meng --- Changes in v3: - fix a typo in commit message arch/x86/Kconfig | 2 +- arch/x86/cpu/mp_init.c | 4 +- arch/x86/cpu/qemu/Makefile | 3 +- arch/x86/cpu/qemu/qemu.c | 2 + cmd/Kconfig | 1 + cmd/Makefile

[U-Boot] [PATCH v3 03/13] cmd: qfw: remove qemu_fwcfg_free_files()

2016-05-22 Thread Miao Yan
This patch is part of the qfw refactor work. The qemu_fwcfg_free_files() function is only used in error handling in ACPI table generation, let's not make this a core function and move it to the right place. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- Changes in v3: - none arch/x8

[U-Boot] [PATCH v3 04/13] cmd: qfw: make fwcfg_present and fwcfg_dma_present public

2016-05-22 Thread Miao Yan
This patch is part of the qfw refactor work. This patch makes qemu_fwcfg_present() and qemu_fwcfg_dma_present() public functions. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- Changes in v3: - none cmd/qemu_fw_cfg.c | 37 - include/qemu_fw_cfg.h

[U-Boot] [PATCH v3 07/13] x86: qemu: add comment about qfw register endianness

2016-05-22 Thread Miao Yan
This patch adds some comments about qfw register endianness for clarity. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- Changes in v3: - none arch/x86/cpu/qemu/qemu.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu

[U-Boot] [PATCH v3 01/13] x86: qemu: fix ACPI Kconfig options

2016-05-22 Thread Miao Yan
implementation", there is only one way to support ACPI table for QEMU targets which is the fw_cfg interface. Having two Kconfig options for this purpose is not necessary any more, so this patch consolidates the two. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- Changes in v3: - non

[U-Boot] [PATCH v3 02/13] cmd: qfw: add API to iterate firmware list

2016-05-22 Thread Miao Yan
This patch is part of the refactor work of qfw. It adds 3 APIs to qfw core to iterate firmware list. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- Changes in v3: - none cmd/qemu_fw_cfg.c | 25 ++--- include/qemu_fw_cfg.h | 9 + 2 files changed, 31

[U-Boot] [PATCH v3 00/13] cleanup QEMU fw_cfg code

2016-05-22 Thread Miao Yan
-patch detect renames *) add a patch to enable qfw for sandbox_defconfig *) address other trivial review comments Changes in v3: *) correct config option order in sandbox_defconfig *) squash patch v2 #8 and patch v2 #13 *) fix typos in commit message Miao Yan (13): x86: qemu: fix ACPI

Re: [U-Boot] [v2 PATCH 14/14] config: sandbox: enable qfw and cmd_qfw for testing

2016-05-19 Thread Miao Yan
Hi Bin, 2016-05-20 10:29 GMT+08:00 Bin Meng : > Hi Miao, > > On Fri, May 20, 2016 at 10:06 AM, Miao Yan wrote: >> Hi Bin, >> >> 2016-05-19 17:08 GMT+08:00 Bin Meng : >>> Hi Miao, >>> >>> On Wed, May 18, 2016 at 5:40 PM, Miao Yan wrote:

Re: [U-Boot] [v2 PATCH 13/14] cmd: qfw: rename QEMU_FW_CFG to CMD_QFW

2016-05-19 Thread Miao Yan
2016-05-20 10:30 GMT+08:00 Bin Meng : > Hi Miao, > > On Fri, May 20, 2016 at 10:07 AM, Miao Yan wrote: >> Hi Bin, >> >> 2016-05-19 17:08 GMT+08:00 Bin Meng : >>> Hi Miao, >>> >>> the title should say: CMD_QEMU_FW_CFG >>> >>&g

Re: [U-Boot] [v2 PATCH 13/14] cmd: qfw: rename QEMU_FW_CFG to CMD_QFW

2016-05-19 Thread Miao Yan
Hi Bin, 2016-05-19 17:08 GMT+08:00 Bin Meng : > Hi Miao, > > the title should say: CMD_QEMU_FW_CFG > > I can fix this when applying. > > On Wed, May 18, 2016 at 5:39 PM, Miao Yan wrote: >> Align macro names with the rest of qfw code >> > > and I believe

Re: [U-Boot] [v2 PATCH 14/14] config: sandbox: enable qfw and cmd_qfw for testing

2016-05-19 Thread Miao Yan
Hi Bin, 2016-05-19 17:08 GMT+08:00 Bin Meng : > Hi Miao, > > On Wed, May 18, 2016 at 5:40 PM, Miao Yan wrote: >> This patch enables qfw and cmd_qfw on sandbox for build coverage test >> >> Signed-off-by: Miao Yan >> --- >> configs/sandbox_defconfig

[U-Boot] [v2 PATCH 14/14] config: sandbox: enable qfw and cmd_qfw for testing

2016-05-18 Thread Miao Yan
This patch enables qfw and cmd_qfw on sandbox for build coverage test Signed-off-by: Miao Yan --- configs/sandbox_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index afdf4a3..f19308d 100644 --- a/configs/sandbox_defconfig

[U-Boot] [v2 PATCH 13/14] cmd: qfw: rename QEMU_FW_CFG to CMD_QFW

2016-05-18 Thread Miao Yan
Align macro names with the rest of qfw code Signed-off-by: Miao Yan --- cmd/Kconfig| 2 +- cmd/Makefile | 2 +- configs/qemu-x86_defconfig | 2 +- drivers/misc/Kconfig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/Kconfig b/cmd

[U-Boot] [v2 PATCH 11/14] cmd: qfw: bring ACPI generation code into qfw core

2016-05-18 Thread Miao Yan
Loading ACPI table from QEMU's fw_cfg interface is not x86 specific (ARM64 may also make use of it). So move the code to common place. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- arch/x86/cpu/qemu/acpi_table.c | 209 - drivers/misc/

[U-Boot] [v2 PATCH 10/14] cmd: qfw: do not depend on x86

2016-05-18 Thread Miao Yan
The qfw command interface used to depend on X86, this patch removes this restriction so it can be built for sandbox for testing. For normal usage, it can only be used with CONFIG_QEMU. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- cmd/Kconfig | 1 - 1 file changed, 1 deletion(-) diff

[U-Boot] [v2 PATCH 09/14] cmd: qfw: do not require default macros when building qfw command

2016-05-18 Thread Miao Yan
The qfw command interface makes use of CONFIG_LOADADDR and CONFIG_RAMDISKADDR to setup kernel. But not all boards have these macro, which causes build problem on those platforms. This patch fixes this issue. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- Changes in v2: - fix commit

[U-Boot] [v2 PATCH 07/14] x86: qemu: add comment about qfw register endianness

2016-05-18 Thread Miao Yan
This patch adds some comments about qfw register endianness for clarity. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- arch/x86/cpu/qemu/qemu.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c index 6ff9947

[U-Boot] [v2 PATCH 12/14] x86: qemu: rename qemu/acpi_table.c

2016-05-18 Thread Miao Yan
Rename qemu/acpi_table.c to qemu/e820.c, because ACPI stuff is moved to qfw core, this file only contains code for installing e820 table. Signed-off-by: Miao Yan --- arch/x86/cpu/qemu/Makefile | 3 +-- arch/x86/cpu/qemu/{acpi_table.c => e820.c} | 0 2 files changed, 1 insert

[U-Boot] [v2 PATCH 04/14] cmd: qfw: make fwcfg_present and fwcfg_dma_present public

2016-05-18 Thread Miao Yan
This patch is part of the qfw refactor work. This patch makes qemu_fwcfg_present() and qemu_fwcfg_dma_present() public functions. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- cmd/qemu_fw_cfg.c | 37 - include/qemu_fw_cfg.h | 3 +++ 2 files changed

[U-Boot] [v2 PATCH 05/14] x86: qemu: split qfw command interface and qfw core

2016-05-18 Thread Miao Yan
. Signed-off-by: Miao Yan --- Changes in v2: - do not use #ifdef...#end when including header files - cleanup blank line at the end of file - rename cmd_qfw.c to qfw.c arch/x86/Kconfig | 2 +- arch/x86/cpu/mp_init.c | 4 +- arch/x86/cpu/qemu/Makefile | 3 +- arch/x86/cpu

[U-Boot] [v2 PATCH 08/14] cmd: qfw: rename qemu_fw_cfg.[c|h] to qfw.[c|h]

2016-05-18 Thread Miao Yan
Make file names aligned with CONFIG_QFW Signed-off-by: Miao Yan --- arch/x86/cpu/mp_init.c| 2 +- arch/x86/cpu/qemu/acpi_table.c| 2 +- arch/x86/cpu/qemu/cpu.c | 2 +- arch/x86/cpu/qemu/qemu.c | 2 +- cmd/qfw.c | 2

[U-Boot] [v2 PATCH 06/14] x86: qemu: move x86 specific operations out of qfw core

2016-05-18 Thread Miao Yan
The original implementation of qfw includes several x86 specific operations, like directly calling outb/inb and using some inline assembly code which prevents it being ported to other architectures. This patch adds callback functions and moves those to arch/x86/ Signed-off-by: Miao Yan Reviewed

[U-Boot] [v2 PATCH 03/14] cmd: qfw: remove qemu_fwcfg_free_files()

2016-05-18 Thread Miao Yan
This patch is part of the qfw refactor work. The qemu_fwcfg_free_files() function is only used in error handling in ACPI table generation, let's not make this a core function and move it to the right place. Signed-off-by: Miao Yan --- arch/x86/cpu/qemu/acpi_table.c | 13 +++--

[U-Boot] [v2 PATCH 02/14] cmd: qfw: add API to iterate firmware list

2016-05-18 Thread Miao Yan
This patch is part of the refactor work of qfw. It adds 3 APIs to qfw core to iterate firmware list. Signed-off-by: Miao Yan Reviewed-by: Bin Meng --- cmd/qemu_fw_cfg.c | 25 ++--- include/qemu_fw_cfg.h | 9 + 2 files changed, 31 insertions(+), 3 deletions

[U-Boot] [v2 PATCH 00/14] cleanup QEMU fw_cfg code

2016-05-18 Thread Miao Yan
-patch detect renames *) add a patch to enable qfw for sandbox_defconfig *) address other trivial review comments Miao Yan (14): x86: qemu: fix ACPI Kconfig options cmd: qfw: add API to iterate firmware list cmd: qfw: remove qemu_fwcfg_free_files() cmd: qfw: make fwcfg_present and

[U-Boot] [v2 PATCH 01/14] x86: qemu: fix ACPI Kconfig options

2016-05-18 Thread Miao Yan
implementation", there is only one way to support ACPI table for QEMU targets which is the fw_cfg interface. Having two Kconfig options for this purpose is not necessary any more, so this patch consolidates the two. Signed-off-by: Miao Yan --- Changes in v2: - fix a wrong macro nam

Re: [U-Boot] [PATCH 12/12] x86: qemu: rename qemu/acpi_table.c

2016-05-16 Thread Miao Yan
2016-05-17 8:42 GMT+08:00 Tom Rini : > On Mon, May 16, 2016 at 05:40:16PM +0800, Miao Yan wrote: >> Hi Bin, >> >> 2016-05-13 22:01 GMT+08:00 Bin Meng : >> > Hi Miao, >> > >> > On Fri, May 13, 2016 at 2:29 PM, Miao Yan wrote: >> >> Ren

Re: [U-Boot] [PATCH 05/12] x86: qemu: split qfw command interface and qfw core

2016-05-16 Thread Miao Yan
Hi Bin, 2016-05-16 16:47 GMT+08:00 Bin Meng : > Hi Miao, > > On Fri, May 13, 2016 at 2:29 PM, Miao Yan wrote: >> This patch splits qfw command interface and qfw core function into two >> files, and introduces a new Kconfig option (CONFIG_QFW). for >> qfw core.

Re: [U-Boot] [PATCH 03/12] cmd: qfw: remove qemu_fwcfg_free_files()

2016-05-16 Thread Miao Yan
2016-05-14 4:46 GMT+08:00 Tom Rini : > On Fri, May 13, 2016 at 10:00:05PM +0800, Bin Meng wrote: >> Hi Miao, >> >> On Fri, May 13, 2016 at 2:29 PM, Miao Yan wrote: >> > This patch is part of the qfw refactor work. >> > >> > The qemu_fwcfg_free_fi

Re: [U-Boot] [PATCH 09/12] cmd: qfw: workaround qfw build issue

2016-05-16 Thread Miao Yan
2016-05-14 4:46 GMT+08:00 Tom Rini : > On Fri, May 13, 2016 at 10:00:37PM +0800, Bin Meng wrote: >> Hi Miao, >> >> On Fri, May 13, 2016 at 2:29 PM, Miao Yan wrote: >> > The qfw command interface makes use of CONFIG_LOADADDR and >> > CONFIG_RAMDISKADDR t

Re: [U-Boot] [PATCH 10/12] cmd: qfw: do not depend on x86

2016-05-16 Thread Miao Yan
Hi Bin, 2016-05-13 22:00 GMT+08:00 Bin Meng : > Hi Miao, > > On Fri, May 13, 2016 at 2:29 PM, Miao Yan wrote: >> The qfw command interface used to depend on X86, this patch removes >> this restriction so it can be built for sandbox for testing. For normal >> usag

Re: [U-Boot] [PATCH 12/12] x86: qemu: rename qemu/acpi_table.c

2016-05-16 Thread Miao Yan
Hi Bin, 2016-05-13 22:01 GMT+08:00 Bin Meng : > Hi Miao, > > On Fri, May 13, 2016 at 2:29 PM, Miao Yan wrote: >> Rename qemu/acpi_table.c to qemu/e820.c, because ACPI stuff is moved >> to qfw core, this file only contains code for installing e820 table. >>

Re: [U-Boot] [PATCH 05/12] x86: qemu: split qfw command interface and qfw core

2016-05-16 Thread Miao Yan
Hi Bin, 2016-05-13 22:00 GMT+08:00 Bin Meng : > Hi Miao, > > On Fri, May 13, 2016 at 2:29 PM, Miao Yan wrote: >> This patch splits qfw command interface and qfw core function into two >> files, and introduces a new Kconfig option (CONFIG_QFW). for >> qfw core.

Re: [U-Boot] [PATCH 01/12] x86: qemu: fix ACPI Kconfig options

2016-05-16 Thread Miao Yan
Hi Bin, 2016-05-13 21:59 GMT+08:00 Bin Meng : > Hi Miao, > > On Fri, May 13, 2016 at 2:29 PM, Miao Yan wrote: >> CONFIG_GENENRATE_ACPI_TABLE controls the generation of ACPI table which >> uses U-Boot's built-in methods and CONFIG_QEMU_ACPI_TABLE controls whether >>

[U-Boot] [PATCH 08/12] cmd: qfw: rename qemu_fw_cfg.[c|h] to qfw.[c|h]

2016-05-12 Thread Miao Yan
Make file names aligned with CONFIG_QFW Signed-off-by: Miao Yan --- arch/x86/cpu/mp_init.c | 2 +- arch/x86/cpu/qemu/acpi_table.c | 2 +- arch/x86/cpu/qemu/cpu.c| 2 +- arch/x86/cpu/qemu/qemu.c | 2 +- cmd/cmd_qfw.c | 2 +- drivers/misc/Makefile

[U-Boot] [PATCH 12/12] x86: qemu: rename qemu/acpi_table.c

2016-05-12 Thread Miao Yan
Rename qemu/acpi_table.c to qemu/e820.c, because ACPI stuff is moved to qfw core, this file only contains code for installing e820 table. Signed-off-by: Miao Yan --- arch/x86/cpu/qemu/Makefile | 3 +-- arch/x86/cpu/qemu/acpi_table.c | 43 -- arch

[U-Boot] [PATCH 11/12] cmd: qfw: bring ACPI generation code into qfw core

2016-05-12 Thread Miao Yan
Loading ACPI table from QEMU's fw_cfg interface is not x86 specific (ARM64 may also make user of it). So move the code common place. Signed-off-by: Miao Yan --- arch/x86/cpu/qemu/acpi_table.c | 211 - drivers/misc/qfw.c

[U-Boot] [PATCH 10/12] cmd: qfw: do not depend on x86

2016-05-12 Thread Miao Yan
The qfw command interface used to depend on X86, this patch removes this restriction so it can be built for sandbox for testing. For normal usage, it can only be used with CONFIG_QEMU. Signed-off-by: Miao Yan --- cmd/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/Kconfig b/cmd

[U-Boot] [PATCH 05/12] x86: qemu: split qfw command interface and qfw core

2016-05-12 Thread Miao Yan
. Signed-off-by: Miao Yan --- arch/x86/Kconfig | 2 +- arch/x86/cpu/mp_init.c | 6 +- arch/x86/cpu/qemu/Makefile | 3 +- arch/x86/cpu/qemu/acpi_table.c | 2 + arch/x86/cpu/qemu/qemu.c | 4 + cmd/Kconfig| 1 + cmd/Makefile

[U-Boot] [PATCH 07/12] x86: qemu: add comment about qfw register endianness

2016-05-12 Thread Miao Yan
This patch adds some comments about qfw register endianness for clarity. Signed-off-by: Miao Yan --- arch/x86/cpu/qemu/qemu.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c index d964283..716a0ac 100644 --- a/arch

[U-Boot] [PATCH 09/12] cmd: qfw: workaround qfw build issue

2016-05-12 Thread Miao Yan
The qfw command interface makes use of CONFIG_LOADADDR and CONFIG_RAMDISKADDR to setup kernel. But not all boards have these macro, which causes build problem on those platforms. This patch fixes this issue. Signed-off-by: Miao Yan --- cmd/cmd_qfw.c | 13 + 1 file changed, 13

[U-Boot] [PATCH 03/12] cmd: qfw: remove qemu_fwcfg_free_files()

2016-05-12 Thread Miao Yan
This patch is part of the qfw refactor work. The qemu_fwcfg_free_files() function is only used in error handling in ACPI table generation, let's not make this a core function and move it to the right place. Signed-off-by: Miao Yan --- arch/x86/cpu/qemu/acpi_table.c | 13 +++--

[U-Boot] [PATCH 06/12] x86: qemu: move x86 specific operations out of qfw core

2016-05-12 Thread Miao Yan
The original implementation of qfw includes several x86 specific operations, like directly calling outb/inb and using some inline assembly code which prevents it being ported to other architectures. This patch adds callback functions and moves those to arch/x86/ Signed-off-by: Miao Yan

[U-Boot] [PATCH 04/12] cmd: qfw: make fwcfg_present and fwcfg_dma_present public

2016-05-12 Thread Miao Yan
This patch is part of the qfw refactor work. This patch makes qemu_fwcfg_present() and qemu_fwcfg_dma_present() public functions. Signed-off-by: Miao Yan --- cmd/qemu_fw_cfg.c | 37 - include/qemu_fw_cfg.h | 3 +++ 2 files changed, 23 insertions(+), 17

[U-Boot] [PATCH 02/12] cmd: qfw: add API to iterate firmware list

2016-05-12 Thread Miao Yan
This patch is part of the refactor work of qfw. It adds 3 APIs to qfw core to iterate firmware list. Signed-off-by: Miao Yan --- cmd/qemu_fw_cfg.c | 25 ++--- include/qemu_fw_cfg.h | 9 + 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/cmd

[U-Boot] [PATCH 00/12] cleanup QEMU fw_cfg code

2016-05-12 Thread Miao Yan
This patchset cleans the QEMU fw_cfg code: *) split qfw core and qfw command interface *) split x86 specific operations from qfw core *) move x86 ACPI generation code into qfw core as this can also be used by others like ARM64 *) various cleanups Miao Yan (12): x86: qemu: fix ACPI

[U-Boot] [PATCH 01/12] x86: qemu: fix ACPI Kconfig options

2016-05-12 Thread Miao Yan
implementation", there is only one way to support ACPI table for QEMU targets which is the fw_cfg interface. Having two Kconfig options for this purpose is not necessary any more, so this patch consolidates the two. Signed-off-by: Miao Yan --- arch/x86/Kconfig | 10 +

Re: [U-Boot] [PATCH v2] x86: qemu: Move qfw command over to cmd and add Kconfig entry

2016-05-11 Thread Miao Yan
2016-05-11 10:11 GMT+08:00 Bin Meng : > Hi Miao, > > On Tue, May 10, 2016 at 10:10 AM, Miao Yan wrote: >>>> >>>> +config CMD_QEMU_FW_CFG >>>> + bool "qfw" >>>> + depends on X86 >>>> + hel

Re: [U-Boot] [PATCH v2] x86: qemu: Move qfw command over to cmd and add Kconfig entry

2016-05-11 Thread Miao Yan
Hi Tom, > > Well, this patch was a first pass at trying to separate out the logic. > My end goal is to be able to use -kernel / -initrd / -dtb to pass in > files "directly" to say vexpress_ca9x4 rather than have to fiddle with > fake networking. So we need to keep that in mind when splitting the

Re: [U-Boot] [PATCH] x86: qemu: fix ACPI Kconfig options

2016-05-10 Thread Miao Yan
Hi Bin, 2016-05-11 10:13 GMT+08:00 Bin Meng : > Hi Miao, > > On Wed, May 11, 2016 at 10:02 AM, Miao Yan wrote: >> Hi Bin, >> >> 2016-05-10 11:11 GMT+08:00 Bin Meng : >>> On Mon, May 9, 2016 at 8:57 PM, Bin Meng wrote: >>>>

Re: [U-Boot] [PATCH] x86: qemu: fix ACPI Kconfig options

2016-05-10 Thread Miao Yan
Hi Bin, 2016-05-10 11:11 GMT+08:00 Bin Meng : > On Mon, May 9, 2016 at 8:57 PM, Bin Meng wrote: >> On Mon, May 9, 2016 at 3:27 PM, Miao Yan wrote: >>> CONFIG_GENENRATE_ACPI_TABLE controls the generation of ACPI table which >>> uses U-Boot's built-in methods and

Re: [U-Boot] [PATCH v2] x86: qemu: Move qfw command over to cmd and add Kconfig entry

2016-05-10 Thread Miao Yan
Hi Bin, 2016-05-10 13:12 GMT+08:00 Bin Meng : > Hi Miao, > > On Tue, May 10, 2016 at 12:35 PM, Miao Yan wrote: >> 2016-05-10 11:08 GMT+08:00 Bin Meng : >>> On Tue, May 10, 2016 at 10:17 AM, Tom Rini wrote: >>>> On Tue, May 10, 2016 at 09:20:45AM +0800, Bin M

Re: [U-Boot] [PATCH v2] x86: qemu: Move qfw command over to cmd and add Kconfig entry

2016-05-09 Thread Miao Yan
qemu/fw_cfg.c into >>> > cmd/qemu_fw_cfg.c >>> > - Move arch/x86/include/asm/fw_cfg.h to include/qemu_fw_cfg.h >>> > - Rename ACPI table portion to arch/x86/cpu/qemu/acpi_table.c >>> > >>> > Signed-off-by: Tom Rini >>> > --- >>&

Re: [U-Boot] [PATCH v2] x86: qemu: Move qfw command over to cmd and add Kconfig entry

2016-05-09 Thread Miao Yan
>> >> +config CMD_QEMU_FW_CFG >> + bool "qfw" >> + depends on X86 >> + help >> + This provides access to the QEMU firmware interface. The main >> + feature is to allow easy loading of files passed to qemu-system >> + via -kernel / -initrd >> endmenu > > T

[U-Boot] [PATCH] x86: qemu: fix ACPI Kconfig options

2016-05-09 Thread Miao Yan
implementation", there is only one way to support ACPI table for QEMU targets which is the fw_cfg interface. Having two Kconfig options for this purpose is not necessary any more, so this patch consolidates the two. Signed-off-by: Miao Yan --- arch/x86/Kconfig | 9

Re: [U-Boot] [PATCH v2] x86: qemu: Move qfw command over to cmd and add Kconfig entry

2016-05-08 Thread Miao Yan
i > --- > Changes in v2: > - Depend on X86 (per Miao Yan) I am afraid this still doesn't build. At least you need to make the ACPI stuff depend on the new config option CONFIG_CMD_QEMU_FW_CFG, as well as some tweaks in qemu.c and mp_init.c because they call functions from the ori

Re: [U-Boot] [PATCH] x86: qemu: Move qfw command over to cmd and add Kconfig entry

2016-05-02 Thread Miao Yan
t; +++ b/arch/x86/cpu/qemu/Makefile > @@ -7,4 +7,5 @@ > ifndef CONFIG_EFI_STUB > obj-y += car.o dram.o > endif > -obj-y += cpu.o fw_cfg.o qemu.o > +obj-y += cpu.o qemu.o > +obj-$(CONFIG_QEMU_ACPI_TABLE) += acpi_table.o > diff --git a/arch/x86/cpu/qemu/acpi_table.c b/arch

Re: [U-Boot] [PATCH] x86: Correct typo of Miao Yan's email address

2016-04-13 Thread Miao Yan
ch/x86/cpu/qemu/fw_cfg.c > index a0a3d08..2e2794e 100644 > --- a/arch/x86/cpu/qemu/fw_cfg.c > +++ b/arch/x86/cpu/qemu/fw_cfg.c > @@ -1,5 +1,5 @@ > /* > - * (C) Copyright 2015 Miao Yan > + * (C) Copyright 2015 Miao Yan > * > * SPDX-License-Identifier:GPL-2.0+ &

[U-Boot] [PATCH v3 3/4] x86: qemu: add the ability to load and link ACPI tables from QEMU

2016-01-20 Thread Miao Yan
ned-off-by: Miao Yan Reviewed-by: Bin Meng Tested-by: Bin Meng --- Change in v3: - fix a build error - make it [PATCH 3/4] arch/x86/cpu/qemu/Makefile| 2 + arch/x86/cpu/qemu/fw_cfg.c| 253 ++ arch/x86/include/asm/fw_cfg.h | 61 ++ ar

[U-Boot] [PATCH v3 2/4] x86: qemu: setup PM IO base for ACPI in southbridge

2016-01-20 Thread Miao Yan
Enable ACPI IO space for piix4 (for pc board) and ich9 (for q35 board) Signed-off-by: Miao Yan Reviewed-by: Bin Meng Tested-by: Bin Meng --- arch/x86/cpu/qemu/Kconfig | 7 +++ arch/x86/cpu/qemu/qemu.c| 29 + arch/x86/include/asm

[U-Boot] [PATCH v3 0/4] add support for loading ACPI tables from QEMU

2016-01-20 Thread Miao Yan
] x86: qemu: loading ACPI table from QEMU, add a config option CONFIG_QEMU_ACPI_TABLE - various cleanups Miao Yan (4): x86: qemu: re-structure qemu_fwcfg_list_firmware() x86: qemu: setup PM IO base for ACPI in southbridge x86: qemu: add the ability to load and link ACPI tables from

[U-Boot] [PATCH v3 1/4] x86: qemu: re-structure qemu_fwcfg_list_firmware()

2016-01-20 Thread Miao Yan
Re-write the logic in qemu_fwcfg_list_firmware(), add a function qemu_fwcfg_read_firmware_list() to handle reading firmware list. Signed-off-by: Miao Yan Reviewed-by: Bin Meng Tested-by: Bin Meng --- arch/x86/cpu/qemu/fw_cfg.c| 63 +-- arch/x86

[U-Boot] [PATCH v3 4/4] x86: config option for loading ACPI table from QEMU

2016-01-20 Thread Miao Yan
This patch adds a config option for loading ACPI table from QEMU. When enabled, U-Boot won't generate ACPI tables, but use those provided by QEMU. Signed-off-by: Miao Yan Reviewed-by: Bin Meng Tested-by: Bin Meng --- Changes in v3: - fix a build error - make it [PATCH 4/4] arc

Re: [U-Boot] [PATCH v2 3/4] x86: config option for loading ACPI table from QEMU

2016-01-20 Thread Miao Yan
Hi Bin, 2016-01-20 17:18 GMT+08:00 Bin Meng : > Hi Miao, > > On Wed, Jan 20, 2016 at 5:15 PM, Miao Yan wrote: >> Hi Bin, >> >> 2016-01-20 16:46 GMT+08:00 Bin Meng : >>> On Wed, Jan 20, 2016 at 12:24 PM, Miao Yan wrote: >>>> This patch adds a conf

Re: [U-Boot] [PATCH v2 3/4] x86: config option for loading ACPI table from QEMU

2016-01-20 Thread Miao Yan
Hi Bin, 2016-01-20 16:46 GMT+08:00 Bin Meng : > On Wed, Jan 20, 2016 at 12:24 PM, Miao Yan wrote: >> This patch adds a config option for loading ACPI table from QEMU. When >> enabled, >> U-Boot won't generate ACPI tables, but use those provided by QEMU. >

[U-Boot] [PATCH v2 1/4] x86: qemu: re-structure qemu_fwcfg_list_firmware()

2016-01-19 Thread Miao Yan
Re-write the logic in qemu_fwcfg_list_firmware(), add a function qemu_fwcfg_read_firmware_list() to handle reading firmware list. Signed-off-by: Miao Yan --- Changes in v2: - coding style fix - add comments in header file arch/x86/cpu/qemu/fw_cfg.c| 63

[U-Boot] [PATCH v2 3/4] x86: config option for loading ACPI table from QEMU

2016-01-19 Thread Miao Yan
This patch adds a config option for loading ACPI table from QEMU. When enabled, U-Boot won't generate ACPI tables, but use those provided by QEMU. Signed-off-by: Miao Yan --- arch/x86/Kconfig | 9 + arch/x86/cpu/qemu/Makefile | 2 ++ arch/x86/lib/Makefile | 2 ++ 3

[U-Boot] [PATCH v2 0/4] add support for loading ACPI tables from QEMU

2016-01-19 Thread Miao Yan
- various cleanups Miao Yan (4): x86: qemu: re-structure qemu_fwcfg_list_firmware() x86: qemu: setup PM IO base for ACPI in southbridge x86: config option for loading ACPI table from QEMU x86: qemu: add the ability to load and link ACPI tables from QEMU arch/x86/Kconfig

[U-Boot] [PATCH v2 4/4] x86: qemu: add the ability to load and link ACPI tables from QEMU

2016-01-19 Thread Miao Yan
ned-off-by: Miao Yan --- Changes in v2: - add function comment - improve error handling arch/x86/cpu/qemu/fw_cfg.c| 253 ++ arch/x86/include/asm/fw_cfg.h | 61 ++ arch/x86/lib/acpi_table.c | 4 + 3 files changed, 318 insertions(+) di

[U-Boot] [PATCH v2 2/4] x86: qemu: setup PM IO base for ACPI in southbridge

2016-01-19 Thread Miao Yan
Enable ACPI IO space for piix4 (for pc board) and ich9 (for q35 board) Signed-off-by: Miao Yan --- Changes in v2: - add ACPI_PM1_BASE in Kconfig - drop PCI device ID checks arch/x86/cpu/qemu/Kconfig | 7 +++ arch/x86/cpu/qemu/qemu.c| 29

Re: [U-Boot] [PATCH 2/4] x86: qemu: setup PM IO base for ACPI in southbridge

2016-01-19 Thread Miao Yan
Hi Bin, 2016-01-19 17:25 GMT+08:00 Bin Meng : > Hi Miao, > > On Tue, Jan 19, 2016 at 10:46 AM, Miao Yan wrote: >> Hi Bin, >> >> 2016-01-16 21:23 GMT+08:00 Bin Meng : >>> Hi Miao, >>> >>> On Fri, Jan 15, 2016 at 11:12 AM, Miao Yan wrote:

Re: [U-Boot] [PATCH 1/2] x86: x86-common.h: Add CONFIG_BOOTDELAY

2016-01-18 Thread Miao Yan
2016-01-18 21:49 GMT+08:00 Stefan Roese : > Without this CONFIG_BOOTDELAY, autobooting does not work at all. As > autoboot_command() from common/* will not get called. So lets define > CONFIG_BOOTDELAY, so that auto-booting works on x86. > > Signed-off-by: Stefan Roese > Cc: M

Re: [U-Boot] [PATCH 4/4] x86: qemu: loading ACPI table from QEMU

2016-01-18 Thread Miao Yan
Hi Bin, 2016-01-16 21:24 GMT+08:00 Bin Meng : > Hi Miao, > > On Fri, Jan 15, 2016 at 11:12 AM, Miao Yan wrote: >> If CONFIG_GENERATE_ACPI_TABLE is not defined, then use ACPI table created >> by QEMU. >> >> Signed-off-by: Miao Yan >> --- >> arch/x86

Re: [U-Boot] [PATCH 2/4] x86: qemu: setup PM IO base for ACPI in southbridge

2016-01-18 Thread Miao Yan
Hi Bin, 2016-01-16 21:23 GMT+08:00 Bin Meng : > Hi Miao, > > On Fri, Jan 15, 2016 at 11:12 AM, Miao Yan wrote: >> Enable ACPI IO space for piix4 (for pc board) and ich9 (for q35 board) >> >> Signed-off-by: Miao Yan >> --- >> arch/

Re: [U-Boot] [PATCH 3/4] x86: qemu: add the ability to load and link ACPI tables from QEMU

2016-01-18 Thread Miao Yan
Hi Bin, 2016-01-16 21:24 GMT+08:00 Bin Meng : > Hi Miao, > > On Fri, Jan 15, 2016 at 11:12 AM, Miao Yan wrote: >> This patch adds the ability to load and link ACPI tables provided by QEMU. >> QEMU tells guests how to load and patch ACPI tables through its fw_cfg >

[U-Boot] [PATCH 3/4] x86: qemu: add the ability to load and link ACPI tables from QEMU

2016-01-14 Thread Miao Yan
ned-off-by: Miao Yan --- arch/x86/cpu/qemu/fw_cfg.c| 214 ++ arch/x86/include/asm/fw_cfg.h | 70 ++ 2 files changed, 284 insertions(+) diff --git a/arch/x86/cpu/qemu/fw_cfg.c b/arch/x86/cpu/qemu/fw_cfg.c index b22026c..755676c 100644 ---

[U-Boot] [PATCH 4/4] x86: qemu: loading ACPI table from QEMU

2016-01-14 Thread Miao Yan
If CONFIG_GENERATE_ACPI_TABLE is not defined, then use ACPI table created by QEMU. Signed-off-by: Miao Yan --- arch/x86/lib/tables.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c index 14b15cf..1671385 100644 --- a/arch/x86

[U-Boot] [PATCH 2/4] x86: qemu: setup PM IO base for ACPI in southbridge

2016-01-14 Thread Miao Yan
Enable ACPI IO space for piix4 (for pc board) and ich9 (for q35 board) Signed-off-by: Miao Yan --- arch/x86/cpu/qemu/qemu.c| 39 + arch/x86/include/asm/arch-qemu/device.h | 8 +++ 2 files changed, 47 insertions(+) diff --git a/arch/x86/cpu

[U-Boot] [PATCH 1/4] x86: qemu: re-structure qemu_fwcfg_list_firmware()

2016-01-14 Thread Miao Yan
Re-write the logic in qemu_fwcfg_list_firmware(), add a function qemu_cfg_read_firmware_list() to handle reading firmware list. Signed-off-by: Miao Yan --- arch/x86/cpu/qemu/fw_cfg.c| 60 +-- arch/x86/include/asm/fw_cfg.h | 8 ++ 2 files changed

[U-Boot] [PATCH 0/4] add support for loading ACPI tables from QEMU

2016-01-14 Thread Miao Yan
Currently, if CONFIG_GENERATE_ACPI_TABLE is defined, U-Boot will generate ACPI tables itlself, this patchset adds the ability to load the ACPI tables generated by QEMU. Miao Yan (4): x86: qemu: re-structure qemu_fwcfg_list_firmware() x86: qemu: setup PM IO base for ACPI in southbridge x86

Re: [U-Boot] [PATCH v6 0/8] x86: qemu: add fw_cfg interface support for qemu-x86 targets

2016-01-11 Thread Miao Yan
Hi Bin, 2016-01-07 17:31 GMT+08:00 Miao Yan : > The fw_cfg interface provided by QEMU allow guests to retrieve various > information > about the system, e.g. cpu number, variaous firmware data, kernel setup, etc. > The > fw_cfg interface can be accessed through 3 IO ports (on x86

[U-Boot] [PATCH v6 8/8] x86: qemu: add documentaion for the fw_cfg interface

2016-01-07 Thread Miao Yan
Document the usage of 'qfw' command Signed-off-by: Miao Yan Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- doc/README.x86 | 34 +++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/doc/README.x86 b/doc/README.x86 index 1271e5e..36aa

[U-Boot] [PATCH v6 4/8] x86: fix a typo in function name

2016-01-07 Thread Miao Yan
Rename 'find_cpu_by_apid_id' to 'find_cpu_by_apic_id'. This should be a typo. Signed-off-by: Miao Yan Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/cpu/mp_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/cpu/mp_i

[U-Boot] [PATCH v6 6/8] x86: qemu: fix cpu device in smp boot

2016-01-07 Thread Miao Yan
online CPU number at runtime, and dynamically adds 'cpu' device to U-Boot's driver model. Signed-off-by: Miao Yan Reviewed-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Bin Meng --- Changes in v6: - remove cpu_qemu_bind arc

[U-Boot] [PATCH v6 2/8] x86: qemu: add fw_cfg support

2016-01-07 Thread Miao Yan
The QEMU fw_cfg interface allows the guest to retrieve various data information from QEMU. For example, APCI/SMBios tables, number of online cpus, kernel data and command line, etc. This patch adds support for QEMU fw_cfg interface. Signed-off-by: Miao Yan Reviewed-by: Simon Glass Reviewed-by

[U-Boot] [PATCH v6 0/8] x86: qemu: add fw_cfg interface support for qemu-x86 targets

2016-01-07 Thread Miao Yan
relies on the cpu node hard-coded in dts files. Changes in v6: - fix oneline comment - do not update bootargs when kernel cmdline only contains '\0' Miao Yan (8): x86: adjust ramdisk load address x86: qemu: add fw_cfg support x86: qemu: add a cpu uclass driver for qemu targ

Re: [U-Boot] [PATCH] net: e1000: Fix packet length conversion

2016-01-06 Thread Miao Yan
Hi Lian, 2016-01-06 16:41 GMT+08:00 Minghuan Lian : > The length of the receiving packet descriptor is a 16bit integer > not 32bit. le32_to_cpu should be replaced by le16_to_cpu to > make the correct conversion. Otherwise, e1000 cannot work on > some kinds of big-endian platform. This is a dupli

Re: [U-Boot] [PATCH v5 6/8] x86: qemu: fix cpu device in smp boot

2016-01-05 Thread Miao Yan
2016-01-06 8:25 GMT+08:00 Simon Glass : > On 4 January 2016 at 01:00, Miao Yan wrote: >> Currently, when booting with more that one CPU enabled, U-Boot scans >> 'cpu' node in device tree and calculates CPU number. This does not scale >> well as changing CPU number a

[U-Boot] [PATCH v5 8/8] x86: qemu: add documentaion for the fw_cfg interface

2016-01-04 Thread Miao Yan
Document the usage of 'qfw' command Signed-off-by: Miao Yan Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v5: - maximum supported is 255 now which is imposed by QEMU - 'fw' to 'qfw' doc/README.x86 | 34 +++---

[U-Boot] [PATCH v5 6/8] x86: qemu: fix cpu device in smp boot

2016-01-04 Thread Miao Yan
online CPU number at runtime, and dynamically adds 'cpu' device to U-Boot's driver model. Signed-off-by: Miao Yan --- arch/x86/cpu/mp_init.c | 73 + arch/x86/cpu/qemu/cpu.c | 5 2 files changed, 73 insertions(+), 5 deletions(-)

[U-Boot] [PATCH v5 7/8] x86: qemu: remove cpu node in device tree

2016-01-04 Thread Miao Yan
Remove 'cpu' node in device tree for QEMU targets, and let U-Boot detect and fix up those information at runtime. Signed-off-by: Miao Yan --- arch/x86/dts/qemu-x86_i440fx.dts | 7 --- arch/x86/dts/qemu-x86_q35.dts| 7 --- 2 files changed, 14 deletions(-) diff --git a/ar

[U-Boot] [PATCH v5 3/8] x86: qemu: add a cpu uclass driver for qemu target

2016-01-04 Thread Miao Yan
to directly read online cpu number from firmware. Signed-off-by: Miao Yan Reviewed-by: Bin Meng Reviewed-by: Simon Glass --- arch/x86/cpu/qemu/Makefile | 2 +- arch/x86/cpu/qemu/cpu.c | 57 arch/x86/dts/qemu-x86_i440fx.dts | 4 +-- arch

  1   2   >