[U-Boot] [PATCH] common/image.c: move VxWorks header string out of CONFIG_CMD_ELF

2013-12-27 Thread Miao Yan
Otherwise, when booting VxWorks kernel, the incorrect message will be seen: ARM Unknown OS Kernel Image (uncompressed) Signed-off-by: Miao Yan --- common/image.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/image.c b/common/image.c index b0ae58f..82d6d88

[U-Boot] [PATCH 4/5] common/fdt_support.c: avoid unintended return from fdt_fixup_memory_banks()

2013-09-16 Thread Miao Yan
fdt_fixup_memory_banks() will add and update /memory node in device tree blob. In the case that /memory node doesn't exist, after adding a new one, this function returns error. The correct behavior should be continuing to update its properties. Signed-off-by: Miao Yan --- common/fdt_supp

[U-Boot] [PATCH 1/5] common/cmd_bootm.c: seperate do_bootm_vxworks related code from CONFIG_CMD_ELF.

2013-09-16 Thread Miao Yan
do_bootm_vxworks now is available under the configuration option CONFIG_BOOTM_VXWORKS, thus aligned with other operating systems that supported by bootm command. The bootvx command still depneds on CONFIG_CMD_ELF. Signed-off-by: Miao Yan --- common/cmd_bootm.c | 15 --- 1 file

[U-Boot] [PATCH 0/5] Add device tree support for VxWorks

2013-09-16 Thread Miao Yan
stems. So the do_bootm_vxworks will work as below: #if (libfdt && (ppc || arm)) if (using device tree) boot_vxworks_with_device_tree else #endif bootvx(...); The following patches are rebased on today's master branch (commit 685

[U-Boot] [PATCH 2/5] common/config_defaults.h: make CONFIG_BOOTM_VXWORKS default configuration

2013-09-16 Thread Miao Yan
Signed-off-by: Miao Yan --- include/config_defaults.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/config_defaults.h b/include/config_defaults.h index 567b46c..ad08c1d 100644 --- a/include/config_defaults.h +++ b/include/config_defaults.h @@ -14,6 +14,7 @@ #define

[U-Boot] [PATCH 5/5] doc/README.vxworks: add a document describing the new VxWorks boot interface

2013-09-16 Thread Miao Yan
Signed-off-by: Miao Yan --- doc/README.vxworks | 34 ++ 1 file changed, 34 insertions(+) create mode 100644 doc/README.vxworks diff --git a/doc/README.vxworks b/doc/README.vxworks new file mode 100644 index 000..08c3813 --- /dev/null +++ b/doc

[U-Boot] [PATCH 3/5] common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface.

2013-09-16 Thread Miao Yan
/* EPAPR_MAGIC */, ulong r7 /* IMA size */, ulong r8 /* 0 */, ulong r9 /* 0 */) For ARM, the boot interface is: void (*kernel_entry)(void *fdt_addr) Signed-off-by: Miao Yan --- arch/arm/lib/bootm.c | 21 + arch/powerpc/lib/bootm.c | 52

[U-Boot] [PATCH v2 0/5] Add device tree support for VxWorks

2013-09-17 Thread Miao Yan
ing do_bootm_vxworks only work with new kernels, old kernels can still use 'bootvx' 2) minor fixes to make code more clear Miao Yan (5): common/cmd_bootm.c: seperate do_bootm_vxworks related code from CONFIG_CMD_ELF. common/config_defaults.h: make CONFIG_BOOTM_VXWORKS de

[U-Boot] [PATCH v2 2/5] common/config_defaults.h: make CONFIG_BOOTM_VXWORKS default configuration

2013-09-17 Thread Miao Yan
Signed-off-by: Miao Yan --- Changes for v2: none include/config_defaults.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/config_defaults.h b/include/config_defaults.h index 567b46c..ad08c1d 100644 --- a/include/config_defaults.h +++ b/include/config_defaults.h @@ -14,6 +14,7

[U-Boot] [PATCH v2 5/5] doc/README.vxworks: add a document describing the new VxWorks boot interface

