[coreboot] [commit] r5286 - ...

Myles Watson mylesgw at gmail.com
Thu Mar 25 23:07:29 CET 2010


> I changed one as an example now...
> I guess we could optimize to not copy the header twice, but the header
> is really small, so i didn't care to make the code uglier.
I agree.

> @@ -273,8 +273,10 @@
>      acpi_create_facs(facs);
> 
>      dsdt = (acpi_header_t *) current;
> -    current += AmlCode.length;
> -    memcpy((void *) dsdt, &AmlCode, AmlCode.length);
> +    memcpy((void *) dsdt, AmlCode, sizeof(acpi_header_t));
> +    int len = dsdt->length;
> +    current += len;
> +    memcpy((void *) dsdt, AmlCode, len);

Why not:
> +    current += dstd->length;
> +    memcpy((void *) dsdt, AmlCode, dsdt->length);

I don't think the extra variable adds anything.

I'll ack that.

Thanks,
Myles





More information about the coreboot mailing list