)]}'
{
  "commit": "41f7b58b634ec3b60ae874375d2bbb61d790971e",
  "tree": "4cdbacb49e3b20f881f359dbf1dd7cd88940febd",
  "parents": [
    "1eb2888ecd55ace57b37009492f11cd53a6f4148"
  ],
  "author": {
    "name": "Udo Steinberg",
    "email": "udo@hypervisor.org",
    "time": "Mon Nov 06 15:00:26 2023 +0000"
  },
  "committer": {
    "name": "Peter Maydell",
    "email": "peter.maydell@linaro.org",
    "time": "Mon Nov 06 15:00:26 2023 +0000"
  },
  "message": "hw/arm/virt: Report correct register sizes in ACPI DBG2/SPCR tables.\n\nDocumentation for using the GAS in ACPI tables to report debug UART addresses at\nhttps://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table\nstates the following:\n\n- The Register Bit Width field contains the register stride and must be a\n  power of 2 that is at least as large as the access size.  On 32-bit\n  platforms this value cannot exceed 32.  On 64-bit platforms this value\n  cannot exceed 64.\n- The Access Size field is used to determine whether byte, WORD, DWORD, or\n  QWORD accesses are to be used.  QWORD accesses are only valid on 64-bit\n  architectures.\n\nDocumentation for the ARM PL011 at\nhttps://developer.arm.com/documentation/ddi0183/latest/\nstates that the registers are:\n\n- spaced 4 bytes apart (see Table 3-2), so register stride must be 32.\n- 16 bits in size in some cases (see individual registers), so access\n  size must be at least 2.\n\nLinux doesn\u0027t seem to care about this error in the table, but it does\naffect at least the NOVA microhypervisor.\n\nIn theory we therefore have a choice between reporting the access\nsize as 2 (16 bit accesses) or 3 (32-bit accesses).  In practice,\nLinux does not correctly handle the case where the table reports the\naccess size as 2: as of kernel commit 750b95887e5678, the code in\nacpi_parse_spcr() tries to tell the serial driver to use 16 bit\naccesses by passing \"mmio16\" in the option string, but the PL011\ndriver code in pl011_console_match() only recognizes \"mmio\" or\n\"mmio32\". The result is that unless the user has enabled \u0027earlycon\u0027\nthere is no console output from the guest kernel.\n\nWe therefore choose to report the access size as 32 bits; this works\nfor NOVA and also for Linux.  It is also what the UEFI firmware on a\nRaspberry Pi 4 reports, so we\u0027re in line with existing real-world\npractice.\n\nResolves: https://gitlab.com/qemu-project/qemu/-/issues/1938\nSigned-off-by: Udo Steinberg \u003cudo@hypervisor.org\u003e\nReviewed-by: Peter Maydell \u003cpeter.maydell@linaro.org\u003e\n[PMM: minor commit message tweaks; use 32 bit accesses]\nSigned-off-by: Peter Maydell \u003cpeter.maydell@linaro.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9ce136cd88cc96df6bdc2ac2025a79ce857fd42f",
      "old_mode": 33188,
      "old_path": "hw/arm/virt-acpi-build.c",
      "new_id": "8bc35a483c9233f4b718bd3a66c5ec807d048b1b",
      "new_mode": 33188,
      "new_path": "hw/arm/virt-acpi-build.c"
    }
  ]
}
