11da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/****************************************************************************** 21da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 31da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Name: actables.h - ACPI table management 41da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 51da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *****************************************************************************/ 61da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 71da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* 877848130e53b06c22fe37a7b6acbb82bb3e9bfbaBob Moore * Copyright (C) 2000 - 2012, Intel Corp. 91da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * All rights reserved. 101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Redistribution and use in source and binary forms, with or without 121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * modification, are permitted provided that the following conditions 131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * are met: 141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 1. Redistributions of source code must retain the above copyright 151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * notice, this list of conditions, and the following disclaimer, 161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * without modification. 171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 2. Redistributions in binary form must reproduce at minimum a disclaimer 181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * substantially similar to the "NO WARRANTY" disclaimer below 191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * ("Disclaimer") and any redistribution must be conditioned upon 201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * including a substantially similar Disclaimer requirement for further 211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * binary redistribution. 221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 3. Neither the names of the above-listed copyright holders nor the names 231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * of any contributors may be used to endorse or promote products derived 241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * from this software without specific prior written permission. 251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Alternatively, this software may be distributed under the terms of the 271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * GNU General Public License ("GPL") version 2 as published by the Free 281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Software Foundation. 291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * NO WARRANTY 311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * POSSIBILITY OF SUCH DAMAGES. 421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */ 431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifndef __ACTABLES_H__ 451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define __ACTABLES_H__ 461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 4777389e1263a7c9bc8040bda726e08b6501ba1c8bBob Mooreacpi_status acpi_allocate_root_table(u32 initial_table_count); 4877389e1263a7c9bc8040bda726e08b6501ba1c8bBob Moore 491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* 50765ec20180fb70b4ee9d730167b2a0b76879f791Bob Moore * tbfadt - FADT parse/convert/validate 51765ec20180fb70b4ee9d730167b2a0b76879f791Bob Moore */ 5297cbb7d196845ec9a6c0e3cc33ec20503f8c4e73Bob Moorevoid acpi_tb_parse_fadt(u32 table_index); 53765ec20180fb70b4ee9d730167b2a0b76879f791Bob Moore 547139284460fba90c4dfcfae76680ad36b45f5982Bob Moorevoid acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length); 55ea5d8ebcbb7ca3bcb35a2133805571295f3f06e8Bob Moore 56765ec20180fb70b4ee9d730167b2a0b76879f791Bob Moore/* 57f3d2e7865c816258c699ff965768e46b50d536d3Bob Moore * tbfind - find ACPI table 581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */ 591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsacpi_status 60f3d2e7865c816258c699ff965768e46b50d536d3Bob Mooreacpi_tb_find_table(char *signature, 6167a119f990063f5662574f6d6414fe9bc5ece86aBob Moore char *oem_id, char *oem_table_id, u32 *table_index); 6244f6c01242da4e162f28d8e1216a8c7a91174605Robert Moore 6344f6c01242da4e162f28d8e1216a8c7a91174605Robert Moore/* 64f3d2e7865c816258c699ff965768e46b50d536d3Bob Moore * tbinstal - Table removal and deletion 6544f6c01242da4e162f28d8e1216a8c7a91174605Robert Moore */ 66f3d2e7865c816258c699ff965768e46b50d536d3Bob Mooreacpi_status acpi_tb_resize_root_table_list(void); 671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 68f3d2e7865c816258c699ff965768e46b50d536d3Bob Mooreacpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc); 691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 70f7b004a17c9183f023796dea0d70284684ec000dBob Moorestruct acpi_table_header *acpi_tb_table_override(struct acpi_table_header 71f7b004a17c9183f023796dea0d70284684ec000dBob Moore *table_header, 72f7b004a17c9183f023796dea0d70284684ec000dBob Moore struct acpi_table_desc 73f7b004a17c9183f023796dea0d70284684ec000dBob Moore *table_desc); 74f7b004a17c9183f023796dea0d70284684ec000dBob Moore 751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsacpi_status 7667a119f990063f5662574f6d6414fe9bc5ece86aBob Mooreacpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index); 771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsacpi_status 79f3d2e7865c816258c699ff965768e46b50d536d3Bob Mooreacpi_tb_store_table(acpi_physical_address address, 80f3d2e7865c816258c699ff965768e46b50d536d3Bob Moore struct acpi_table_header *table, 8167a119f990063f5662574f6d6414fe9bc5ece86aBob Moore u32 length, u8 flags, u32 *table_index); 821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 83428f211297bc95fd41f23830eab4180339020dd0Alexey Starikovskiyvoid acpi_tb_delete_table(struct acpi_table_desc *table_desc); 841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 85f3d2e7865c816258c699ff965768e46b50d536d3Bob Moorevoid acpi_tb_terminate(void); 861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 878a335a2331c72e60c6b3ef09b2dedd3ba00da1b1Bob Mooreacpi_status acpi_tb_delete_namespace_by_owner(u32 table_index); 881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 8967a119f990063f5662574f6d6414fe9bc5ece86aBob Mooreacpi_status acpi_tb_allocate_owner_id(u32 table_index); 90f3d2e7865c816258c699ff965768e46b50d536d3Bob Moore 9167a119f990063f5662574f6d6414fe9bc5ece86aBob Mooreacpi_status acpi_tb_release_owner_id(u32 table_index); 921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 9367a119f990063f5662574f6d6414fe9bc5ece86aBob Mooreacpi_status acpi_tb_get_owner_id(u32 table_index, acpi_owner_id *owner_id); 941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 9567a119f990063f5662574f6d6414fe9bc5ece86aBob Mooreu8 acpi_tb_is_table_loaded(u32 table_index); 96f9f4601f331aa1226d7a798a01950efbb388f07fRobert Moore 9767a119f990063f5662574f6d6414fe9bc5ece86aBob Moorevoid acpi_tb_set_table_loaded_flag(u32 table_index, u8 is_loaded); 981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* 100f3d2e7865c816258c699ff965768e46b50d536d3Bob Moore * tbutils - table manager utilities 1011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */ 102009c4cbe99bea2da53f29ad685975a36f38c001cBob Mooreacpi_status acpi_tb_initialize_facs(void); 103009c4cbe99bea2da53f29ad685975a36f38c001cBob Moore 104c857303ad496e1f52955e95994a67869882e89f9Bob Mooreu8 acpi_tb_tables_loaded(void); 105c857303ad496e1f52955e95994a67869882e89f9Bob Moore 106f3d2e7865c816258c699ff965768e46b50d536d3Bob Moorevoid 107f3d2e7865c816258c699ff965768e46b50d536d3Bob Mooreacpi_tb_print_table_header(acpi_physical_address address, 108f3d2e7865c816258c699ff965768e46b50d536d3Bob Moore struct acpi_table_header *header); 1090c9938cc75057c0fca1af55a55dcfc2842436695Robert Moore 11067a119f990063f5662574f6d6414fe9bc5ece86aBob Mooreu8 acpi_tb_checksum(u8 *buffer, u32 length); 1111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 112c5fc42ac4d4d6d3e3f619290b86890cb3725d2f8Bob Mooreacpi_status 113c5fc42ac4d4d6d3e3f619290b86890cb3725d2f8Bob Mooreacpi_tb_verify_checksum(struct acpi_table_header *table, u32 length); 114793c2388cae3fd023b3b5166354931752d42353cBob Moore 115729df0f848daf2f17d02107199fa92efe909d995Lin Mingvoid acpi_tb_check_dsdt_header(void); 116729df0f848daf2f17d02107199fa92efe909d995Lin Ming 11743323cb4c4b619414913f54fef9d492aabadd033Bob Moorestruct acpi_table_header *acpi_tb_copy_dsdt(u32 table_index); 11869ec87efa815d69140423014bb5f91e034faac22Lin Ming 119765ec20180fb70b4ee9d730167b2a0b76879f791Bob Moorevoid 120765ec20180fb70b4ee9d730167b2a0b76879f791Bob Mooreacpi_tb_install_table(acpi_physical_address address, 12197cbb7d196845ec9a6c0e3cc33ec20503f8c4e73Bob Moore char *signature, u32 table_index); 122765ec20180fb70b4ee9d730167b2a0b76879f791Bob Moore 12397cbb7d196845ec9a6c0e3cc33ec20503f8c4e73Bob Mooreacpi_status acpi_tb_parse_root_table(acpi_physical_address rsdp_address); 124793c2388cae3fd023b3b5166354931752d42353cBob Moore 1254be44fcd3bf648b782f4460fd06dfae6c42ded4bLen Brown#endif /* __ACTABLES_H__ */ 126