1/*
2 * Copyright 2017, Data61
3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4 * ABN 41 687 119 230.
5 *
6 * This software may be distributed and modified according to the terms of
7 * the BSD 2-Clause license. Note that NO WARRANTY is provided.
8 * See "LICENSE_BSD2.txt" for details.
9 *
10 * @TAG(DATA61_BSD)
11 */
12
13#include <stdbool.h>
14
15#include <platsupport/plat/acpi/regions.h>
16#include <platsupport/plat/acpi/acpi.h>
17
18#include "regions.h"
19/*
20 * Find the address of "sig" between the given addresses.
21 * sig_len provides the length of sig to allow a sig that
22 * is not NULL terminated.
23 * -- In general, use this to find the RSDT pointer
24 */
25void*
26acpi_sig_search(acpi_t* acpi, const char* sig, int sig_len, void* start, void* end);
27
28/*
29 * walk the tables and report table locations and sizes
30 * Returns -1 if unable to parse RSDP, 0 on success
31 */
32int
33acpi_parse_tables(acpi_t *acpi);
34
35/*
36 * Parse the acpi table given its paddr.
37 * Returns a dynamically allocated copy of the table
38 * header. Returns NULL if unable to parse the table.
39 */
40acpi_header_t*
41acpi_parse_table(acpi_t *acpi, void *table_paddr);
42