2013-09-17 Thread Miao Yan
Signed-off-by: Miao Yan --- Changes for v2: none doc/README.vxworks | 34 ++ 1 file changed, 34 insertions(+) create mode 100644 doc/README.vxworks diff --git a/doc/README.vxworks b/doc/README.vxworks new file mode 100644 index 000..08c3813 --- /dev/null

[U-Boot] [PATCH v2 1/5] common/cmd_bootm.c: seperate do_bootm_vxworks related code from CONFIG_CMD_ELF.

2013-09-17 Thread Miao Yan
do_bootm_vxworks now is available under the configuration option CONFIG_BOOTM_VXWORKS, thus aligned with other operating systems that supported by bootm command. The bootvx command still depneds on CONFIG_CMD_ELF. Signed-off-by: Miao Yan --- Changes for v2: none common/cmd_bootm.c | 15

[U-Boot] [PATCH v2 3/5] common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface.

2013-09-17 Thread Miao Yan
/* EPAPR_MAGIC */, ulong r7 /* IMA size */, ulong r8 /* 0 */, ulong r9 /* 0 */) For ARM, the boot interface is: void (*kernel_entry)(void *fdt_addr) Signed-off-by: Miao Yan --- Changes for v2: 1) remove legacy do_bootvx code from do_bootm_vxworks, thus making

[U-Boot] [PATCH v2 4/5] common/fdt_support.c: avoid unintended return from fdt_fixup_memory_banks()

2013-09-17 Thread Miao Yan
fdt_fixup_memory_banks() will add and update /memory node in device tree blob. In the case that /memory node doesn't exist, after adding a new one, this function returns error. The correct behavior should be continuing to update its properties. Signed-off-by: Miao Yan --- Changes for v2:

[U-Boot] [PATCH] VxWorks: fixup MAC address for VxWorks

2015-12-02 Thread Miao Yan
VxWorks 7 kernels retrieve 'local-mac-addr' from dtb and use that for NIC MAC address. As a result, when booting the same kernel image on multiple boards, there will be address conflicts. So fixup MAC address when booting VxWorks 7 kernels Signed-off-by: Miao Yan --- common/boot

Re: [U-Boot] [PATCH] VxWorks: fixup MAC address for VxWorks

2015-12-08 Thread Miao Yan
2015-12-02 20:44 GMT+08:00 Bin Meng : > On Wed, Dec 2, 2015 at 3:39 PM, Miao Yan wrote: >> VxWorks 7 kernels retrieve 'local-mac-addr' from dtb and use >> that for NIC MAC address. As a result, when booting the same >> kernel image on multiple boards, there will be

Re: [U-Boot] help - u-boot on powerpc qemu

2015-12-13 Thread Miao Yan
2015-12-13 20:29 GMT+08:00 吴红青 : > hello,i am using u-boot on powerpc qemu,my u-boot version is > u-boot-2016.01-rc2,i make uboot as below: > > cd u-boot-2016.01-rc2 > make clean > make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- qemu-ppce500_defconfig > make ARCH=powerpc CROSS_COMPILE=powerpc-li

Re: [U-Boot] help - u-boot on powerpc qemu

2015-12-21 Thread Miao Yan
e1000 only supports 32bit pci bar, which result in 0 being written and the upper 32bit address is omitted. So include the maintainer here for more info. Note there is another bug in e1000 driver that will hang in BE target, I will send a separate patch to fix that. > ping failed; host 10.33.152

[U-Boot] [PATCH] net: e1000: use correct hepler to do endianess conversion

2015-12-21 Thread Miao Yan
In struct e1000_rx_desc, field 'length' is declared as uint16_t, so use le16_to_cpu() to do endianess conversion. Also drop conversion on 'status' which is declared as uint8_t. Signed-off-by: Miao Yan --- drivers/net/e1000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

[U-Boot] [PATCH] qemu-ppce500: pass 'range_id' around in pci_map_region

