tools: add tool to decode AML files and build an ACPI namespace
This commit is contained in:
17
tools/amldecode/aml/value.c
Normal file
17
tools/amldecode/aml/value.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "value.h"
|
||||
|
||||
uint64_t aml_value_get_integer(const struct aml_value *value)
|
||||
{
|
||||
switch (value->type) {
|
||||
case AML_VALUE_UINT8:
|
||||
return value->value.uint8;
|
||||
case AML_VALUE_UINT16:
|
||||
return value->value.uint8;
|
||||
case AML_VALUE_UINT32:
|
||||
return value->value.uint8;
|
||||
case AML_VALUE_UINT64:
|
||||
return value->value.uint8;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user