Move fw/acpi.h to std/acpi.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
3d0dfe1fae
commit
5a7545ca4a
|
@ -9,7 +9,6 @@
|
|||
#include "biosvar.h" // GET_GLOBAL
|
||||
#include "bregs.h" // struct bregs
|
||||
#include "config.h" // CONFIG_*
|
||||
#include "fw/acpi.h" // acpi_pm_ctl
|
||||
#include "fw/paravirt.h" // runningOnQEMU
|
||||
#include "ioport.h" // outb
|
||||
#include "output.h" // dprintf
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef __BYTEORDER_H
|
||||
#define __BYTEORDER_H
|
||||
|
||||
#include "types.h" // u32
|
||||
|
||||
static inline u16 __swab16_constant(u16 val) {
|
||||
return (val<<8) | (val>>8);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
//
|
||||
// This file may be distributed under the terms of the GNU LGPLv3 license.
|
||||
|
||||
#include "acpi.h" // struct rsdp_descriptor
|
||||
#include "byteorder.h" // cpu_to_le16
|
||||
#include "config.h" // CONFIG_*
|
||||
#include "dev-q35.h"
|
||||
|
@ -17,6 +16,7 @@
|
|||
#include "output.h" // dprintf
|
||||
#include "paravirt.h" // RamSize
|
||||
#include "romfile.h" // romfile_loadint
|
||||
#include "std/acpi.h" // struct rsdp_descriptor
|
||||
#include "string.h" // memset
|
||||
#include "util.h" // MaxCountCPUs
|
||||
#include "x86.h" // readl
|
||||
|
@ -756,6 +756,8 @@ find_acpi_features(void)
|
|||
static struct acpi_20_generic_address acpi_reset_reg;
|
||||
static u8 acpi_reset_val;
|
||||
|
||||
#define acpi_ga_to_bdf(addr) pci_to_bdf(0, (addr >> 32) & 0xffff, (addr >> 16) & 0xffff)
|
||||
|
||||
void
|
||||
acpi_reboot(void)
|
||||
{
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
//
|
||||
// This file may be distributed under the terms of the GNU LGPLv3 license.
|
||||
|
||||
#include "acpi.h" // struct rsdp_descriptor
|
||||
#include "config.h" // CONFIG_*
|
||||
#include "malloc.h" // malloc_fseg
|
||||
#include "output.h" // dprintf
|
||||
#include "std/acpi.h" // struct rsdp_descriptor
|
||||
#include "std/mptable.h" // MPTABLE_SIGNATURE
|
||||
#include "std/pirtable.h" // struct pir_header
|
||||
#include "std/smbios.h" // struct smbios_entry_point
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
//
|
||||
// This file may be distributed under the terms of the GNU LGPLv3 license.
|
||||
|
||||
#include "acpi.h" // find_acpi_features
|
||||
#include "boot.h" // boot_add_cbfs
|
||||
#include "byteorder.h" // be32_to_cpu
|
||||
#include "config.h" // CONFIG_*
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
//
|
||||
// This file may be distributed under the terms of the GNU LGPLv3 license.
|
||||
|
||||
#include "acpi.h"
|
||||
#include "biosvar.h"
|
||||
#include "boot.h"
|
||||
#include "bregs.h"
|
||||
|
@ -16,6 +15,7 @@
|
|||
#include "output.h" // dprintf
|
||||
#include "post.h"
|
||||
#include "stacks.h" // wait_threads
|
||||
#include "std/acpi.h" // RSDP_SIGNATURE
|
||||
#include "std/optionrom.h" // struct rom_header
|
||||
#include "util.h" // copy_smbios
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
//
|
||||
// This file may be distributed under the terms of the GNU LGPLv3 license.
|
||||
|
||||
#include "acpi.h" // acpi_setup
|
||||
#include "byteorder.h" // be32_to_cpu
|
||||
#include "config.h" // CONFIG_QEMU
|
||||
#include "hw/cmos.h" // CMOS_*
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
//
|
||||
// This file may be distributed under the terms of the GNU LGPLv3 license.
|
||||
|
||||
#include "acpi.h" // acpi_pm1a_cnt
|
||||
#include "config.h" // CONFIG_*
|
||||
#include "dev-q35.h" // Q35_HOST_BRIDGE_PCIEXBAR_ADDR
|
||||
#include "hw/pci.h" // pci_config_readl
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
//
|
||||
// This file may be distributed under the terms of the GNU LGPLv3 license.
|
||||
|
||||
#include "acpi.h" // find_acpi_features
|
||||
#include "config.h"
|
||||
#include "malloc.h" // memalign_high
|
||||
#include "memmap.h" // add_e820
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "biosvar.h" // struct bios_data_area_s
|
||||
#include "bregs.h" // struct bregs
|
||||
#include "fw/acpi.h" // find_resume_vector
|
||||
#include "hw/cmos.h" // inb_cmos
|
||||
#include "hw/pci.h" // pci_reboot
|
||||
#include "hw/pic.h" // pic_eoi2
|
||||
|
|
|
@ -13,13 +13,6 @@ struct acpi_20_generic_address {
|
|||
u8 reserved;
|
||||
u64 address;
|
||||
} PACKED;
|
||||
#define acpi_ga_to_bdf(addr) pci_to_bdf(0, (addr >> 32) & 0xffff, (addr >> 16) & 0xffff)
|
||||
|
||||
void acpi_setup(void);
|
||||
u32 find_resume_vector(void);
|
||||
void find_acpi_features(void);
|
||||
void acpi_set_reset_reg(struct acpi_20_generic_address *reg, u8 val);
|
||||
void acpi_reboot(void);
|
||||
|
||||
#define RSDP_SIGNATURE 0x2052545020445352LL // "RSD PTR "
|
||||
|
||||
|
@ -35,9 +28,6 @@ struct rsdp_descriptor { /* Root System Descriptor Pointer */
|
|||
u8 reserved [3]; /* Reserved field must be 0 */
|
||||
};
|
||||
|
||||
extern struct rsdp_descriptor *RsdpAddr;
|
||||
extern u32 acpi_pm1a_cnt;
|
||||
|
||||
/* Table structure from Linux kernel (the ACPI tables are under the
|
||||
BSD license) */
|
||||
|
10
src/util.h
10
src/util.h
|
@ -55,6 +55,16 @@ void callrom(struct rom_header *rom, u16 bdf);
|
|||
void handle_1ab1(struct bregs *regs);
|
||||
void bios32_init(void);
|
||||
|
||||
// fw/acpi.c
|
||||
extern struct rsdp_descriptor *RsdpAddr;
|
||||
extern u32 acpi_pm1a_cnt;
|
||||
void acpi_setup(void);
|
||||
u32 find_resume_vector(void);
|
||||
void find_acpi_features(void);
|
||||
struct acpi_20_generic_address;
|
||||
void acpi_set_reset_reg(struct acpi_20_generic_address *reg, u8 val);
|
||||
void acpi_reboot(void);
|
||||
|
||||
// fw/csm.c
|
||||
struct pci_device;
|
||||
int csm_bootprio_fdc(struct pci_device *pci, int port, int fdid);
|
||||
|
|
Loading…
Reference in New Issue