Turnstone Operating System
Loading...
Searching...
No Matches
acpi_aml_parser_opcodes.64.c File Reference

acpi aml opcode parser methods More...

#include <acpi/aml_internal.h>
#include <logging.h>

Macros

#define OPCODEPARSER(num)
 
#define EXTOPCODEPARSER(num)
 

Functions

 MODULE ("turnstone.kernel.hw.acpi")
 
int8_t acpi_aml_parse_op_code_with_cnt (uint16_t oc, uint8_t opcnt, acpi_aml_parser_context_t *ctx, void **data, uint64_t *consumed, acpi_aml_object_t *preop)
 
 OPCODEPARSER (0)
 
 OPCODEPARSER (1)
 
 OPCODEPARSER (2)
 
 OPCODEPARSER (3)
 
 OPCODEPARSER (4)
 
 EXTOPCODEPARSER (0)
 
 EXTOPCODEPARSER (1)
 
 EXTOPCODEPARSER (2)
 
 EXTOPCODEPARSER (6)
 
int8_t acpi_aml_parse_logic_ext (acpi_aml_parser_context_t *ctx, void **data, uint64_t *consumed)
 
int8_t acpi_aml_parse_op_if (acpi_aml_parser_context_t *ctx, void **data, uint64_t *consumed)
 
int8_t acpi_aml_parse_op_else (acpi_aml_parser_context_t *ctx, void **data, uint64_t *consumed)
 
int8_t acpi_aml_parse_fatal (acpi_aml_parser_context_t *ctx, void **data, uint64_t *consumed)
 
int8_t acpi_aml_parse_op_match (acpi_aml_parser_context_t *ctx, void **data, uint64_t *consumed)
 
int8_t acpi_aml_parse_op_while (acpi_aml_parser_context_t *ctx, void **data, uint64_t *consumed)
 

Detailed Description

acpi aml opcode parser methods

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Macro Definition Documentation

◆ EXTOPCODEPARSER

#define EXTOPCODEPARSER (   num)
Value:
int8_t acpi_aml_parse_extopcnt_ ## num(acpi_aml_parser_context_t * ctx, void** data, uint64_t * consumed){ \
uint64_t t_consumed = 1; \
uint16_t oc = 0x5b00; \
uint8_t t_oc = *ctx->data; \
oc |= t_oc; \
ctx->data++; \
ctx->remaining--; \
\
if(acpi_aml_parse_op_code_with_cnt(oc, num, ctx, data, &t_consumed, NULL) != 0) { \
return -1; \
} \
\
if(consumed != NULL) { \
*consumed = t_consumed; \
} \
\
return 0; \
}
uint32_t data[1]
data 1~N
Definition: ahci.h:4
Definition: aml.h:186
unsigned short uint16_t
Definition: types.h:34
unsigned long long uint64_t
Definition: types.h:45
unsigned char uint8_t
Definition: types.h:24
char int8_t
Definition: types.h:20

◆ OPCODEPARSER

#define OPCODEPARSER (   num)
Value:
int8_t acpi_aml_parse_opcnt_ ## num(acpi_aml_parser_context_t * ctx, void** data, uint64_t * consumed){ \
uint64_t t_consumed = 1; \
uint8_t oc = *ctx->data; \
ctx->data++; \
ctx->remaining--; \
\
if(acpi_aml_parse_op_code_with_cnt(oc, num, ctx, data, &t_consumed, NULL) != 0) { \
return -1; \
} \
\
if(consumed != NULL) { \
*consumed = t_consumed; \
} \
\
return 0; \
}