utils.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Utilities for generating ACPI tables and passing them to Guests
  3. *
  4. * Copyright (C) 2019 Intel Corporation
  5. * Copyright (C) 2019 Red Hat Inc
  6. *
  7. * Author: Wei Yang <richardw.yang@linux.intel.com>
  8. * Author: Michael S. Tsirkin <mst@redhat.com>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. * You should have received a copy of the GNU General Public License along
  19. * with this program; if not, see <http://www.gnu.org/licenses/>.
  20. */
  21. #include "qemu/osdep.h"
  22. #include "hw/acpi/aml-build.h"
  23. #include "hw/acpi/utils.h"
  24. #include "hw/loader.h"
  25. MemoryRegion *acpi_add_rom_blob(FWCfgCallback update, void *opaque,
  26. GArray *blob, const char *name,
  27. uint64_t max_size)
  28. {
  29. return rom_add_blob(name, blob->data, acpi_data_len(blob), max_size, -1,
  30. name, update, opaque, NULL, true);
  31. }