diff mbox

[U-Boot,v2,18/28] x86: acpi: Align FACS table to a 64 byte boundary

Message ID 1462632397-11224-19-git-send-email-bmeng.cn@gmail.com
State Accepted
Commit 25e133ecb760a46f6b4a88b4b17aecfb0d6af8dd
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng May 7, 2016, 2:46 p.m. UTC
Per ACPI spec, the FACS table address must be aligned to a 64 byte
boundary (Windows checks this, but Linux does not).

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>

---

Changes in v2:
- Add comments before the 64 byte alignment for FACS

 arch/x86/lib/acpi_table.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Simon Glass May 7, 2016, 6:46 p.m. UTC | #1
On 7 May 2016 at 08:46, Bin Meng <bmeng.cn@gmail.com> wrote:
> Per ACPI spec, the FACS table address must be aligned to a 64 byte
> boundary (Windows checks this, but Linux does not).
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> Reviewed-by: Stefan Roese <sr@denx.de>
> Tested-by: Stefan Roese <sr@denx.de>
>
> ---
>
> Changes in v2:
> - Add comments before the 64 byte alignment for FACS
>
>  arch/x86/lib/acpi_table.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng May 8, 2016, 8:18 a.m. UTC | #2
On Sun, May 8, 2016 at 2:46 AM, Simon Glass <sjg@chromium.org> wrote:
> On 7 May 2016 at 08:46, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Per ACPI spec, the FACS table address must be aligned to a 64 byte
>> boundary (Windows checks this, but Linux does not).
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> Reviewed-by: Stefan Roese <sr@denx.de>
>> Tested-by: Stefan Roese <sr@denx.de>
>>
>> ---
>>
>> Changes in v2:
>> - Add comments before the 64 byte alignment for FACS
>>
>>  arch/x86/lib/acpi_table.c | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86/next, thanks!
diff mbox

Patch

diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 7cde9c8..056d012 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -339,7 +339,11 @@  u32 write_acpi_tables(u32 start)
 	current = ALIGN(current, 16);
 	xsdt = (struct acpi_xsdt *)current;
 	current += sizeof(struct acpi_xsdt);
-	current = ALIGN(current, 16);
+	/*
+	 * Per ACPI spec, the FACS table address must be aligned to a 64 byte
+	 * boundary (Windows checks this, but Linux does not).
+	 */
+	current = ALIGN(current, 64);
 
 	/* clear all table memory */
 	memset((void *)start, 0, current - start);