On 9/26/22 23:12, Xiaojuan Yang wrote:
Using memmap table for loongarch virt machine type, this method
comes from arm/riscv architectures.

While being data driven is nice...

+    hwaddr base = ms->memmap[VIRT_ACPI_GED].base + ACPI_GED_EVT_SEL_LEN +

... these indexes are not really better than the constant they replace.

Perhaps delay this until you've more than one machinestate against which this can be properly parameterized.

+static MemMapEntry virt_memmap[] = {

FWIW, this array could be const.


r~

Reply via email to