2015-12-21 Thread Miao Yan
In pci_map_region(), pass 'range_id' to fdt_read_range(), otherwise the same address will be mapped again in other calls to pci_map_region() Signed-off-by: Miao Yan --- board/freescale/qemu-ppce500/qemu-ppce500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

Re: [U-Boot] [PATCH] net: e1000: use correct hepler to do endianess conversion

2015-12-21 Thread Miao Yan
Hi Bin, 2015-12-21 17:53 GMT+08:00 Bin Meng : > Hi Miao, > > On Mon, Dec 21, 2015 at 5:43 PM, Bin Meng wrote: >> On Mon, Dec 21, 2015 at 5:04 PM, Miao Yan wrote: >>> In struct e1000_rx_desc, field 'length' is declared as >>> uint16_t, so u

[U-Boot] [PATCH v2] net: e1000: use correct helper to do endianness conversion

2015-12-21 Thread Miao Yan
In struct e1000_rx_desc, field 'length' is declared as uint16_t, so use le16_to_cpu() to do endianness conversion. Also drop conversion on 'status' which is declared as uint8_t. Signed-off-by: Miao Yan --- Changes in v2: - fix typos in commit message drivers/net/e100

[U-Boot] [PATCH 1/7] x86: qemu: add fw_cfg support

2015-12-28 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 --- arch/x86/cpu/qemu/Makefile | 2

[U-Boot] [PATCH 3/7] x86: fix a typo in function name

2015-12-28 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 --- arch/x86/cpu/mp_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c index 4334f5b..2f34317 1

[U-Boot] [PATCH 2/7] x86: qemu: add a cpu uclass driver for qemu target

