^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * Name: actables.h - ACPI table management
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Copyright (C) 2000 - 2020, Intel Corp.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) *****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #ifndef __ACTABLES_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #define __ACTABLES_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) acpi_status acpi_allocate_root_table(u32 initial_table_count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) * tbxfroot - Root pointer utilities
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) u32 acpi_tb_get_rsdp_length(struct acpi_table_rsdp *rsdp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) u8 *acpi_tb_scan_memory_for_rsdp(u8 *start_address, u32 length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) * tbdata - table data structure management
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) acpi_tb_get_next_table_descriptor(u32 *table_index,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) struct acpi_table_desc **table_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) acpi_tb_init_table_descriptor(struct acpi_table_desc *table_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) acpi_physical_address address,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) u8 flags, struct acpi_table_header *table);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) acpi_tb_acquire_temp_table(struct acpi_table_desc *table_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) acpi_physical_address address, u8 flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) void acpi_tb_release_temp_table(struct acpi_table_desc *table_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) acpi_status acpi_tb_validate_temp_table(struct acpi_table_desc *table_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) char *signature, u32 *table_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) u8 acpi_tb_is_table_loaded(u32 table_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) void acpi_tb_set_table_loaded_flag(u32 table_index, u8 is_loaded);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) * tbfadt - FADT parse/convert/validate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) void acpi_tb_parse_fadt(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) * tbfind - find ACPI table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) acpi_tb_find_table(char *signature,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) char *oem_id, char *oem_table_id, u32 *table_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) * tbinstal - Table removal and deletion
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) acpi_status acpi_tb_resize_root_table_list(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) acpi_status acpi_tb_validate_table(struct acpi_table_desc *table_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) void acpi_tb_invalidate_table(struct acpi_table_desc *table_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) void acpi_tb_override_table(struct acpi_table_desc *old_table_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) acpi_tb_acquire_table(struct acpi_table_desc *table_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) struct acpi_table_header **table_ptr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) u32 *table_length, u8 *table_flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) acpi_tb_release_table(struct acpi_table_header *table,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) u32 table_length, u8 table_flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) acpi_tb_install_standard_table(acpi_physical_address address,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) u8 flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) u8 reload, u8 override, u32 *table_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) void acpi_tb_uninstall_table(struct acpi_table_desc *table_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) acpi_tb_load_table(u32 table_index, struct acpi_namespace_node *parent_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) acpi_tb_install_and_load_table(acpi_physical_address address,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) u8 flags, u8 override, u32 *table_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) acpi_status acpi_tb_unload_table(u32 table_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) void acpi_tb_notify_table(u32 event, void *table);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) void acpi_tb_terminate(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) acpi_status acpi_tb_delete_namespace_by_owner(u32 table_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) acpi_status acpi_tb_allocate_owner_id(u32 table_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) acpi_status acpi_tb_release_owner_id(u32 table_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) acpi_status acpi_tb_get_owner_id(u32 table_index, acpi_owner_id *owner_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) * tbutils - table manager utilities
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) acpi_status acpi_tb_initialize_facs(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) acpi_tb_print_table_header(acpi_physical_address address,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) struct acpi_table_header *header);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) u8 acpi_tb_checksum(u8 *buffer, u32 length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) void acpi_tb_check_dsdt_header(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) struct acpi_table_header *acpi_tb_copy_dsdt(u32 table_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) void
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) acpi_tb_install_table_with_override(struct acpi_table_desc *new_table_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) u8 override, u32 *table_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) acpi_status acpi_tb_parse_root_table(acpi_physical_address rsdp_address);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) acpi_status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) acpi_tb_get_table(struct acpi_table_desc *table_desc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) struct acpi_table_header **out_table);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) void acpi_tb_put_table(struct acpi_table_desc *table_desc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) * tbxfload
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) acpi_status acpi_tb_load_namespace(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) #endif /* __ACTABLES_H__ */