e376c2d8 | 27-Sep-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/loongarch/fw_cfg: Build in common_ss[]
Nothing in LoongArch fw_cfg.c requires target specific definitions.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Song Gao <gaoson
hw/loongarch/fw_cfg: Build in common_ss[]
Nothing in LoongArch fw_cfg.c requires target specific definitions.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240927213254.17552-3-philmd@linaro.org> Signed-off-by: Song Gao <gaosong@loongson.cn>
show more ...
|
45d1fe46 | 07-Sep-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/loongarch: Add acpi SPCR table support
Serial port console redirection table can be used for default serial port selection, like chosen stdout-path selection with FDT method.
With acpi SPCR tabl
hw/loongarch: Add acpi SPCR table support
Serial port console redirection table can be used for default serial port selection, like chosen stdout-path selection with FDT method.
With acpi SPCR table added, early debug console can be parsed from SPCR table with simple kernel parameter earlycon rather than earlycon=uart,mmio,0x1fe001e0
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240907073037.243353-1-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
show more ...
|
d9bd1ccb | 05-Sep-2024 |
Jason A. Donenfeld <Jason@zx2c4.com> |
hw/loongarch: virt: pass random seed to fdt
If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to initialize early. Set this using the usual guest random number generation function
hw/loongarch: virt: pass random seed to fdt
If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to initialize early. Set this using the usual guest random number generation function.
This is the same procedure that's done in b91b6b5a2c ("hw/microblaze: pass random seed to fdt"), e4b4f0b71c ("hw/riscv: virt: pass random seed to fdt"), c6fe3e6b4c ("hw/openrisc: virt: pass random seed to fdt"), 67f7e426e5 ("hw/i386: pass RNG seed via setup_data entry"), c287941a4d ("hw/rx: pass random seed to fdt"), 5e19cc68fb ("hw/mips: boston: pass random seed to fdt"), 6b23a67916 ("hw/nios2: virt: pass random seed to fdt") c4b075318e ("hw/ppc: pass random seed to fdt"), and 5242876f37 ("hw/arm/virt: dt: add rng-seed property").
These earlier commits later were amended to rerandomize the RNG seed on snapshot load, but the LoongArch code somehow already does that, despite not having this patch here, presumably due to some lucky copy and pasting.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240905153316.2038769-1-Jason@zx2c4.com> Signed-off-by: Song Gao <gaosong@loongson.cn>
show more ...
|
b3d4ef83 | 07-Sep-2024 |
Jason A. Donenfeld <Jason@zx2c4.com> |
hw/loongarch: virt: support up to 4 serial ports
In order to support additional channels of communication using `-serial`, add several serial ports, up to the standard 4 generally supported by the 8
hw/loongarch: virt: support up to 4 serial ports
In order to support additional channels of communication using `-serial`, add several serial ports, up to the standard 4 generally supported by the 8250 driver.
Fixed: https://lore.kernel.org/all/20240907143439.2792924-1-Jason@zx2c4.com/
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Tested-by: Bibo Mao <maobibo@loongson.cn> [gaosong: ACPI uart need't reverse order] Signed-off-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240907143439.2792924-1-Jason@zx2c4.com>
show more ...
|
5efbc384 | 11-Jun-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/loongarch/virt: Remove unused assignment
There is abuse usage about local variable gap. Remove duplicated assignment and solve Coverity reported error.
Resolves: Coverity CID 1546441 Fixes: 3cc4
hw/loongarch/virt: Remove unused assignment
There is abuse usage about local variable gap. Remove duplicated assignment and solve Coverity reported error.
Resolves: Coverity CID 1546441 Fixes: 3cc451cbce ("hw/loongarch: Refine fwcfg memory map") Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240612033637.167787-1-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
show more ...
|
0aca7364 | 23-Jun-2024 |
Xianglai Li <lixianglai@loongson.cn> |
hw/loongarch: Change the tpm support by default
Add devices that support tpm by default, Fixed incomplete tpm acpi table information.
Signed-off-by: Xianglai Li <lixianglai@loongson.cn> Reviewed-by
hw/loongarch: Change the tpm support by default
Add devices that support tpm by default, Fixed incomplete tpm acpi table information.
Signed-off-by: Xianglai Li <lixianglai@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240624032300.999157-1-lixianglai@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
show more ...
|
d4fdb05b | 28-Feb-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug()
'legacy_align' is always NULL, remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <th
hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug()
'legacy_align' is always NULL, remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20240617071118.60464-15-philmd@linaro.org>
show more ...
|
2b284fa9 | 28-May-2024 |
Song Gao <gaosong@loongson.cn> |
hw/loongarch/virt: Enable extioi virt extension
This patch adds a new board attribute 'v-eiointc'. A value of true enables the virt extended I/O interrupt controller. VMs working in kvm mode have 'v
hw/loongarch/virt: Enable extioi virt extension
This patch adds a new board attribute 'v-eiointc'. A value of true enables the virt extended I/O interrupt controller. VMs working in kvm mode have 'v-eiointc' enabled by default.
Signed-off-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Bibo Mao <maobibo@loongson.cn> Message-Id: <20240528083855.1912757-4-gaosong@loongson.cn>
show more ...
|
f2e61edb | 28-May-2024 |
Song Gao <gaosong@loongson.cn> |
hw/loongarch/virt: Use MemTxAttrs interface for misc ops
Use MemTxAttrs interface read_with_attrs/write_with_attrs for virt_iocsr_misc_ops.
Signed-off-by: Song Gao <gaosong@loongson.cn> Reviewed-by
hw/loongarch/virt: Use MemTxAttrs interface for misc ops
Use MemTxAttrs interface read_with_attrs/write_with_attrs for virt_iocsr_misc_ops.
Signed-off-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Bibo Mao <maobibo@loongson.cn> Message-Id: <20240528083855.1912757-3-gaosong@loongson.cn>
show more ...
|
dc6f37eb | 28-May-2024 |
Song Gao <gaosong@loongson.cn> |
hw/intc/loongarch_extioi: Add extioi virt extension definition
On LoongArch, IRQs can be routed to four vcpus with hardware extended IRQ model. This patch adds the virt extension definition so that
hw/intc/loongarch_extioi: Add extioi virt extension definition
On LoongArch, IRQs can be routed to four vcpus with hardware extended IRQ model. This patch adds the virt extension definition so that the IRQ can route to 256 vcpus.
1.Extended IRQ model: | +-----------+ +-------------|--------+ +-----------+ | IPI/Timer | --> | CPUINTC(0-3)|(4-255) | <-- | IPI/Timer | +-----------+ +-------------|--------+ +-----------+ ^ | | +---------+ | EIOINTC | +---------+ ^ ^ | | +---------+ +---------+ | PCH-PIC | | PCH-MSI | +---------+ +---------+ ^ ^ ^ | | | +--------+ +---------+ +---------+ | UARTs | | Devices | | Devices | +--------+ +---------+ +---------+
2.Virt extended IRQ model:
+-----+ +---------------+ +-------+ | IPI |--> | CPUINTC(0-255)| <-- | Timer | +-----+ +---------------+ +-------+ ^ | +-----------+ | V-EIOINTC | +-----------+ ^ ^ | | +---------+ +---------+ | PCH-PIC | | PCH-MSI | +---------+ +---------+ ^ ^ ^ | | | +--------+ +---------+ +---------+ | UARTs | | Devices | | Devices | +--------+ +---------+ +---------+
Signed-off-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Bibo Mao <maobibo@loongson.cn> Message-Id: <20240528083855.1912757-2-gaosong@loongson.cn>
show more ...
|
6204af70 | 20-May-2024 |
Jiaxun Yang <jiaxun.yang@flygoat.com> |
hw/loongarch/virt: Fix FDT memory node address width
Higher bits for memory nodes were omitted at qemu_fdt_setprop_cells.
Cc: qemu-stable@nongnu.org Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.
hw/loongarch/virt: Fix FDT memory node address width
Higher bits for memory nodes were omitted at qemu_fdt_setprop_cells.
Cc: qemu-stable@nongnu.org Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240520-loongarch-fdt-memnode-v1-1-5ea9be93911e@flygoat.com> Signed-off-by: Song Gao <gaosong@loongson.cn>
show more ...
|
ac551dbd | 15-May-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/loongarch: Remove minimum and default memory size
Some qtest test cases such as numa use default memory size of generic machine class, which is 128M by fault.
Here generic default memory size is
hw/loongarch: Remove minimum and default memory size
Some qtest test cases such as numa use default memory size of generic machine class, which is 128M by fault.
Here generic default memory size is used, and also remove minimum memory size which is 1G originally.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240515093927.3453674-6-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
show more ...
|
8d96788c | 15-May-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/loongarch: Refine system dram memory region
For system dram memory region, it is not necessary to use numa node information. There is only low memory region and high memory region.
Remove numa n
hw/loongarch: Refine system dram memory region
For system dram memory region, it is not necessary to use numa node information. There is only low memory region and high memory region.
Remove numa node information for ddr memory region here, it can reduce memory region number on LoongArch virt machine.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240515093927.3453674-5-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
show more ...
|
3cc451cb | 15-May-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/loongarch: Refine fwcfg memory map
Memory map table for fwcfg is used for UEFI BIOS, UEFI BIOS uses the first entry from fwcfg memory map as the first memory HOB, the second memory HOB will be us
hw/loongarch: Refine fwcfg memory map
Memory map table for fwcfg is used for UEFI BIOS, UEFI BIOS uses the first entry from fwcfg memory map as the first memory HOB, the second memory HOB will be used if the first memory HOB is used up.
Memory map table for fwcfg does not care about numa node, however in generic the first memory HOB is part of numa node0, so that runtime memory of UEFI which is allocated from the first memory HOB is located at numa node0.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240515093927.3453674-4-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
show more ...
|
09ec6579 | 15-May-2024 |
Bibo Mao <maobibo@loongson.cn> |
hw/loongarch: Refine fadt memory table for numa memory
One LoongArch virt machine platform, there is limitation for memory map information. The minimum memory size is 256M and minimum memory size fo
hw/loongarch: Refine fadt memory table for numa memory
One LoongArch virt machine platform, there is limitation for memory map information. The minimum memory size is 256M and minimum memory size for numa node0 is 256M also. With qemu numa qtest, it is possible that memory size of numa node0 is 128M.
Limitations for minimum memory size for both total memory and numa node0 is removed for fadt numa memory table creation.
Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20240515093927.3453674-3-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
show more ...
|