2015-12-28 Thread Miao Yan
@@ +/* + * Copyright (C) 2015, Miao Yan + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include "fw_cfg.h" + +DECLARE_GLOBAL_DATA_PTR; + +int cpu_qemu_bind(struct udevice *dev) +{ + struct cpu_platdata *plat = dev_get_parent_pl

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

2015-12-28 Thread Miao Yan
Document the usage of 'fw' command Signed-off-by: Miao Yan --- doc/README.x86 | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/doc/README.x86 b/doc/README.x86 index 1271e5e..f39c157 100644 --- a/doc/README.x86 +++ b/doc/

[U-Boot] [PATCH 4/7] x86: qemu: use actual CPU number for allocating memory

2015-12-28 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 --- arch/x86/cpu/mp_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c ind

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

2015-12-28 Thread Miao Yan
relies on the cpu node hard-coded in dts files. Miao Yan (7): x86: qemu: add fw_cfg support x86: qemu: add a cpu uclass driver for qemu target x86: fix a typo in function name x86: qemu: use actual CPU number for allocating memory x86: qemu: add qemu_fwcfg_fdt_fixup() x86: qemu: fixu

[U-Boot] [PATCH 6/7] x86: qemu: fixup cpu node in device tree

2015-12-28 Thread Miao Yan
Remove 'cpus' node in dts files for QEMU targets, retrieve cpu number through 'fw_cfg' interface and fixup device tree blob at runtime. Signed-off-by: Miao Yan --- arch/x86/cpu/qemu/qemu.c | 4 arch/x86/dts/qemu-x86_i440fx.dts | 18 +- arch/x86/

[U-Boot] [PATCH 5/7] x86: qemu: add qemu_fwcfg_fdt_fixup()

2015-12-28 Thread Miao Yan
Add a function to fixup 'cpus' node in dts files for qemu target. Signed-off-by: Miao Yan --- arch/x86/cpu/qemu/fw_cfg.c | 66 ++ arch/x86/cpu/qemu/fw_cfg.h | 1 + 2 files changed, 67 insertions(+) diff --git a/arch/x86/cpu/qemu/fw_cfg.c

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

2015-12-28 Thread Miao Yan
amiliar with the acpi part, but if you have a basic configuration to reproduce the error, maybe I can have a try. Thanks, Miao > > > Regards, > Saket Sinha > > > On Mon, Dec 28, 2015 at 2:48 PM, Miao Yan wrote: >> The fw_cfg interface provided by QEMU allow guests to r

Re: [U-Boot] [PATCH 1/7] x86: qemu: add fw_cfg support

2015-12-28 Thread Miao Yan
Hi Bin, 2015-12-29 14:19 GMT+08:00 Bin Meng : > Hi Miao, > > On Mon, Dec 28, 2015 at 5:18 PM, Miao Yan wrote: >> The QEMU fw_cfg interface allows the guest to retrieve various >> data information from QEMU. For example, APCI/SMBios tables, number >> of online cpus, k

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

2015-12-28 Thread Miao Yan
Hi Bin, 2015-12-29 14:19 GMT+08:00 Bin Meng : > Hi Miao, > > nits: please use "x86: qemu" as the tag in the commit title. > > On Mon, Dec 28, 2015 at 5:18 PM, Miao Yan wrote: >> Document the usage of 'fw' command >> >> Si

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

2015-12-28 Thread Miao Yan
Hi Saket, 2015-12-28 18:43 GMT+08:00 Saket Sinha : > Hi Miao, > > Find my response inline. > >> >> The main purpose of my patch is: >> + directly loads kernel from qemu >> + eliminate the cpu number limits in smp boot >> > > Our patches are similar in case of fw_cfg apis support it brings to

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

2015-12-29 Thread Miao Yan
relies on the cpu node hard-coded in dts files. Changes in v2: - rebase to u-boot-x86/next - various cleanups Miao Yan (8): x86: qemu: add fw_cfg support x86: qemu: add a cpu uclass driver for qemu target x86: fix a typo in function name x86: use actual CPU number for allocating me

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

2015-12-29 Thread Miao Yan
/null +++ b/arch/x86/cpu/qemu/cpu.c @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2015, Miao Yan + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include "fw_cfg.h" + +DECLARE_GLOBAL_DATA_PTR; + +int cpu_qemu_bind(struct ud

[U-Boot] [PATCH v2 7/8] x86: reserve more spaces for dtb

2015-12-29 Thread Miao Yan
Reserve more spaces for x86 dtb files. Otherwise when booting on qemu targets, fixing 'cpu' node may fail due to lack of space left in dtb. Signed-off-by: Miao Yan --- arch/x86/dts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/dts/Makefile b/ar

[U-Boot] [PATCH v2 1/8] x86: qemu: add fw_cfg support

2015-12-29 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 --- Changes in v2: - rewrite command

[U-Boot] [PATCH v2 5/8] x86: qemu: add qemu_fwcfg_fdt_fixup()

2015-12-29 Thread Miao Yan
Add a function to fixup 'cpus' node in dts files for qemu target. Signed-off-by: Miao Yan --- Changes in v2: - various cleanups arch/x86/cpu/qemu/fw_cfg.c | 65 ++ arch/x86/cpu/qemu/fw_cfg.h | 11 2 files changed, 76 insertion

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

2015-12-29 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 --- arch/x86/cpu/mp_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c index 4334f5b..2f34317 1

[U-Boot] [PATCH v2 6/8] x86: qemu: fix up cpu node in device tree

2015-12-29 Thread Miao Yan
Remove 'cpus' node in dts files for QEMU targets, retrieve cpu number through 'fw_cfg' interface and fix up device tree blob at runtime. Signed-off-by: Miao Yan --- Changes in v2: - rebase to u-boot-x86/next arch/x86/cpu/qemu/qemu.c | 4 arch/x86/dts/qemu

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

2015-12-29 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 --- Changes in v2: - fix commit message arch/x86/cpu/mp_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/cpu/m

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

2015-12-29 Thread Miao Yan
Document the usage of 'fw' command Signed-off-by: Miao Yan --- Changes in v2: - various cleanup doc/README.x86 | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/doc/README.x86 b/doc/README.x86 index 1271e5e..0687dc1 100644

Re: [U-Boot] [PATCH v2 1/8] x86: qemu: add fw_cfg support

2015-12-29 Thread Miao Yan
2015-12-29 17:45 GMT+08:00 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. &g

[U-Boot] [PATCH v3 1/8] x86: qemu: add fw_cfg support

2015-12-29 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 --- Changes in v2: - rewrite command

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

2015-12-29 Thread Miao Yan
relies on the cpu node hard-coded in dts files. Changes in v2: - rebase to u-boot-x86/next - various cleanups Changes in v3: - fix an error in do_qemu_fw() Miao Yan (8): x86: qemu: add fw_cfg support x86: qemu: add a cpu uclass driver for qemu target x86: fix a typo in function

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

2015-12-29 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 --- arch/x86/cpu/mp_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c index 4334f5b..2f34317 1

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

2015-12-29 Thread Miao Yan
/null +++ b/arch/x86/cpu/qemu/cpu.c @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2015, Miao Yan + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include "fw_cfg.h" + +DECLARE_GLOBAL_DATA_PTR; + +int cpu_qemu_bind(struct ud

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

2015-12-29 Thread Miao Yan
Document the usage of 'fw' command Signed-off-by: Miao Yan --- Changes in v2: - various cleanup doc/README.x86 | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/doc/README.x86 b/doc/README.x86 index 1271e5e..0687dc1 100644

[U-Boot] [PATCH v3 5/8] x86: qemu: add qemu_fwcfg_fdt_fixup()

2015-12-29 Thread Miao Yan
Add a function to fixup 'cpus' node in dts files for qemu target. Signed-off-by: Miao Yan --- Changes in v2: - various cleanups arch/x86/cpu/qemu/fw_cfg.c | 65 ++ arch/x86/cpu/qemu/fw_cfg.h | 11 2 files changed, 76 insertion

[U-Boot] [PATCH v3 7/8] x86: reserve more spaces for dtb

2015-12-29 Thread Miao Yan
Reserve more spaces for x86 dtb files. Otherwise when booting on qemu targets, fixing 'cpu' node may fail due to lack of space left in dtb. Signed-off-by: Miao Yan --- arch/x86/dts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/dts/Makefile b/ar

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

2015-12-29 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 --- Changes in v2: - fix commit message arch/x86/cpu/mp_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/cpu/m

[U-Boot] [PATCH v3 6/8] x86: qemu: fix up cpu node in device tree

2015-12-29 Thread Miao Yan
Remove 'cpus' node in dts files for QEMU targets, retrieve cpu number through 'fw_cfg' interface and fix up device tree blob at runtime. Signed-off-by: Miao Yan --- Changes in v2: - rebase to u-boot-x86/next arch/x86/cpu/qemu/qemu.c | 4 arch/x86/dts/qemu

Re: [U-Boot] [PATCH v3 1/8] x86: qemu: add fw_cfg support

2015-12-30 Thread Miao Yan
Hi Bin, 2015-12-30 12:04 GMT+08:00 Bin Meng : > Hi Miao, > > On Tue, Dec 29, 2015 at 6:35 PM, Miao Yan wrote: >> The QEMU fw_cfg interface allows the guest to retrieve various >> data information from QEMU. For example, APCI/SMBios tables, number >> of online cpus, k

Re: [U-Boot] [PATCH v3 7/8] x86: reserve more spaces for dtb

2015-12-30 Thread Miao Yan
Hi Bin, 2015-12-30 12:04 GMT+08:00 Bin Meng : > Hi Miao, > > On Tue, Dec 29, 2015 at 6:35 PM, Miao Yan wrote: >> Reserve more spaces for x86 dtb files. Otherwise when booting >> on qemu targets, fixing 'cpu' node may fail due to lack >> of space left

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

2015-12-30 Thread Miao Yan
Hi Bin, 2015-12-30 12:04 GMT+08:00 Bin Meng : > Hi Miao, > > On Tue, Dec 29, 2015 at 6:35 PM, Miao Yan wrote: >> Document the usage of 'fw' command >> >> Signed-off-by: Miao Yan >> --- >> Changes in v2: >> - various cleanup >> >&

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

2015-12-30 Thread Miao Yan
@@ +/* + * Copyright (C) 2015, Miao Yan + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include "fw_cfg.h" + +DECLARE_GLOBAL_DATA_PTR; + +int cpu_qemu_bind(struct udevice *dev) +{ + struct cpu_platdata *plat = dev_get_parent_pl

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

2015-12-30 Thread Miao Yan
relies on the cpu node hard-coded in dts files. Changes in v4: - drop [PATCH v3 7/8] and limit maximum supported cpu number - chance 'fw load' to take second parameter for initrd load address - change default initrd load address for qemu-x86 Miao Yan (8): x86: qemu: add fw_cfg

[U-Boot] [PATCH v4 1/8] x86: qemu: add fw_cfg support

2015-12-30 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 --- Changes in v4: - cleanups

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

2015-12-30 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 --- arch/x86/cpu/mp_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c index 4334f5b..2f34317 1

[U-Boot] [PATCH v4 7/8] x86: qemu: adjust ramdisk load address

2015-12-30 Thread Miao Yan
By default, ramdisk load address is defined to 0200 in env string. When loading bzImage to 10 (default address), there's a chance that the ramdisk header would be overwritten by the kernel. Thus increase the gap and make ramdisk load at 0400 by default. Signed-off-by: Mia

[U-Boot] [PATCH v4 5/8] x86: qemu: add qemu_fwcfg_fdt_fixup()

2015-12-30 Thread Miao Yan
Add a function to fix up 'cpus' node in dts files for qemu target. Signed-off-by: Miao Yan --- Changes in v4: - fix a typo in commit log arch/x86/cpu/qemu/fw_cfg.c | 65 ++ arch/x86/cpu/qemu/fw_cfg.h | 11 2 files changed, 76

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

2015-12-30 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 --- arch/x86/cpu/mp_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c ind

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

2015-12-30 Thread Miao Yan
Document the usage of 'fw' command Signed-off-by: Miao Yan --- Changes in v4: - limit maximum supported cpu number to 32 doc/README.x86 | 35 --- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/doc/README.x86 b/doc/README.x86 ind

[U-Boot] [PATCH v4 6/8] x86: qemu: fix up cpu node in device tree

2015-12-30 Thread Miao Yan
Remove 'cpus' node in dts files for QEMU targets, retrieve cpu number through 'fw_cfg' interface and fix up device tree blob at runtime. Signed-off-by: Miao Yan --- arch/x86/cpu/qemu/qemu.c | 4 arch/x86/dts/qemu-x86_i440fx.dts | 19 +-- arch/

Re: [U-Boot] [PATCH v4 1/8] x86: qemu: add fw_cfg support

2015-12-31 Thread Miao Yan
Hi Simon, 2015-12-31 13:07 GMT+08:00 Simon Glass : > Hi Miao, > > On 30 December 2015 at 19:55, Miao Yan wrote: >> The QEMU fw_cfg interface allows the guest to retrieve various >> data information from QEMU. For example, APCI/SMBios tables, number >> of online cpus, k

Re: [U-Boot] [PATCH v4 5/8] x86: qemu: add qemu_fwcfg_fdt_fixup()

2015-12-31 Thread Miao Yan
Hi Simon, 2015-12-31 13:08 GMT+08:00 Simon Glass : > Hi Maio, > > On 30 December 2015 at 19:55, Miao Yan wrote: >> Add a function to fix up 'cpus' node in dts files for qemu target. >> >> Signed-off-by: Miao Yan >> --- >> Changes in v4: >>

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

2016-01-04 Thread Miao Yan
relies 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: ad

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

2016-01-04 Thread Miao Yan
duces a new configuration item CONFIG_RAMDISK_ADDR for this purpose Signed-off-by: Miao Yan Reviewed-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v5: - move this change to x86-common.h - reorder it to be the first patch include/configs/x86-common.h | 3 ++- 1 file changed, 2 inser

[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 Reviewed-by: Simon Glass Reviewed-by

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

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

2016-01-04 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 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 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(-)

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

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

[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

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

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

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

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

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

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

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

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

  1   2   >