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

Miao Yan yanmiaobest at gmail.com
Mon Dec 28 11:32:19 CET 2015


2015-12-28 18:05 GMT+08:00 Saket Sinha <saket.sinha89 at gmail.com>:
> Hi Miao,
>
> Thanks for the patches.
>
> I made an initial attempt to support the fw_cfg in U-boot for QEMU to
> get acpi tables by fw_cfg for qemu-x86 targets.
>
> The idea was if we find acpi tables in fw_cfg try loading them,
> otherwise fallback to the builtin acpi tables.
>
> The patch was dropped mainly because ACPI tables loaded by fw_cfg had
> some issues which I could not figure out.
> The patches were discussed(me, Simon and Bin) offline(off the mailing
> list), so I am forwarding it to you and the community.
>
> If we can collaborate the patches in the sense that we are able to
> load ACPI tables(and other tables) successfully, it would be great.

The main purpose of my patch is:
  + directly loads kernel from qemu
  + eliminate the cpu number limits in smp boot

I am not familiar 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 <yanmiaobest at gmail.com> wrote:
>> 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), using x86 in/out
>> instructions.
>>
>>   - 0x510: select configuration items to access
>>   - 0x511: reading this port will return data selected in 0x510
>>   - 0x514: this can be used to detect if DMA interface is available
>>
>> If fw_cfg DMA interface is available, it can be used to accelerate
>> accesses.
>>
>> This patchset adds the following supports for qemu-x86 targets:
>>
>>   + the fw_cfg driver itself
>>
>>   + add a U-Boot command 'fw' to support direct accessing kernel informtion
>>     from fw_cfg interface, this saves the time of loading them from hard disk or
>>     network again, through emulated devices.
>>
>>   + use fw_cfg to get cpu number at runtime, so smp boot no longer 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: fixup cpu node in device tree
>>   qemu-x86: add documentaion for the fw_cfg interface
>>
>>  arch/x86/cpu/mp_init.c           |  12 +-
>>  arch/x86/cpu/qemu/Makefile       |   2 +-
>>  arch/x86/cpu/qemu/cpu.c          |  58 ++++++++
>>  arch/x86/cpu/qemu/fw_cfg.c       | 281 +++++++++++++++++++++++++++++++++++++++
>>  arch/x86/cpu/qemu/fw_cfg.h       |  85 ++++++++++++
>>  arch/x86/cpu/qemu/qemu.c         |   7 +
>>  arch/x86/dts/qemu-x86_i440fx.dts |  18 +--
>>  arch/x86/dts/qemu-x86_q35.dts    |  19 +--
>>  doc/README.x86                   |  36 ++++-
>>  9 files changed, 473 insertions(+), 45 deletions(-)
>>  create mode 100644 arch/x86/cpu/qemu/cpu.c
>>  create mode 100644 arch/x86/cpu/qemu/fw_cfg.c
>>  create mode 100644 arch/x86/cpu/qemu/fw_cfg.h
>>
>> --
>> 1.9.1
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot


More information about the U-Boot mailing list