mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-17 02:08:38 +00:00
d2628984b7
Add an implementation of the HPET (High Precision Event Timer) ACPI table. Since this is x86-specific, put it in an x86-specific file Signed-off-by: Simon Glass <sjg@chromium.org>
68 lines
1.9 KiB
C
68 lines
1.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Based on acpi.c from coreboot
|
|
*
|
|
* Copyright (C) 2015, Saket Sinha <saket.sinha89@gmail.com>
|
|
* Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com>
|
|
*/
|
|
|
|
#ifndef __ASM_ACPI_TABLE_H__
|
|
#define __ASM_ACPI_TABLE_H__
|
|
|
|
struct acpi_facs;
|
|
struct acpi_fadt;
|
|
struct acpi_global_nvs;
|
|
struct acpi_madt_ioapic;
|
|
struct acpi_madt_irqoverride;
|
|
struct acpi_madt_lapic_nmi;
|
|
struct acpi_mcfg_mmconfig;
|
|
struct acpi_table_header;
|
|
|
|
/* These can be used by the target port */
|
|
|
|
void acpi_fill_header(struct acpi_table_header *header, char *signature);
|
|
void acpi_create_fadt(struct acpi_fadt *fadt, struct acpi_facs *facs,
|
|
void *dsdt);
|
|
int acpi_create_madt_lapics(u32 current);
|
|
int acpi_create_madt_ioapic(struct acpi_madt_ioapic *ioapic, u8 id,
|
|
u32 addr, u32 gsi_base);
|
|
int acpi_create_madt_irqoverride(struct acpi_madt_irqoverride *irqoverride,
|
|
u8 bus, u8 source, u32 gsirq, u16 flags);
|
|
int acpi_create_madt_lapic_nmi(struct acpi_madt_lapic_nmi *lapic_nmi,
|
|
u8 cpu, u16 flags, u8 lint);
|
|
u32 acpi_fill_madt(u32 current);
|
|
int acpi_create_mcfg_mmconfig(struct acpi_mcfg_mmconfig *mmconfig, u32 base,
|
|
u16 seg_nr, u8 start, u8 end);
|
|
u32 acpi_fill_mcfg(u32 current);
|
|
u32 acpi_fill_csrt(u32 current);
|
|
|
|
/**
|
|
* acpi_write_hpet() - Write out a HPET table
|
|
*
|
|
* Write out the table for High-Precision Event Timers
|
|
*
|
|
* @ctx: Current ACPI context
|
|
* @return 0 if OK, -ve on error
|
|
*/
|
|
int acpi_write_hpet(struct acpi_ctx *ctx);
|
|
|
|
/**
|
|
* acpi_create_gnvs() - Create a GNVS (Global Non Volatile Storage) table
|
|
*
|
|
* @gnvs: Table to fill in
|
|
* @return 0 if OK, -ve on error
|
|
*/
|
|
int acpi_create_gnvs(struct acpi_global_nvs *gnvs);
|
|
|
|
ulong write_acpi_tables(ulong start);
|
|
|
|
/**
|
|
* acpi_get_rsdp_addr() - get ACPI RSDP table address
|
|
*
|
|
* This routine returns the ACPI RSDP table address in the system memory.
|
|
*
|
|
* @return: ACPI RSDP table address
|
|
*/
|
|
ulong acpi_get_rsdp_addr(void);
|
|
|
|
#endif /* __ASM_ACPI_TABLE_H__ */
|