[PULL 0/7] loongarch-to-apply queue

Song Gao posted 7 patches 1 month, 3 weeks ago
There is a newer version of this series
hw/acpi/generic_event_device.c         |   6 +-
hw/loongarch/boot.c                    | 321 +++++++++++++++++++++------------
hw/loongarch/meson.build               |   2 +-
hw/loongarch/virt.c                    |  39 ++++
include/hw/acpi/generic_event_device.h |   7 +-
include/hw/loongarch/boot.h            | 106 +++++++++--
include/hw/loongarch/virt.h            |   1 -
target/loongarch/arch_dump.c           |   6 +-
8 files changed, 342 insertions(+), 146 deletions(-)
[PULL 0/7] loongarch-to-apply queue
Posted by Song Gao 1 month, 3 weeks ago
The following changes since commit 3b14a767eaca3df5534a162851f04787b363670e:

  Merge tag 'qemu-openbios-20240924' of https://github.com/mcayland/qemu into staging (2024-09-28 12:34:44 +0100)

are available in the Git repository at:

  https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240929

for you to fetch changes up to f7c8ef7bad7495d8c84b262a8b243efe39e56b13:

  hw/loongarch/fw_cfg: Build in common_ss[] (2024-09-29 16:22:56 +0800)

----------------------------------------------------------------
pull-loongarch-20240929

----------------------------------------------------------------
Bibo Mao (3):
      acpi: ged: Add macro for acpi sleep control register
      hw/loongarch/virt: Add FDT table support with acpi ged pm register
      target/loongarch: Avoid bits shift exceeding width of bool type

Jiaxun Yang (2):
      hw/loongarch/boot: Refactor EFI booting protocol generation
      hw/loongarch/boot: Rework boot code generation

Philippe Mathieu-Daudé (2):
      hw/loongarch/virt: Remove unnecessary 'cpu.h' inclusion
      hw/loongarch/fw_cfg: Build in common_ss[]

 hw/acpi/generic_event_device.c         |   6 +-
 hw/loongarch/boot.c                    | 321 +++++++++++++++++++++------------
 hw/loongarch/meson.build               |   2 +-
 hw/loongarch/virt.c                    |  39 ++++
 include/hw/acpi/generic_event_device.h |   7 +-
 include/hw/loongarch/boot.h            | 106 +++++++++--
 include/hw/loongarch/virt.h            |   1 -
 target/loongarch/arch_dump.c           |   6 +-
 8 files changed, 342 insertions(+), 146 deletions(-)


Re: [PULL 0/7] loongarch-to-apply queue
Posted by Peter Maydell 1 month, 3 weeks ago
On Sun, 29 Sept 2024 at 09:35, Song Gao <gaosong@loongson.cn> wrote:
>
> The following changes since commit 3b14a767eaca3df5534a162851f04787b363670e:
>
>   Merge tag 'qemu-openbios-20240924' of https://github.com/mcayland/qemu into staging (2024-09-28 12:34:44 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240929
>
> for you to fetch changes up to f7c8ef7bad7495d8c84b262a8b243efe39e56b13:
>
>   hw/loongarch/fw_cfg: Build in common_ss[] (2024-09-29 16:22:56 +0800)
>
> ----------------------------------------------------------------
> pull-loongarch-20240929
>
> ----------------------------------------------------------------

Hi; this fails to build on 32-bit hosts:


https://gitlab.com/qemu-project/qemu/-/jobs/7953018819
https://gitlab.com/qemu-project/qemu/-/jobs/7953018846

../hw/loongarch/boot.c: In function ‘init_systab_32’:
../hw/loongarch/boot.c:187:10: error: cast to pointer from integer of
different size [-Werror=int-to-pointer-cast]
187 |           ((typeof(p))((uintptr_t)(s) + \
    |            ^
../hw/loongarch/boot.c:201:9: note: in expansion of macro ‘BOOTP_ALIGN_PTR_UP’
201 |      p = BOOTP_ALIGN_PTR_UP(p, start, EFI_TABLE_ALIGN); \
    |          ^~~~~~~~~~~~~~~~~~
../hw/loongarch/boot.c:243:1: note: in expansion of macro ‘EFI_INIT_SYSTAB_GEN’
243 | EFI_INIT_SYSTAB_GEN(32)
    | ^~~~~~~~~~~~~~~~~~~
../hw/loongarch/boot.c:187:10: error: cast to pointer from integer of
different size [-Werror=int-to-pointer-cast]
187 |          ((typeof(p))((uintptr_t)(s) + \
    |           ^

etc.

This happens because if the argument 'n' to BOOTP_ALIGN_PTR_UP()
is a 64-bit type (as EFI_TABLE_ALIGN happens to be) then the
expression ends up being calculated as 64-bits, which is bigger
than the type of a pointer on these hosts.

-- PMM
Re: [PULL 0/7] loongarch-to-apply queue
Posted by gaosong 1 month, 2 weeks ago
在 2024/9/30 下午10:06, Peter Maydell 写道:
> On Sun, 29 Sept 2024 at 09:35, Song Gao <gaosong@loongson.cn> wrote:
>> The following changes since commit 3b14a767eaca3df5534a162851f04787b363670e:
>>
>>    Merge tag 'qemu-openbios-20240924' of https://github.com/mcayland/qemu into staging (2024-09-28 12:34:44 +0100)
>>
>> are available in the Git repository at:
>>
>>    https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240929
>>
>> for you to fetch changes up to f7c8ef7bad7495d8c84b262a8b243efe39e56b13:
>>
>>    hw/loongarch/fw_cfg: Build in common_ss[] (2024-09-29 16:22:56 +0800)
>>
>> ----------------------------------------------------------------
>> pull-loongarch-20240929
>>
>> ----------------------------------------------------------------
> Hi; this fails to build on 32-bit hosts:
>
>
> https://gitlab.com/qemu-project/qemu/-/jobs/7953018819
> https://gitlab.com/qemu-project/qemu/-/jobs/7953018846
>
> ../hw/loongarch/boot.c: In function ‘init_systab_32’:
> ../hw/loongarch/boot.c:187:10: error: cast to pointer from integer of
> different size [-Werror=int-to-pointer-cast]
> 187 |           ((typeof(p))((uintptr_t)(s) + \
>      |            ^
> ../hw/loongarch/boot.c:201:9: note: in expansion of macro ‘BOOTP_ALIGN_PTR_UP’
> 201 |      p = BOOTP_ALIGN_PTR_UP(p, start, EFI_TABLE_ALIGN); \
>      |          ^~~~~~~~~~~~~~~~~~
> ../hw/loongarch/boot.c:243:1: note: in expansion of macro ‘EFI_INIT_SYSTAB_GEN’
> 243 | EFI_INIT_SYSTAB_GEN(32)
>      | ^~~~~~~~~~~~~~~~~~~
> ../hw/loongarch/boot.c:187:10: error: cast to pointer from integer of
> different size [-Werror=int-to-pointer-cast]
> 187 |          ((typeof(p))((uintptr_t)(s) + \
>      |           ^
>
> etc.
>
> This happens because if the argument 'n' to BOOTP_ALIGN_PTR_UP()
> is a 64-bit type (as EFI_TABLE_ALIGN happens to be) then the
> expression ends up being calculated as 64-bits, which is bigger
> than the type of a pointer on these hosts.
>
> -- PMM
Sorry for  the late reply.

@Jiaxun  Could you fix this and update the patch?

Thanks.
Song Gao