debug("ACPI: * DSDT\n");
dsdt = (struct acpi_table_header *)current;
memcpy(dsdt, &AmlCode, sizeof(struct acpi_table_header));
- if (dsdt->length >= sizeof(struct acpi_table_header)) {
- current += sizeof(struct acpi_table_header);
- memcpy((char *)current,
- (char *)&AmlCode + sizeof(struct acpi_table_header),
- dsdt->length - sizeof(struct acpi_table_header));
- current += dsdt->length - sizeof(struct acpi_table_header);
- }
+ current += sizeof(struct acpi_table_header);
+ memcpy((char *)current,
+ (char *)&AmlCode + sizeof(struct acpi_table_header),
+ dsdt->length - sizeof(struct acpi_table_header));
+ current += dsdt->length - sizeof(struct acpi_table_header);
current = ALIGN(current, 16);
debug("ACPI: * FADT\n");
debug("ACPI: * MADT\n");
madt = (struct acpi_madt *)current;
acpi_create_madt(madt);
- if (madt->header.length > sizeof(struct acpi_madt)) {
- current += madt->header.length;
- acpi_add_table(rsdp, madt);
- }
+ current += madt->header.length;
+ acpi_add_table(rsdp, madt);
current = ALIGN(current, 16);
debug("ACPI: * MCFG\n");
mcfg = (struct acpi_mcfg *)current;
acpi_create_mcfg(mcfg);
- if (mcfg->header.length > sizeof(struct acpi_mcfg)) {
- current += mcfg->header.length;
- current = ALIGN(current, 16);
- acpi_add_table(rsdp, mcfg);
- }
+ current += mcfg->header.length;
+ acpi_add_table(rsdp, mcfg);
+ current = ALIGN(current, 16);
debug("current = %x\n", current);