I haven't really been working on LoongArch for some time now,
so let's remove myself from this entry.
Signed-off-by: Xiaojuan Yang
---
MAINTAINERS | 2 --
1 file changed, 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index c3cc12dc29..5c386f1f37 100644
--- a/MAINTAINERS
+++ b
Add cfi01 pflash device for LoongArch virt machine
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig| 1 +
hw/loongarch/acpi-build.c | 18 +++
hw/loongarch/virt.c | 62 +
include/hw/loongarch/virt.h | 5 +++
4 files changed, 86
Add cfi01 pflash device for LoongArch virt machine
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig| 1 +
hw/loongarch/acpi-build.c | 18 +++
hw/loongarch/virt.c | 62 +
include/hw/loongarch/virt.h | 5 +++
4 files changed, 86
Add cfi01 pflash device for LoongArch virt machine
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig| 1 +
hw/loongarch/acpi-build.c | 18 +
hw/loongarch/virt.c | 80 -
include/hw/loongarch/virt.h | 5 +++
4 files changed, 103
Fix setprop_sized method in fdt rtc node.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/virt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index b9c18ee517..958be74fa1 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
Add cfi01 pflash device for LoongArch virt machine
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig| 1 +
hw/loongarch/acpi-build.c | 39 +++
hw/loongarch/virt.c | 130 +---
include/hw/loongarch/virt.h | 7 ++
4 files changed
Using macro to replace the value of uart info such as addr, size
in acpi_build method.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/acpi-build.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c
index 68dfb9f88a
Add "chosen" subnode into LoongArch fdt, and set it's
"stdout-path" prop to uart node.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/virt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 5e4c2790bf..b59c07972a 10064
T base addr to 2 MiB.
2. Add uart and rtc info into FDT.
3. Add TPM device support.
Xiaojuan Yang (3):
hw/loongarch: Load FDT table into dram memory space
hw/loongarch: Improve fdt for LoongArch virt machine
hw/loongarch: Add TPM device for LoongArch virt machine
hw/loongarch
Add TPM device for LoongArch virt machine, including
establish TPM acpi info and add TYPE_TPM_TIS_SYSBUS
to dynamic_sysbus_devices list.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/acpi-build.c | 50 +--
hw/loongarch/virt.c | 4
2 files changed
Add new items into LoongArch FDT, including rtc and uart info.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/virt.c| 31 +++
include/hw/pci-host/ls7a.h | 1 +
2 files changed, 32 insertions(+)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index
Load FDT table into dram memory space, and the addr is 2 MiB.
Since lowmem region starts from 0, FDT base address is located
at 2 MiB to avoid NULL pointer access.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/virt.c | 18 +++---
include/hw/loongarch/virt.h | 3 ---
2 files
This series change FDT base addr and add uart,rtc info into
FDT, Add TPM device for LoongArch virt machine.
Changes for v1:
1. Change FDT base addr to 2 MiB.
2. Add uart and rtc info into FDT.
3. Add TPM device support.
Xiaojuan Yang (3):
hw/loongarch: Change FDT base addr to 2 MiB
hw
Change FDT base addr to 2 MiB in lowmem region. Since lowmem
region starts from 0, FDT base address is located at 2 MiB to
avoid NULL pointer access.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/virt.c | 18 +++---
include/hw/loongarch/virt.h | 3 ---
2 files changed, 11
Converting the MemoryRegionOps read/write handlers to
with_attrs in LoongArch extioi emulation.
Signed-off-by: Xiaojuan Yang
Reviewed-by: Philippe Mathieu-Daudé
---
hw/intc/loongarch_extioi.c | 31 +--
hw/intc/trace-events | 3 +--
2 files changed, 18
Add TPM device for LoongArch virt machine, including
establish TPM acpi info and add TYPE_TPM_TIS_SYSBUS
to dynamic_sysbus_devices list.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/acpi-build.c | 50 +--
hw/loongarch/virt.c | 4
2 files changed
Add new items into LoongArch FDT, including rtc and uart info.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/virt.c| 31 +++
include/hw/pci-host/ls7a.h | 1 +
2 files changed, 32 insertions(+)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index
1. When cpu read or write extioi COREISR reg, it should access
the reg belonged to itself, so the cpu index of 's->coreisr'
is current cpu number. Using MemTxAttrs' requester_id to get
the cpu index.
2. it need not to mask 0x1f when calculate the coreisr array index.
Signed-off-by: Xiaojuan Y
ioi function
3. Fix LoongArch ipi device emulation
Xiaojuan Yang (2):
hw/intc: Convert the memops to with_attrs in LoongArch extioi
hw/intc: Fix LoongArch extioi coreisr accessing
hw/intc/loongarch_extioi.c | 41 ++---
hw/intc/trace-events| 3 +--
tar
1. When cpu read or write extioi COREISR reg, it should access
the reg belonged to itself, so the cpu index of 's->coreisr'
is current cpu number. Using MemTxAttrs' requester_id to get
the cpu index.
2. It need not to mask 0x1f when calculate the coreisr array index.
Signed-off-by: Xiaojuan Y
Converting the MemoryRegionOps read/write handlers to
with_attrs in LoongArch extioi emulation.
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_extioi.c | 32 +---
hw/intc/trace-events| 3 +--
target/loongarch/iocsr_helper.c | 18
wed.
Changes for v2:
1. Adjust the position of 'PLATFORM' element in memmap table
Changes for v1:
1. Add memmap table for LoongArch virt machine
2. Fix LoongArch extioi function
3. Fix LoongArch ipi device emulation
Xiaojuan Yang (2):
hw/intc: Convert the memops to with_attrs in LoongArch extioi
ice emulation
Xiaojuan Yang (1):
hw/intc: Fix LoongArch extioi coreisr accessing
hw/intc/loongarch_extioi.c | 42 ++---
hw/intc/trace-events| 3 +--
target/loongarch/iocsr_helper.c | 18 +++---
3 files changed, 34 insertions(+), 29 deleti
When cpu read or write extioi COREISR reg, it should access
the reg belonged to itself, so the cpu index of 's->coreisr'
is current cpu number. Using MemTxAttrs' requester_id to get
the cpu index.
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_extioi.c |
Remove the unused extioi system memory region and we only
support the extioi iocsr memory region now.
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_extioi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c
index a703dd30de
When cpu read or write extioi COREISR reg, it should access
the reg belonged to itself, so the index of 's->coreisr' is
current cpu number. Using MemTxAttrs' requester_type and id
to get the cpu index.
Based-on: <20220927141504.3886314-1-alex.ben...@linaro.org>
Signed-off-by: Xiao
machine
2. Fix LoongArch extioi function
3. Fix LoongArch ipi device emulation
Xiaojuan Yang (3):
hw/intc: Fix LoongArch extioi function
hw/intc: Remove unused extioi system memory region of LoongArch
hw/intc: Fix LoongArch ipi device emulation
hw/intc/loongarch_extioi.c | 53
in
this case.
Signed-off-by: Xiaojuan Yang
Reviewed-by: Richard Henderson
---
hw/intc/loongarch_ipi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c
index 4f3c58f872..aa4bf9eb74 100644
--- a/hw/intc/loongarch_ipi.c
+++ b/hw/intc
ory region now.
Based-on: <20220927141504.3886314-1-alex.ben...@linaro.org>
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_extioi.c | 51 +++--
hw/intc/trace-events| 2 +-
target/loongarch/iocsr_helper.c | 16 +--
3 files changed, 38 i
device emulation
Xiaojuan Yang (2):
hw/intc: Fix LoongArch extioi function
hw/intc: Fix LoongArch ipi device emulation
hw/intc/loongarch_extioi.c | 51 +++--
hw/intc/loongarch_ipi.c | 1 -
hw/intc/trace-events| 2 +-
target/loongarch
in
this case.
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_ipi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c
index 4f3c58f872..aa4bf9eb74 100644
--- a/hw/intc/loongarch_ipi.c
+++ b/hw/intc/loongarch_ipi.c
@@ -88,7 +88,6 @@ static void
:
1. Add memmap table for LoongArch virt machine
2. Fix LoongArch extioi function
3. Fix LoongArch ipi device emulation
Xiaojuan Yang (2):
hw/intc: Fix LoongArch extioi function
hw/intc: Fix LoongArch ipi device emulation
hw/intc/loongarch_extioi.c | 51
ory region now.
Based-on: <20220927141504.3886314-1-alex.ben...@linaro.org>
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_extioi.c | 51 +++--
hw/intc/trace-events| 2 +-
target/loongarch/iocsr_helper.c | 16 +--
3 files changed, 38 i
Using memmap table for loongarch virt machine type, this method
comes from arm/riscv architectures.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/acpi-build.c | 46 ++--
hw/loongarch/fw_cfg.c | 5 +-
hw/loongarch/virt.c | 138
1.When cpu read or write extioi COREISR reg, it should access
the reg belonged to itself, so the index of 's->coreisr' is
current cpu number.
2.Remove the unused extioi system memory region and we only
support the extioi iocsr memory region now.
Signed-off-by: Xiaojuan Yang
---
hw/i
emulation
Thanks for your reviewing.
Xiaojuan Yang (3):
hw/loongarch: Add memmap for LoongArch virt machine
hw/intc: Fix LoongArch extioi function
hw/intc: Fix LoongArch ipi device emulation
hw/intc/loongarch_extioi.c | 17 +++--
hw/intc/loongarch_ipi.c | 1 -
hw/loongarch/acpi
In ipi_send function, it should not to set irq before
writing data to dest cpu iocsr space, as the irq will
trigger after data writing.
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_ipi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c
Using memmap table for loongarch virt machine type, this method
comes from arm/riscv architectures.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/acpi-build.c | 46 ++--
hw/loongarch/fw_cfg.c | 5 +-
hw/loongarch/virt.c | 138
In ipi_send function, it should not to set irq before
writing data to dest cpu iocsr space, as the irq will
trigger after data writing.
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_ipi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c
This series add memmap table and fix extioi, ipi device
emulation for LoongArch virt machine.
Changes for v1:
1. Add memmap table for LoongArch virt machine
2. Fix LoongArch extioi function
3. Fix LoongArch ipi device emulation
Thanks for your reviewing.
Xiaojuan Yang (3):
hw/loongarch: Add
1.When cpu read or write extioi COREISR reg, it should access
the reg belonged to itself, so the index of 's->coreisr' is
current cpu number.
2.Remove the unused extioi system memory region and we only
support the extioi iocsr memory region now.
Signed-off-by: Xiaojuan Yang
---
hw/i
Remove the vga device when loongarch machine init and
we will support other display device in the future.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig | 1 -
hw/loongarch/virt.c | 3 ---
2 files changed, 4 deletions(-)
diff --git a/hw/loongarch/Kconfig b/hw/loongarch/Kconfig
index
In dsdt, acpi ged irq should use gsi number, and the
VIRT_SCI_IRQ means it.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/acpi-build.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c
index d0f01a6485..95e30975a8 100644
Add interrupt information to FDT table, such as interrupt
controller info, compatiable info, etc.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/virt.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 4f833a2044
Add hotplug handler for LoongArch virt machine and now only support
the dynamic sysbus device.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/virt.c | 32
1 file changed, 32 insertions(+)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 3976e8a058
Add platform bus support and add the bus information such as address,
size, irq number to FDT table.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig| 1 +
hw/loongarch/virt.c | 33 +
include/hw/loongarch/virt.h | 1 +
include/hw/pci-host
Support fw_cfg dma function for LoongArch virt machine.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig | 1 +
hw/loongarch/fw_cfg.c | 3 ++-
hw/loongarch/virt.c | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/loongarch/Kconfig b/hw/loongarch/Kconfig
index
Cleanup the previous pci information in acpi dsdt table.
And using the common acpi_dsdt_add_gpex function to build
the gpex and pci information.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/acpi-build.c | 159 +---
hw/loongarch/virt.c | 1 +
include
Add hotplug/unplug interface for memory device.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig | 2 +
hw/loongarch/acpi-build.c | 32 +---
hw/loongarch/virt.c | 105 +-
3 files changed, 132 insertions(+), 7 deletions(-)
diff
list
7. Fix acpi ged irq number in dsdt table
8. Support memory hotplug
9. Improve acpi dsdt table
Xiaojuan Yang (9):
hw/loongarch: Remove vga device when loongarch init
hw/loongarch: Support fw_cfg dma function
hw/loongarch: Add interrupt information to FDT table
hw/loongarch: Add
Add RAMFB device to dynamic_sysbus_devices list so that it can be
hotpluged to the machine.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/virt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index a3dd35d579..1e1dc699ef 100644
--- a/hw/loongarch
This series based on the 'Add funtions for LoongArch virt machine patch'(11 Aug)
and 'Fix acpi ged irq number in dsdt table patch'(19 Aug).
Changes for v1:
1.Support memory hotplug
2.Improve acpi dsdt table
Xiaojuan Yang (2):
hw/loongarch: Support memory hotplug
hw/loongarch: Improve acpi
Add hotplug/unplug interface for memory device.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig | 2 +
hw/loongarch/acpi-build.c | 32 +---
hw/loongarch/virt.c | 105 +-
3 files changed, 132 insertions(+), 7 deletions(-)
diff
Cleanup the previous pci information in acpi dsdt table.
And using the common acpi_dsdt_add_gpex function to build
the gpex and pci information.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/acpi-build.c | 159 +---
hw/loongarch/virt.c | 1 +
include
In dsdt, acpi ged irq should use gsi number, and the
VIRT_SCI_IRQ means it.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/acpi-build.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c
index d0f01a6485..95e30975a8 100644
1. Add some information about how to boot the LoongArch virt
machine by uefi bios and linux kernel and how to access the
source code or binary file.
2. Move the explanation of LoongArch system emulation in the
target/loongarch/README to docs/system/loongarch/loongson3.rst
Signed-off-by: Xiaojuan
Add hotplug handler for LoongArch virt machine and now only support
the dynamic sysbus device.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/virt.c | 32
1 file changed, 32 insertions(+)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 3976e8a058
Add platform bus support and add the bus information such as address,
size, irq number to FDT table.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig| 1 +
hw/loongarch/virt.c | 33 +
include/hw/loongarch/virt.h | 1 +
include/hw/pci-host
Remove the vga device when loongarch machine init and
we will support other display device in the future.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig | 1 -
hw/loongarch/virt.c | 3 ---
2 files changed, 4 deletions(-)
diff --git a/hw/loongarch/Kconfig b/hw/loongarch/Kconfig
index
table.
4. Add platform bus support.
5. Add hotplug handler for machine.
6. Add RAMFB to dynamic_sysbus_devices list.
Please help review.
Thanks.
Xiaojuan Yang (6):
hw/loongarch: Remove vga device when loongarch init
hw/loongarch: Support fw_cfg dma function
hw/loongarch: Add interrupt
Add interrupt information to FDT table, such as interrupt
controller info, compatiable info, etc.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/virt.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 4f833a2044
Add RAMFB device to dynamic_sysbus_devices list so that it can be
hotpluged to the machine.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/virt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index a3dd35d579..1e1dc699ef 100644
--- a/hw/loongarch
Support fw_cfg dma function for LoongArch virt machine.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig | 1 +
hw/loongarch/fw_cfg.c | 3 ++-
hw/loongarch/virt.c | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/loongarch/Kconfig b/hw/loongarch/Kconfig
index
1. Rename 'loongson3.c' to 'virt.c' and change the meson.build file.
2. Rename 'loongson3.rst' to 'virt.rst'.
Signed-off-by: Xiaojuan Yang
---
MAINTAINERS | 2 +-
hw/loongarch/meson.build | 2 +-
hw/loongarch/{loongson3.c => virt.c} | 0
target/loonga
This series change 'loongson3.XXX' file name and 'LS7A_XXX' macro name.
Changes for v1:
1. Rename 'loongson3.c' to 'virt.c' and change the meson.build file.
2. Rename 'loongson3.rst' to 'virt.rst'.
3. Change macro name 'LS7A_XXX' to 'VIRT_XXX'.
Xiaojuan Yang (2):
hw/loongarch: Rename file
Change macro name 'LS7A_XXX' to 'VIRT_XXX', as the loongarch
virt machinue use the GPEX bridge instead of LS7A bridge. So
the macro name should keep consistency.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/acpi-build.c | 18 ++--
hw/loongarch/virt.c | 56
We should config cpucfg[20] to set value for the scache's ways, sets,
and size arguments when loongarch cpu init. However, the old code
wirte 'sets argument' twice, so we change one of them to 'size argument'.
Signed-off-by: Xiaojuan Yang
---
target/loongarch/cpu.c | 2 +-
1 file changed, 1
In loongarch_cpu_class_by_name(char *cpu_model) function,
the argument cpu_model already has the suffix '-loongarch-cpu',
so we should remove the LOONGARCH_CPU_TYPE_NAME(cpu_model) macro.
And add the assertion that 'cpu_model' resolves to a class of the
appropriate type.
Signed-off-by: Xiaojuan
nds, integer overflow,
cond_at_most, etc.
2. Fix loongarch_cpu_class_by_name function.
Please help review
Thanks.
Xiaojuan Yang (5):
target/loongarch/cpu: Fix cpu_class_by_name function
hw/intc/loongarch_pch_pic: Fix bugs for update_irq function
target/loongarch/cpu: Fix coverity
Fix out-of-bounds errors when access excp_names[] array. the valid
boundary size of excp_names should be 0 to ARRAY_SIZE(excp_names)-1.
However, the general code do not consider the max boundary.
Fix coverity CID: 1489758
Signed-off-by: Xiaojuan Yang
Reviewed-by: Richard Henderson
---
target
verity CID: 1489761 1489764 1489765
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_pch_pic.c | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/hw/intc/loongarch_pch_pic.c b/hw/intc/loongarch_pch_pic.c
index 3c9814a3b4..8fa64d2030 100644
--- a/h
Replace '1 << shift' with 'MAKE_64BIT_MASK(shift, 1)' to fix
unintentional integer overflow errors in tlb_helper file.
Fix coverity CID: 1489759 1489762
Signed-off-by: Xiaojuan Yang
Reviewed-by: Richard Henderson
---
target/loongarch/tlb_helper.c | 4 ++--
1 file changed, 2 insertions
The boundary size of cpucfg array should be 0 to ARRAY_SIZE(cpucfg)-1.
So, using index bigger than max boundary to access cpucfg[] must be
forbidden.
Fix coverity CID: 1489760
Signed-off-by: Xiaojuan Yang
Reviewed-by: Richard Henderson
---
target/loongarch/op_helper.c | 2 +-
1 file changed
3. Add the assertion that 'cpu_model' resolve to a class of the
appropriate type.
Xiaojuan Yang (5):
target/loongarch/cpu: Fix cpu_class_by_name function
hw/intc/loongarch_pch_pic: Fix coverity errors in update irq
target/loongarch/cpu: Fix coverity errors about excp_names
target/loo
In loongarch_cpu_class_by_name(char *cpu_model) function,
the argument cpu_model already has the suffix '-loongarch-cpu',
so we should remove the LOONGARCH_CPU_TYPE_NAME(cpu_model) macro.
And add the assertion that 'cpu_model' resolves to a class of the
appropriate type.
Signed-off-by: Xiaojuan
The boundary size of cpucfg array should be 0 to 20. So,
using index bigger than 20 to access cpucfg[] must be forbidden.
Fix coverity CID: 1489760
Signed-off-by: Xiaojuan Yang
---
target/loongarch/op_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/loongarch
ccured when 'irq' >= 64. So we add a condition to
avoid this.
3. Use 'MAKE_64BIT_MASK(irq, 1)' to replace '1ULL << shift'.
Fix coverity CID: 1489761 1489764 1489765
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_pch_pic.c | 19 ---
1 file changed, 12 insertions(
Fix out-of-bounds errors when access excp_names[] array. the valid
boundary size of excp_names should be 0 to ARRAY_SIZE(excp_names)-1.
However, the general code do not consider the max boundary.
Fix coverity CID: 1489758
Signed-off-by: Xiaojuan Yang
---
target/loongarch/cpu.c | 6 +++---
1
Replace '1 << shift' with 'MAKE_64BIT_MASK(shift, 1)' to fix
unintentional integer overflow errors in tlb_helper file.
Fix coverity CID: 1489759 1489762
Signed-off-by: Xiaojuan Yang
---
target/loongarch/tlb_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/
.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/loongson3.c| 136 +++-
include/hw/loongarch/virt.h | 4 ++
target/loongarch/cpu.c | 1 +
target/loongarch/cpu.h | 3 +
4 files changed, 141 insertions(+), 3 deletions(-)
diff --git a/hw/loongarch
There are two situations to start system by kernel file. If exists bios
option, system will boot from loaded bios file, else system will boot
from hardcoded auxcode, and jump to kernel elf entry.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/loongson3.c | 114
Add fw_cfg table for loongarch virt machine, including memmap table.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/fw_cfg.c | 33 ++
hw/loongarch/fw_cfg.h | 15
hw/loongarch/loongson3.c| 47 -
hw/loongarch
Add uefi bios loading support, now only uefi bios is porting to
loongarch virt machine.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/loongson3.c| 34 ++
include/hw/loongarch/virt.h | 4
2 files changed, 38 insertions(+)
diff --git a/hw/loongarch
Add smbios support for loongarch virt machine, and put them into fw_cfg
table so that bios can parse them quickly. The weblink of smbios spec:
https://www.dmtf.org/dsp/DSP0134, the version is 3.6.0.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig| 1 +
hw/loongarch/loongson3.c
file:
* https://github.com/loongson/linux/tree/loongarch-next
The bios file:
* https://github.com/loongson/edk2
* https://github.com/loongson/edk2-platforms
Xiaojuan Yang (6):
hw/loongarch: Add fw_cfg table support
hw/loongarch: Add uefi bios loading support
hw/loongarch: Add linux
This series fix some errors for LoongArch virt machine
1. Fix coverity errors such as out-of-bounds, integer overflow,
cond_at_most, etc.
2. Fix loongarch_cpu_class_by_name function.
Xiaojuan Yang (5):
target/loongarch/cpu: Fix cpu_class_by_name function
hw/intc/loongarch_pch_pic: Fix
, and will release soon.
Signed-off-by: Xiaojuan Yang
---
hw/loongarch/Kconfig| 2 +
hw/loongarch/acpi-build.c | 609
hw/loongarch/loongson3.c| 78 -
hw/loongarch/meson.build| 1 +
include/hw/loongarch/virt.h | 13 +
include/hw/pci-host/ls7a.h
Fix out-of-bounds errors when access excp_names[] array. the valid
boundary size of excp_names should be 0 to ARRAY_SIZE(excp_names)-1.
However, the general code do not consider the max boundary.
Fix coverity CID: 1489758
Signed-off-by: Xiaojuan Yang
---
target/loongarch/cpu.c | 6 +++---
1
In loongarch_cpu_class_by_name(char *cpu_model) function,
the argument cpu_model already has the suffix '-loongarch-cpu',
so we should remove the LOONGARCH_CPU_TYPE_NAME(cpu_model) macro.
Signed-off-by: Xiaojuan Yang
---
target/loongarch/cpu.c | 5 +
1 file changed, 1 insertion(+), 4
ccured when 'irq' >= 64. So we add a condition to
avoid this.
Fix coverity CID: 1489761 1489764 1489765
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_pch_pic.c | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/hw/intc/loongarch_pch_pic.c
The boundary size of cpucfg array should be 0 to 20. So,
using index bigger than 20 to access cpucfg[] must be forbidden.
Fix coverity CID: 1489760
Signed-off-by: Xiaojuan Yang
---
target/loongarch/op_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/loongarch
Replace '1' with '1UL' to fix unintentional integer overflow errors
in tlb_helper file.
Fix coverity CID: 1489759 1489762
Signed-off-by: Xiaojuan Yang
---
target/loongarch/tlb_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/loongarch/tlb_helper.c b
In general loongarch ipi device, 32bit registers is emulated, however for
anysend/mailsend device only 64bit register access is supported. So separate
the ipi memory region into two regions, including 32 bits and 64 bits.
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_ipi.c | 38
By the document of ipi mailsend device, byte is written only when the mask bit
is 0. The original code discards mask bit and overwrite the data always, this
patch fixes the issue.
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_ipi.c | 54 +++--
1 file
(),
as the mask is 0 at most time.
Xiaojuan Yang (2):
hw/intc/loongarch_ipi: Fix ipi device access of 64bits
hw/intc/loongarch_ipi: Fix mail send and any send function
hw/intc/loongarch_ipi.c | 92 ++---
hw/loongarch/loongson3.c| 5 +-
include/hw/intc
In general loongarch ipi device, 32bit registers is emulated, however for
anysend/mailsend device only 64bit register access is supported. So separate
the ipi memory region into two regions, including 32 bits and 64 bits.
Signed-off-by: Xiaojuan Yang
---
hw/intc/loongarch_ipi.c | 38
Replace qemu_irq_pulse with qemu_irq_raise in ls7a_timer_cb function
to keep consistent with hardware behavior when raise irq.
Signed-off-by: Xiaojuan Yang
---
hw/rtc/ls7a_rtc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/rtc/ls7a_rtc.c b/hw/rtc/ls7a_rtc.c
index
Add mutex iothread lock around loongarch_cpu_set_irq in csrwr_ticlr() to
fix the bug.
Signed-off-by: Xiaojuan Yang
---
target/loongarch/csr_helper.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/loongarch/csr_helper.c b/target/loongarch/csr_helper.c
index 24a9389364..7e02787895
: Coverity CID 1489766, 1489763
Signed-off-by: Xiaojuan Yang
---
hw/rtc/ls7a_rtc.c | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/hw/rtc/ls7a_rtc.c b/hw/rtc/ls7a_rtc.c
index fe6710310f..b88a90de8b 100644
--- a/hw/rtc/ls7a_rtc.c
+++ b/hw/rtc/ls7a_rtc.c
Fix 'calculate' spelling errors.
Signed-off-by: Xiaojuan Yang
---
hw/rtc/ls7a_rtc.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/rtc/ls7a_rtc.c b/hw/rtc/ls7a_rtc.c
index 85cd2d22a5..e8b75701e4 100644
--- a/hw/rtc/ls7a_rtc.c
+++ b/hw/rtc/ls7a_rtc.c
1 - 100 of 645 matches
Mail list logo