[coreboot] GENFADT and GENDSDT
Corey Osgood
corey.osgood at gmail.com
Mon Jan 28 07:01:57 CET 2008
Corey Osgood wrote:
> Urbez Santana Roma wrote:
>> I have not found one tool that can obtain the fadt.c and dsdt.c from the
>> machine trough /proc/acpi/fadt and /proc/acpi/dsdt
>>
>> I have write the two utilities, if one needs it.
>>
>> Urbez.
>>
>> NOTE: you can compile the tools simply written "make genfadt" and "make
>> gendsdt"
>
> Cool! Can you repost them with a copyright header and Signed-off-by:
> line (http://www.coreboot.org/Development_Guidelines)? Then I can give
> them a permanent home in the repos. I'll try them out in a few minutes.
Ok, just a couple little nuances, but it seems to work fine:
> fprintf(w,"#include <string.h>\n");
> fprintf(w,"#include <arch/acpi.h>\n\n");
> fprintf(w,"void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t
> *facs,void *dsdt){\n");
> fprintf(w," acpi_header_t *header=&(fadt->header);\n\n");
Extra newline at the start of this line please, makes it much clearer.
> fprintf(w," memset((void *)fadt,0,sizeof(acpi_fadt_t));\n");
>
> print_acpi_header(w,"fadt->header",FADT.header);
> fprintf(w,"\nfadt->firmware_ctrl=facs;\n");
> fprintf(w,"fadt->dsdt=dsdt;\n\n");
These 2 lines don't tab in like the rest do.
> print_u8(w,"fadt->res1",FADT.res1);
> print_u8(w,"fadt->preferred_pm_profile",FADT.preferred_pm_profile);
[...]
> fprintf(w,"\nfadt->x_firmware_ctl_l=facs;\n");
> fprintf(w,"fadt->x_firmware_ctl_h=0;\n");
> fprintf(w,"fadt->x_dsdt_l=dsdt;\n");
> fprintf(w,"fadt->x_dsdt_h=0;\n\n");
Same with these 4.
Thanks for these, it should make the case where we can't distribute
factory ACPI tables much easier to deal with.
-Corey
More information about the coreboot
mailing list