Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
0002 /******************************************************************************
0003  *
0004  * Name: actables.h - ACPI table management
0005  *
0006  * Copyright (C) 2000 - 2022, Intel Corp.
0007  *
0008  *****************************************************************************/
0009 
0010 #ifndef __ACTABLES_H__
0011 #define __ACTABLES_H__
0012 
0013 acpi_status acpi_allocate_root_table(u32 initial_table_count);
0014 
0015 /*
0016  * tbxfroot - Root pointer utilities
0017  */
0018 u32 acpi_tb_get_rsdp_length(struct acpi_table_rsdp *rsdp);
0019 
0020 acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp);
0021 
0022 u8 *acpi_tb_scan_memory_for_rsdp(u8 *start_address, u32 length);
0023 
0024 /*
0025  * tbdata - table data structure management
0026  */
0027 acpi_status
0028 acpi_tb_get_next_table_descriptor(u32 *table_index,
0029                   struct acpi_table_desc **table_desc);
0030 
0031 void
0032 acpi_tb_init_table_descriptor(struct acpi_table_desc *table_desc,
0033                   acpi_physical_address address,
0034                   u8 flags, struct acpi_table_header *table);
0035 
0036 acpi_status
0037 acpi_tb_acquire_temp_table(struct acpi_table_desc *table_desc,
0038                acpi_physical_address address,
0039                u8 flags, struct acpi_table_header *table);
0040 
0041 void acpi_tb_release_temp_table(struct acpi_table_desc *table_desc);
0042 
0043 acpi_status acpi_tb_validate_temp_table(struct acpi_table_desc *table_desc);
0044 
0045 acpi_status
0046 acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc,
0047               char *signature, u32 *table_index);
0048 
0049 u8 acpi_tb_is_table_loaded(u32 table_index);
0050 
0051 void acpi_tb_set_table_loaded_flag(u32 table_index, u8 is_loaded);
0052 
0053 /*
0054  * tbfadt - FADT parse/convert/validate
0055  */
0056 void acpi_tb_parse_fadt(void);
0057 
0058 void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length);
0059 
0060 /*
0061  * tbfind - find ACPI table
0062  */
0063 acpi_status
0064 acpi_tb_find_table(char *signature,
0065            char *oem_id, char *oem_table_id, u32 *table_index);
0066 
0067 /*
0068  * tbinstal - Table removal and deletion
0069  */
0070 acpi_status acpi_tb_resize_root_table_list(void);
0071 
0072 acpi_status acpi_tb_validate_table(struct acpi_table_desc *table_desc);
0073 
0074 void acpi_tb_invalidate_table(struct acpi_table_desc *table_desc);
0075 
0076 void acpi_tb_override_table(struct acpi_table_desc *old_table_desc);
0077 
0078 acpi_status
0079 acpi_tb_acquire_table(struct acpi_table_desc *table_desc,
0080               struct acpi_table_header **table_ptr,
0081               u32 *table_length, u8 *table_flags);
0082 
0083 void
0084 acpi_tb_release_table(struct acpi_table_header *table,
0085               u32 table_length, u8 table_flags);
0086 
0087 acpi_status
0088 acpi_tb_install_standard_table(acpi_physical_address address,
0089                    u8 flags,
0090                    struct acpi_table_header *table,
0091                    u8 reload, u8 override, u32 *table_index);
0092 
0093 void acpi_tb_uninstall_table(struct acpi_table_desc *table_desc);
0094 
0095 acpi_status
0096 acpi_tb_load_table(u32 table_index, struct acpi_namespace_node *parent_node);
0097 
0098 acpi_status
0099 acpi_tb_install_and_load_table(acpi_physical_address address,
0100                    u8 flags,
0101                    struct acpi_table_header *table,
0102                    u8 override, u32 *table_index);
0103 
0104 acpi_status acpi_tb_unload_table(u32 table_index);
0105 
0106 void acpi_tb_notify_table(u32 event, void *table);
0107 
0108 void acpi_tb_terminate(void);
0109 
0110 acpi_status acpi_tb_delete_namespace_by_owner(u32 table_index);
0111 
0112 acpi_status acpi_tb_allocate_owner_id(u32 table_index);
0113 
0114 acpi_status acpi_tb_release_owner_id(u32 table_index);
0115 
0116 acpi_status acpi_tb_get_owner_id(u32 table_index, acpi_owner_id *owner_id);
0117 
0118 /*
0119  * tbutils - table manager utilities
0120  */
0121 acpi_status acpi_tb_initialize_facs(void);
0122 
0123 void
0124 acpi_tb_print_table_header(acpi_physical_address address,
0125                struct acpi_table_header *header);
0126 
0127 u8 acpi_tb_checksum(u8 *buffer, u32 length);
0128 
0129 acpi_status
0130 acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length);
0131 
0132 void acpi_tb_check_dsdt_header(void);
0133 
0134 struct acpi_table_header *acpi_tb_copy_dsdt(u32 table_index);
0135 
0136 void
0137 acpi_tb_install_table_with_override(struct acpi_table_desc *new_table_desc,
0138                     u8 override, u32 *table_index);
0139 
0140 acpi_status acpi_tb_parse_root_table(acpi_physical_address rsdp_address);
0141 
0142 acpi_status
0143 acpi_tb_get_table(struct acpi_table_desc *table_desc,
0144           struct acpi_table_header **out_table);
0145 
0146 void acpi_tb_put_table(struct acpi_table_desc *table_desc);
0147 
0148 /*
0149  * tbxfload
0150  */
0151 acpi_status acpi_tb_load_namespace(void);
0152 
0153 #endif              /* __ACTABLES_H__ */