diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2016-05-07 07:46:30 -0700 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2016-05-23 15:18:00 +0800 |
commit | fc4f5cccd87abf4c72b13f64b49719fde9107cad (patch) | |
tree | 37a01a67edb0a37489c40969e4b4e753ff526126 /arch/x86/lib | |
parent | 9e70a11622eb01c90c5152c08c3166adc60aed1e (diff) | |
download | u-boot-imx-fc4f5cccd87abf4c72b13f64b49719fde9107cad.zip u-boot-imx-fc4f5cccd87abf4c72b13f64b49719fde9107cad.tar.gz u-boot-imx-fc4f5cccd87abf4c72b13f64b49719fde9107cad.tar.bz2 |
x86: acpi: Return table length in acpi_create_madt_lapics()
Like other MADT table write routines, make acpi_create_madt_lapics()
return how many bytes it has written instead of the table end addr.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r-- | arch/x86/lib/acpi_table.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index 8fef9b8..989cf7d 100644 --- a/arch/x86/lib/acpi_table.c +++ b/arch/x86/lib/acpi_table.c @@ -179,21 +179,23 @@ static int acpi_create_madt_lapic(struct acpi_madt_lapic *lapic, return lapic->length; } -u32 acpi_create_madt_lapics(u32 current) +int acpi_create_madt_lapics(u32 current) { struct udevice *dev; + int length = 0; for (uclass_find_first_device(UCLASS_CPU, &dev); dev; uclass_find_next_device(&dev)) { struct cpu_platdata *plat = dev_get_parent_platdata(dev); - current += acpi_create_madt_lapic( + length += acpi_create_madt_lapic( (struct acpi_madt_lapic *)current, plat->cpu_id, plat->cpu_id); + current += length; } - return current; + return length; } int acpi_create_madt_ioapic(struct acpi_madt_ioapic *ioapic, u8 id, |