mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
The GPL and LGPL SPDX forms without an explicit -only or -or-later suffix are deprecated and should not be used. Update the documention. Somewhat unhelpfully at the time of writing, this only appears to be indicated by the separation of the two tables at https://spdx.org/licenses/ The recent changes to libacpi are the only examples of deprecated LGPL tags in tree, so fix them all up. For GPL, we have many examples using deprecated tags. For now, just identify them as such and recommend that no new instances get added. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
107 lines
2.7 KiB
C
107 lines
2.7 KiB
C
/* SPDX-License-Identifier: LGPL-2.1-only */
|
|
/******************************************************************************
|
|
* libacpi.h
|
|
*
|
|
* libacpi interfaces
|
|
*
|
|
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
|
|
*/
|
|
|
|
|
|
#ifndef __LIBACPI_H__
|
|
#define __LIBACPI_H__
|
|
|
|
#define ACPI_HAS_COM1 (1<<0)
|
|
#define ACPI_HAS_COM2 (1<<1)
|
|
#define ACPI_HAS_LPT1 (1<<2)
|
|
#define ACPI_HAS_HPET (1<<3)
|
|
#define ACPI_HAS_SSDT_PM (1<<4)
|
|
#define ACPI_HAS_SSDT_S3 (1<<5)
|
|
#define ACPI_HAS_SSDT_S4 (1<<6)
|
|
#define ACPI_HAS_TPM (1<<7)
|
|
#define ACPI_HAS_IOAPIC (1<<8)
|
|
#define ACPI_HAS_WAET (1<<9)
|
|
#define ACPI_HAS_PMTIMER (1<<10)
|
|
#define ACPI_HAS_BUTTONS (1<<11)
|
|
#define ACPI_HAS_VGA (1<<12)
|
|
#define ACPI_HAS_8042 (1<<13)
|
|
#define ACPI_HAS_CMOS_RTC (1<<14)
|
|
#define ACPI_HAS_SSDT_LAPTOP_SLATE (1<<15)
|
|
|
|
struct xen_vmemrange;
|
|
struct acpi_numa {
|
|
uint32_t nr_vmemranges;
|
|
uint32_t nr_vnodes;
|
|
const unsigned int *vcpu_to_vnode;
|
|
const unsigned int *vdistance;
|
|
const struct xen_vmemrange *vmemrange;
|
|
};
|
|
|
|
struct acpi_ctxt {
|
|
struct acpi_mem_ops {
|
|
void *(*alloc)(struct acpi_ctxt *ctxt, uint32_t size, uint32_t align);
|
|
void (*free)(struct acpi_ctxt *ctxt, void *v, uint32_t size);
|
|
unsigned long (*v2p)(struct acpi_ctxt *ctxt, void *v);
|
|
} mem_ops;
|
|
};
|
|
|
|
struct acpi_config {
|
|
const unsigned char *dsdt_anycpu;
|
|
unsigned int dsdt_anycpu_len;
|
|
const unsigned char *dsdt_15cpu;
|
|
unsigned int dsdt_15cpu_len;
|
|
|
|
/* PCI I/O hole */
|
|
uint32_t pci_start, pci_len;
|
|
uint64_t pci_hi_start, pci_hi_len;
|
|
|
|
uint32_t table_flags;
|
|
uint8_t acpi_revision;
|
|
uint8_t tpm_version;
|
|
|
|
uint64_t vm_gid[2];
|
|
unsigned long vm_gid_addr; /* OUT parameter */
|
|
|
|
struct {
|
|
uint32_t addr;
|
|
uint32_t length;
|
|
} pt;
|
|
|
|
struct acpi_numa numa;
|
|
const struct hvm_info_table *hvminfo;
|
|
|
|
const uint16_t *tis_hdr;
|
|
const uint16_t *crb_id;
|
|
|
|
/*
|
|
* Address where acpi_info should be placed.
|
|
* This must match the OperationRegion(BIOS, SystemMemory, ....)
|
|
* definition in the DSDT
|
|
*/
|
|
unsigned long infop;
|
|
|
|
/* RSDP address */
|
|
unsigned long rsdp;
|
|
|
|
/* x86-specific parameters */
|
|
uint32_t (*lapic_id)(unsigned cpu);
|
|
uint32_t lapic_base_address;
|
|
uint32_t ioapic_base_address;
|
|
uint16_t pci_isa_irq_mask;
|
|
uint8_t ioapic_id;
|
|
};
|
|
|
|
int acpi_build_tables(struct acpi_ctxt *ctxt, struct acpi_config *config);
|
|
|
|
#endif /* __LIBACPI_H__ */
|
|
|
|
/*
|
|
* Local variables:
|
|
* mode: C
|
|
* c-file-style: "BSD"
|
|
* c-basic-offset: 4
|
|
* tab-width: 4
|
|
* indent-tabs-mode: nil
|
|
* End:
|
|
*/
|