uint32_t oem_revision; /* OEM revision number */
char asl_compiler_id[4]; /* ASL compiler vendor ID */
uint32_t asl_compiler_revision; /* ASL compiler revision number */
-} __attribute__((packed));
+} QEMU_PACKED;
#define ACPI_TABLE_HDR_SIZE sizeof(struct acpi_table_header)
#define ACPI_TABLE_PFX_SIZE sizeof(uint16_t) /* size of the extra prefix */
if (!acpi_tables) {
allen = sizeof(uint16_t);
- acpi_tables = qemu_mallocz(allen);
+ acpi_tables = g_malloc0(allen);
} else {
allen = acpi_tables_len;
}
start = allen;
- acpi_tables = qemu_realloc(acpi_tables, start + ACPI_TABLE_HDR_SIZE);
+ acpi_tables = g_realloc(acpi_tables, start + ACPI_TABLE_HDR_SIZE);
allen += has_header ? ACPI_TABLE_PFX_SIZE : ACPI_TABLE_HDR_SIZE;
/* now read in the data files, reallocating buffer as needed */
if (r == 0) {
break;
} else if (r > 0) {
- acpi_tables = qemu_realloc(acpi_tables, allen + r);
+ acpi_tables = g_realloc(acpi_tables, allen + r);
memcpy(acpi_tables + allen, data, r);
allen += r;
} else if (errno != EINTR) {
uint32_t acpi_pm_tmr_get(ACPIPMTimer *tmr)
{
- uint32_t d = acpi_pm_tmr_get_clock();;
+ uint32_t d = acpi_pm_tmr_get_clock();
return d & 0xffffff;
}
void acpi_gpe_init(ACPIGPE *gpe, uint8_t len)
{
gpe->len = len;
- gpe->sts = qemu_mallocz(len / 2);
- gpe->en = qemu_mallocz(len / 2);
+ gpe->sts = g_malloc0(len / 2);
+ gpe->en = g_malloc0(len / 2);
}
void acpi_gpe_blk(ACPIGPE *gpe, uint32_t blk)