1 // Copyright 2020 The Fuchsia Authors 2 // Copyright 2021 Travis Geiselbrecht 3 // 4 // Use of this source code is governed by a MIT-style 5 // license that can be found in the LICENSE file or at 6 // https://opensource.org/licenses/MIT 7 #pragma once 8 9 #include <lib/acpi_lite/structs.h> 10 11 #include <stdint.h> 12 #include <lk/compiler.h> 13 #include <assert.h> 14 15 __BEGIN_CDECLS 16 17 status_t acpi_lite_init(paddr_t rsdt); 18 void acpi_lite_dump_tables(void); 19 20 const struct acpi_sdt_header* acpi_get_table_by_sig(const char* sig); 21 const struct acpi_sdt_header* acpi_get_table_at_index(size_t index); 22 23 // A routine to iterate over all the MADT entries of a particular type via a callback 24 //using MadtEntryCallback = fbl::Function<void(const void* entry, size_t entry_len)>; 25 typedef void (*madt_entry_callback)(const void* entry, size_t entry_len); 26 status_t acpi_process_madt_entries_etc(uint8_t search_type, const madt_entry_callback); 27 28 __END_CDECLS 29