Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
0002 /******************************************************************************
0003  *
0004  * Module Name: acapps - common include for ACPI applications/tools
0005  *
0006  * Copyright (C) 2000 - 2022, Intel Corp.
0007  *
0008  *****************************************************************************/
0009 
0010 #ifndef _ACCONVERT
0011 #define _ACCONVERT
0012 
0013 /* Definitions for comment state */
0014 
0015 #define ASL_COMMENT_STANDARD    1
0016 #define ASLCOMMENT_INLINE       2
0017 #define ASL_COMMENT_OPEN_PAREN  3
0018 #define ASL_COMMENT_CLOSE_PAREN 4
0019 #define ASL_COMMENT_CLOSE_BRACE 5
0020 
0021 /* Definitions for comment print function*/
0022 
0023 #define AML_COMMENT_STANDARD    1
0024 #define AMLCOMMENT_INLINE       2
0025 #define AML_COMMENT_END_NODE    3
0026 #define AML_NAMECOMMENT         4
0027 #define AML_COMMENT_CLOSE_BRACE 5
0028 #define AML_COMMENT_ENDBLK      6
0029 #define AML_COMMENT_INCLUDE     7
0030 
0031 #ifdef ACPI_ASL_COMPILER
0032 /*
0033  * cvcompiler
0034  */
0035 void
0036 cv_process_comment(struct asl_comment_state current_state,
0037            char *string_buffer, int c1);
0038 
0039 void
0040 cv_process_comment_type2(struct asl_comment_state current_state,
0041              char *string_buffer);
0042 
0043 u32 cv_calculate_comment_lengths(union acpi_parse_object *op);
0044 
0045 void cv_process_comment_state(char input);
0046 
0047 char *cv_append_inline_comment(char *inline_comment, char *to_add);
0048 
0049 void cv_add_to_comment_list(char *to_add);
0050 
0051 void cv_place_comment(u8 type, char *comment_string);
0052 
0053 u32 cv_parse_op_block_type(union acpi_parse_object *op);
0054 
0055 struct acpi_comment_node *cv_comment_node_calloc(void);
0056 
0057 void cg_write_aml_def_block_comment(union acpi_parse_object *op);
0058 
0059 void
0060 cg_write_one_aml_comment(union acpi_parse_object *op,
0061              char *comment_to_print, u8 input_option);
0062 
0063 void cg_write_aml_comment(union acpi_parse_object *op);
0064 
0065 /*
0066  * cvparser
0067  */
0068 void cv_init_file_tree(struct acpi_table_header *table, FILE * root_file);
0069 
0070 void cv_clear_op_comments(union acpi_parse_object *op);
0071 
0072 struct acpi_file_node *cv_filename_exists(char *filename,
0073                       struct acpi_file_node *head);
0074 
0075 void cv_label_file_node(union acpi_parse_object *op);
0076 
0077 void
0078 cv_capture_list_comments(struct acpi_parse_state *parser_state,
0079              struct acpi_comment_node *list_head,
0080              struct acpi_comment_node *list_tail);
0081 
0082 void cv_capture_comments_only(struct acpi_parse_state *parser_state);
0083 
0084 void cv_capture_comments(struct acpi_walk_state *walk_state);
0085 
0086 void cv_transfer_comments(union acpi_parse_object *op);
0087 
0088 /*
0089  * cvdisasm
0090  */
0091 void cv_switch_files(u32 level, union acpi_parse_object *op);
0092 
0093 u8 cv_file_has_switched(union acpi_parse_object *op);
0094 
0095 void cv_close_paren_write_comment(union acpi_parse_object *op, u32 level);
0096 
0097 void cv_close_brace_write_comment(union acpi_parse_object *op, u32 level);
0098 
0099 void
0100 cv_print_one_comment_list(struct acpi_comment_node *comment_list, u32 level);
0101 
0102 void
0103 cv_print_one_comment_type(union acpi_parse_object *op,
0104               u8 comment_type, char *end_str, u32 level);
0105 
0106 #endif
0107 
0108 #endif              /* _ACCONVERT */