Browse Source

hw/acpi: Make acpi_checksum() public

Make the ACPI table checksum calculation function (in core.c) public so
it can be reused in other parts of the ACPI code.

Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Message-ID: <20260130054714.715928-2-osteffen@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
pull/319/head
Oliver Steffen 2 months ago
committed by Gerd Hoffmann
parent
commit
8e862b7246
  1. 5
      hw/acpi/core.c
  2. 3
      include/hw/acpi/acpi.h

5
hw/acpi/core.c

@ -83,7 +83,10 @@ bool acpi_builtin(void)
return true;
}
static int acpi_checksum(const uint8_t *data, int len)
/* Calculate the ACPI checksum value so that if used in the corresponding
* header field, the ACPI checksum verification will be successful.
*/
int acpi_checksum(const uint8_t *data, int len)
{
int sum, i;
sum = 0;

3
include/hw/acpi/acpi.h

@ -203,4 +203,7 @@ struct AcpiSlicOem {
};
int acpi_get_slic_oem(AcpiSlicOem *oem);
/* core.c */
int acpi_checksum(const uint8_t *data, int len);
#endif /* QEMU_HW_ACPI_H */

Loading…
Cancel
Save