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

[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 <yanmiaob...@gmail.com> --- Changes in v3: - fix config option order configs/sandbox_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/sandbox_defconfig b/c

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- C

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- Changes in v3: - none arch/x86/cpu/qemu/acpi_t

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- Changes in v3: - none arch/x86/cpu/q

[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 <yanmi

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- Changes in v3: - squash with patch v2 #13 arch/x86/cpu/mp_init.c| 2 +- arch/x86/cpu/qemu/acpi_table.

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- 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

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- Changes in v3: - none cmd/qemu_fw_cf

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- Changes in v3: - none arch/x86/cpu/qemu/qemu.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-)

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

2016-05-22 Thread Miao Yan
ation", 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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- Changes in v3: - none cmd/qemu_fw_cfg.c | 25 ++--- include/q

[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-20 Thread Miao Yan
Hi Bin, 2016-05-20 10:29 GMT+08:00 Bin Meng <bmeng...@gmail.com>: > Hi Miao, > > On Fri, May 20, 2016 at 10:06 AM, Miao Yan <yanmiaob...@gmail.com> wrote: >> Hi Bin, >> >> 2016-05-19 17:08 GMT+08:00 Bin Meng <bmeng...@gmail.com>: >>> Hi M

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 <bmeng...@gmail.com>: > Hi Miao, > > On Fri, May 20, 2016 at 10:07 AM, Miao Yan <yanmiaob...@gmail.com> wrote: >> Hi Bin, >> >> 2016-05-19 17:08 GMT+08:00 Bin Meng <bmeng...@gmail.com>: >>> Hi Miao, >>&

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 <bmeng...@gmail.com>: > 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 <yanmiaob...@gmail.com> wrote: >> Align macro names with th

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 <bmeng...@gmail.com>: > Hi Miao, > > On Wed, May 18, 2016 at 5:40 PM, Miao Yan <yanmiaob...@gmail.com> wrote: >> This patch enables qfw and cmd_qfw on sandbox for build coverage test >> >> Signed-

[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 <yanmiaob...@gmail.com> --- configs/sandbox_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index afdf4a3..f19308d

[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 <yanmiaob...@gmai.com> --- cmd/Kconfig| 2 +- cmd/Makefile | 2 +- configs/qemu-x86_defconfig | 2 +- drivers/misc/Kconfig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- arch/x86/cpu/qemu/acpi_t

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- cmd

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- arch/x86/cpu/qemu/qemu.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/x86/cpu/q

[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 <yanmiaob...@gmail.com> --- arch/x86/cpu/qemu/Makefile | 3 +-- arch/x86/cpu/qemu/{acpi_table.c => e820.

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- cmd/qemu_fw_cf

[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 <yanmiaob...@gmail.com> --- 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/Ma

[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 <yanmiaob...@gmail.com> --- 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

[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 <yanmi

[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 <yanmiaob...@gmail.com> --- arch/x86/cpu/qemu/acpi_table.

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- cmd/qemu_fw_cfg.c | 25 ++--- include/qemu_fw_cfg.h | 9 ++

[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

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

2016-05-18 Thread Miao Yan
ation", 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 <yanmiaob...@gmail.com> --- Changes in v2: - fix a

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 <tr...@konsulko.com>: > 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 <bmeng...@gmail.com>: >> > Hi Miao, >> > >> > On Fri, May

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 <bmeng...@gmail.com>: > Hi Miao, > > On Fri, May 13, 2016 at 2:29 PM, Miao Yan <yanmiaob...@gmail.com> wrote: >> This patch splits qfw command interface and qfw core function into two >> files, and introduces

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 <tr...@konsulko.com>: > 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 <yanmiaob...@gmail.com> wrote: >> > This patch is part of the qfw refactor

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 <tr...@konsulko.com>: > 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 <yanmiaob...@gmail.com> wrote: >> > The qfw command interface makes use of C

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 <bmeng...@gmail.com>: > Hi Miao, > > On Fri, May 13, 2016 at 2:29 PM, Miao Yan <yanmiaob...@gmail.com> wrote: >> The qfw command interface used to depend on X86, this patch removes >> this restriction so it can

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 <bmeng...@gmail.com>: > Hi Miao, > > On Fri, May 13, 2016 at 2:29 PM, Miao Yan <yanmiaob...@gmail.com> wrote: >> Rename qemu/acpi_table.c to qemu/e820.c, because ACPI stuff is moved >> to qfw core, this file only contai

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 <bmeng...@gmail.com>: > Hi Miao, > > On Fri, May 13, 2016 at 2:29 PM, Miao Yan <yanmiaob...@gmail.com> wrote: >> This patch splits qfw command interface and qfw core function into two >> files, and introduces

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 <bmeng...@gmail.com>: > Hi Miao, > > On Fri, May 13, 2016 at 2:29 PM, Miao Yan <yanmiaob...@gmail.com> wrote: >> CONFIG_GENENRATE_ACPI_TABLE controls the generation of ACPI table which >> uses U-Boot's built-in m

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

2016-05-13 Thread Miao Yan
Make file names aligned with CONFIG_QFW Signed-off-by: Miao Yan <yanmiaob...@gmail.com> --- 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

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

2016-05-13 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 <yanmiaob...@gmail.com> --- arch/x86/cpu/qemu/Makefile | 3 +-- arch/x86/cpu/qemu/acpi_table.

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

2016-05-13 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 <yanmiaob...@gmail.com> --- arch/x86/cpu/qemu/acpi_table.c | 211 - drivers/misc

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

2016-05-13 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 <yanmiaob...@gmail.com> --- cmd/Kconfig | 1 - 1 file changed, 1 deletion(-)

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

2016-05-13 Thread Miao Yan
. Signed-off-by: Miao Yan <yanmiaob...@gmail.com> --- 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

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

2016-05-13 Thread Miao Yan
This patch adds some comments about qfw register endianness for clarity. Signed-off-by: Miao Yan <yanmiaob...@gmail.com> --- 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 d

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

2016-05-13 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 <yanmiaob...@gmail.com> --- cmd/cmd_qfw.c | 13 ++

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

2016-05-13 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 <yanmiaob...@gmail.com> --- arch/x86/cpu/qemu/acpi_table.

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

2016-05-13 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 <yanmi

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

2016-05-13 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 <yanmiaob...@gmail.com> --- cmd/qemu_fw_cfg.c | 37 - include/qemu_fw_cfg.h | 3 +++ 2 files c

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

2016-05-13 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 <yanmiaob...@gmail.com> --- cmd/qemu_fw_cfg.c | 25 ++--- include/qemu_fw_cfg.h | 9 + 2 files changed, 31 insertions(+), 3 del

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

2016-05-13 Thread Miao Yan
ation", 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 <yanmiaob...@gmail.com> --- arch/x86/Kconfi

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

2016-05-13 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

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 <bmeng...@gmail.com>: > Hi Miao, > > On Tue, May 10, 2016 at 10:10 AM, Miao Yan <yanmiaob...@gmail.com> wrote: >>>> >>>> +config CMD_QEMU_FW_CFG >>>> + bool "qfw" >>>> + d

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 <bmeng...@gmail.com>: > Hi Miao, > > On Wed, May 11, 2016 at 10:02 AM, Miao Yan <yanmiaob...@gmail.com> wrote: >> Hi Bin, >> >> 2016-05-10 11:11 GMT+08:00 Bin Meng <bmeng...@gmail.com>: >>> On Mon

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 <bmeng...@gmail.com>: > On Mon, May 9, 2016 at 8:57 PM, Bin Meng <bmeng...@gmail.com> wrote: >> On Mon, May 9, 2016 at 3:27 PM, Miao Yan <yanmiaob...@gmail.com> wrote: >>> CONFIG_GENENRATE_ACPI_TABLE controls the gen

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 <bmeng...@gmail.com>: > Hi Miao, > > On Tue, May 10, 2016 at 12:35 PM, Miao Yan <yanmiaob...@gmail.com> wrote: >> 2016-05-10 11:08 GMT+08:00 Bin Meng <bmeng...@gmail.com>: >>> On Tue, May 10, 2016 at 10:

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

2016-05-09 Thread Miao Yan
>>> > Signed-off-by: Tom Rini <tr...@konsulko.com> >>> > --- >>> > Changes in v2: >>> > - Depend on X86 (per Miao Yan) >>> > --- >>> > arch/x86/cpu/mp_init.c | 2 +- >>> > arch/x8

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 > >

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

2016-05-09 Thread Miao Yan
ation", 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 <yanmiaob...@gmail.com> --- arch/x86/Kconf

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

2016-05-09 Thread Miao Yan
> Signed-off-by: Tom Rini <tr...@konsulko.com> > --- > 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_

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

2016-05-02 Thread Miao Yan
> diff --git a/arch/x86/cpu/qemu/acpi_table.c b/arch/x86/cpu/qemu/acpi_table.c > new file mode 100644 > index 000..49381ac > --- /dev/null > +++ b/arch/x86/cpu/qemu/acpi_table.c > @@ -0,0 +1,243 @@ > +/* > + * (C) Copyright 2015 Miao Yan <yanmiaob...@gmail.com> > + *

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

2016-04-13 Thread Miao Yan
gt; > diff --git a/arch/x86/cpu/qemu/fw_cfg.c b/arch/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 <yanmiaoe...@gmail.com> > + * (C) Copyri

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 <bmeng...@gmail.com>: > Hi Miao, > > On Wed, Jan 20, 2016 at 5:15 PM, Miao Yan <yanmiaob...@gmail.com> wrote: >> Hi Bin, >> >> 2016-01-20 16:46 GMT+08:00 Bin Meng <bmeng...@gmail.com>: >>>

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 <bmeng...@gmail.com>: > On Wed, Jan 20, 2016 at 12:24 PM, Miao Yan <yanmiaob...@gmail.com> wrote: >> This patch adds a config option for loading ACPI table from QEMU. When >> enabled, >> U-Boot won't generate ACPI table

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> Tested-by: Bin Meng <bmeng...@gmail.com> --- 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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> Tested-by: Bin Meng <bmeng...@gmail.com>

[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 <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> Tested-by: Bin Meng <bmeng...@gmail.com> --- arch/x86/cpu/qemu/Kconfig | 7 +++ arch/x

[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 3/4] x86: qemu: add the ability to load and link ACPI tables from QEMU

2016-01-20 Thread Miao Yan
-by: Miao Yan <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> Tested-by: Bin Meng <bmeng...@gmail.com> --- Change in v3: - fix a build error - make it [PATCH 3/4] arch/x86/cpu/qemu/Makefile| 2 + arch/x86/cpu/qemu

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 <bmeng...@gmail.com>: > Hi Miao, > > On Tue, Jan 19, 2016 at 10:46 AM, Miao Yan <yanmiaob...@gmail.com> wrote: >> Hi Bin, >> >> 2016-01-16 21:23 GMT+08:00 Bin Meng <bmeng...@gmail.com>: >>> Hi Mi

[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
-by: Miao Yan <yanmiaob...@gmail.com> --- 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 change

[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 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 <yanmiaob...@gmail.com> --- Changes in v2: - coding style fix - add comments in header file arch/x86/cpu/qemu/fw_cfg.c

[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 <yanmiaob...@gmail.com> --- arch/x86/Kconfig | 9 + arch/x86/cpu/qemu/Makefile | 2 ++ arch/x

[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 <yanmiaob...@gmail.com> --- Changes in v2: - add ACPI_PM1_BASE in Kconfig - drop PCI device ID checks arch/x86/cpu/qemu/Kconfig | 7 +++ arch/x86/cpu/qemu/

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 <bmeng...@gmail.com>: > Hi Miao, > > On Fri, Jan 15, 2016 at 11:12 AM, Miao Yan <yanmiaob...@gmail.com> wrote: >> This patch adds the ability to load and link ACPI tables provided by QEMU. >> QEMU tells guests how to l

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 <bmeng...@gmail.com>: > Hi Miao, > > On Fri, Jan 15, 2016 at 11:12 AM, Miao Yan <yanmiaob...@gmail.com> wrote: >> If CONFIG_GENERATE_ACPI_TABLE is not defined, then use ACPI table created >> by QEMU. >> >> S

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 <bmeng...@gmail.com>: > Hi Miao, > > On Fri, Jan 15, 2016 at 11:12 AM, Miao Yan <yanmiaob...@gmail.com> wrote: >> Enable ACPI IO space for piix4 (for pc board) and ich9 (for q35 board) >> >> Signed-

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

2016-01-18 Thread Miao Yan
n Roese <s...@denx.de> > Cc: Miao Yan <yanmiaob...@gmail.com> > Cc: Bin Meng <bmeng...@gmail.com> > Cc: Simon Glass <s...@chromium.org> > --- > include/configs/x86-common.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/configs

[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 <yanmiaob...@gmail.com> --- arch/x86/cpu/qemu/qemu.c| 39 + arch/x86/include/asm/arch-qemu/device.h | 8 +++ 2 files changed, 47 insertions(+)

[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 <yanmiaob...@gmail.com> --- arch/x86/cpu/qemu/fw_cfg.c| 60 +-- arch/x86/include/asm/fw_cfg.

[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

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

2016-01-14 Thread Miao Yan
-by: Miao Yan <yanmiaob...@gmail.com> --- 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..7

[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 <yanmiaob...@gmail.com> --- 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 1

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 <yanmiaob...@gmail.com>: > 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 access

[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 <yanmiaob...@gmail.com> Re

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

2016-01-07 Thread Miao Yan
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 target x86: fix a typo

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

2016-01-07 Thread Miao Yan
number at runtime, and dynamically adds 'cpu' device to U-Boot's driver model. Signed-off-by: Miao Yan <yanmiaob...@gmail.com> Reviewed-by: Simon Glass <s...@chromium.org> Reviewed-by: Bin Meng <bmeng...@gmail.com> Tested-by: Bin Meng <bmeng...@gmail.com> --- Changes in v6:

[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 <yanmiaob...@gmail.com> Reviewed-by: Simon Glass <s...@chromium.org> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- doc/README.x86 | 34 +++--- 1 file changed, 31 insertions(+), 3 deleti

[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 <yanmiaob...@gmail.com> Reviewed-by: Simon Glass <s...@chromium.org> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- arch/x86/cpu/mp_init.c | 6 +++--- 1 file changed,

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

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 <s...@chromium.org>: > On 4 January 2016 at 01:00, Miao Yan <yanmiaob...@gmail.com> wrote: >> Currently, when booting with more that one CPU enabled, U-Boot scans >> 'cpu' node in device tree and calculates CPU number. This does no

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

2016-01-04 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 <yanmiaob...@gmail.com> Re

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

2016-01-04 Thread Miao Yan
on the cpu node hard-coded in dts files. Changes in v5: + change 'fw' to 'qfw' + dynamically bind cpu device instead of fixing device tree blob + various cleanups Miao Yan (8): x86: adjust ramdisk load address x86: qemu: add fw_cfg support x86: qemu: add a cpu uclass driver for qemu

[U-Boot] [PATCH v5 1/8] x86: adjust ramdisk load address

2016-01-04 Thread Miao Yan
a new configuration item CONFIG_RAMDISK_ADDR for this purpose Signed-off-by: Miao Yan <yanmiaob...@gmail.com> Reviewed-by: Bin Meng <bmeng...@gmail.com> Reviewed-by: Simon Glass <s...@chromium.org> --- Changes in v5: - move this change to x86-common.h - reorder it to

[U-Boot] [PATCH v5 5/8] x86: use actual CPU number for allocating memory

2016-01-04 Thread Miao Yan
Use actual CPU number, instead of maximum cpu configured, to allocate stack memory in 'load_sipi_vector' Signed-off-by: Miao Yan <yanmiaob...@gmail.com> Reviewed-by: Simon Glass <s...@chromium.org> Reviewed-by: Bin Meng <bmeng...@gmail.com> --- arch/x86/cpu/mp_init.c | 6 +++-

  1   2   >