so i downloaded acpica, and got to compile with visual under windows, just had to compile few stuff under linux because it use yacc and bison to build some files needed for the build , so far so good even if the makefile seem rather horrendous, they just pick files in the directories depending on the build, and the makefile contain a big list of .o file to build, and if you build files from the directories that are not in the makefile , some symbols are defined twice, so the design seem a bit poor but i got it to compile the iasl with visual and it seem to works for now
now what bother me, the isal is 500k at this point it's half the size of my os including usb, audio, memory allocation, ndis emulation layer, file system and all so it's bit bothering me, and i'm going to try to cut it down to have just the part that dissemble the aml from memory, and cut down the compile and file management, and also trying to get rid of all the awfull global variable ,cause my abi doesn't support non initialised section for the moment, and i don't like the principle to have global variable specially i'll probably compile it to a dll, so i'll try to cut it down to minimum for just dissembly of aml code from memory, and cut down os dependency as well, i just looked at the code quickly to get it to compile under visual, it seem doable for the moment i'll see how that goes
i know it's under license, i'm not a lawyer, so i don't know if it's even supposed to be legal to extract code, but i'm pretty used to do that kind of thing on many library, it will probably take me some time, but i think i'll figure it out and get it to minimum for dissambly, did anyone even got into acpica library a bit in depth, or already tried to do that, or would know otherwise other library that are lighter and could just disassemble the aml from memory in a simpler/cleaner way than the iasl ?
it doesn't seem that complicated for the moment, apparently the main entry point to dissasemble from memory are
Code: Select all
/******************************************************************************
*
* FUNCTION: AdParseTable
*
* PARAMETERS: Table - Pointer to the raw table
* OwnerId - Returned OwnerId of the table
* LoadTable - If add table to the global table list
* External - If this is an external table
*
* RETURN: Status
*
* DESCRIPTION: Parse the DSDT.
*
*****************************************************************************/
ACPI_STATUS
AdParseTable (
ACPI_TABLE_HEADER *Table,
ACPI_OWNER_ID *OwnerId,
BOOLEAN LoadTable,
BOOLEAN External)
Code: Select all
/*******************************************************************************
*
* FUNCTION: AcpiDmFinishNamespaceLoad
*
* PARAMETERS: ParseTreeRoot - Root of the parse tree
* NamespaceRoot - Root of the internal namespace
* OwnerId - OwnerId of the table to be disassembled
*
* RETURN: None
*
* DESCRIPTION: Load all namespace items that are created within control
* methods. Used before namespace cross reference
*
******************************************************************************/
void
AcpiDmFinishNamespaceLoad (
ACPI_PARSE_OBJECT *ParseTreeRoot,
ACPI_NAMESPACE_NODE *NamespaceRoot,
ACPI_OWNER_ID OwnerId)
basically my goal would be more or less to rewrite this function and use it as entry point in a dynamically linked library, but without anykind of file input/output, just using directly the table fetching and output to a memory buffer
Code: Select all
/******************************************************************************
*
* FUNCTION: AdAmlDisassemble
*
* PARAMETERS: Filename - AML input filename
* OutToFile - TRUE if output should go to a file
* Prefix - Path prefix for output
* OutFilename - where the filename is returned
* GetAllTables - TRUE if all tables are desired
*
* RETURN: Status
*
* DESCRIPTION: Disassemble an entire ACPI table
*
*****************************************************************************/
ACPI_STATUS
AdAmlDisassemble (
BOOLEAN OutToFile,
char *Filename,
char *Prefix,
char **OutFilename,
BOOLEAN GetAllTables)