core.c (390e8fc6b0e7b521c9eceb8dfe0958e141009ab9) | core.c (7f558ea58bb60257b111abac0424dc601ff54875) |
---|---|
1/* 2 * ACPI implementation 3 * 4 * Copyright (c) 2006 Fabrice Bellard 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License version 2.1 as published by the Free Software Foundation. --- 18 unchanged lines hidden (view full) --- 27#include "qapi/error.h" 28#include "qapi/opts-visitor.h" 29#include "qapi/qapi-events-run-state.h" 30#include "qapi/qapi-visit-acpi.h" 31#include "qemu/error-report.h" 32#include "qemu/module.h" 33#include "qemu/option.h" 34#include "sysemu/runstate.h" | 1/* 2 * ACPI implementation 3 * 4 * Copyright (c) 2006 Fabrice Bellard 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License version 2.1 as published by the Free Software Foundation. --- 18 unchanged lines hidden (view full) --- 27#include "qapi/error.h" 28#include "qapi/opts-visitor.h" 29#include "qapi/qapi-events-run-state.h" 30#include "qapi/qapi-visit-acpi.h" 31#include "qemu/error-report.h" 32#include "qemu/module.h" 33#include "qemu/option.h" 34#include "sysemu/runstate.h" |
35#include "trace.h" |
|
35 36struct acpi_table_header { 37 uint16_t _length; /* our length, not actual part of the hdr */ 38 /* allows easier parsing for fw_cfg clients */ 39 char sig[4] 40 QEMU_NONSTRING; /* ACPI signature (4 ASCII characters) */ 41 uint32_t length; /* Length of table, in bytes, including header */ 42 uint8_t revision; /* ACPI Specification minor version # */ --- 638 unchanged lines hidden (view full) --- 681 682 return cur; 683} 684 685void acpi_gpe_ioport_writeb(ACPIREGS *ar, uint32_t addr, uint32_t val) 686{ 687 uint8_t *cur; 688 | 36 37struct acpi_table_header { 38 uint16_t _length; /* our length, not actual part of the hdr */ 39 /* allows easier parsing for fw_cfg clients */ 40 char sig[4] 41 QEMU_NONSTRING; /* ACPI signature (4 ASCII characters) */ 42 uint32_t length; /* Length of table, in bytes, including header */ 43 uint8_t revision; /* ACPI Specification minor version # */ --- 638 unchanged lines hidden (view full) --- 682 683 return cur; 684} 685 686void acpi_gpe_ioport_writeb(ACPIREGS *ar, uint32_t addr, uint32_t val) 687{ 688 uint8_t *cur; 689 |
690 trace_acpi_gpe_ioport_writeb(addr, val); 691 |
|
689 cur = acpi_gpe_ioport_get_ptr(ar, addr); 690 if (addr < ar->gpe.len / 2) { 691 /* GPE_STS */ 692 *cur = (*cur) & ~val; 693 } else if (addr < ar->gpe.len) { 694 /* GPE_EN */ 695 *cur = val; 696 } else { --- 7 unchanged lines hidden (view full) --- 704 uint32_t val; 705 706 cur = acpi_gpe_ioport_get_ptr(ar, addr); 707 val = 0; 708 if (cur != NULL) { 709 val = *cur; 710 } 711 | 692 cur = acpi_gpe_ioport_get_ptr(ar, addr); 693 if (addr < ar->gpe.len / 2) { 694 /* GPE_STS */ 695 *cur = (*cur) & ~val; 696 } else if (addr < ar->gpe.len) { 697 /* GPE_EN */ 698 *cur = val; 699 } else { --- 7 unchanged lines hidden (view full) --- 707 uint32_t val; 708 709 cur = acpi_gpe_ioport_get_ptr(ar, addr); 710 val = 0; 711 if (cur != NULL) { 712 val = *cur; 713 } 714 |
715 trace_acpi_gpe_ioport_readb(addr, val); 716 |
|
712 return val; 713} 714 715void acpi_send_gpe_event(ACPIREGS *ar, qemu_irq irq, 716 AcpiEventStatusBits status) 717{ 718 ar->gpe.sts[0] |= status; 719 acpi_update_sci(ar, irq); --- 19 unchanged lines hidden --- | 717 return val; 718} 719 720void acpi_send_gpe_event(ACPIREGS *ar, qemu_irq irq, 721 AcpiEventStatusBits status) 722{ 723 ar->gpe.sts[0] |= status; 724 acpi_update_sci(ar, irq); --- 19 unchanged lines hidden --- |