All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 13/22] x86: Do not clear high table area for S3
Date: Fri, 21 Apr 2017 07:24:40 -0700	[thread overview]
Message-ID: <1492784689-15701-14-git-send-email-bmeng.cn@gmail.com> (raw)
In-Reply-To: <1492784689-15701-1-git-send-email-bmeng.cn@gmail.com>

When SeaBIOS is being used, U-Boot reserves a memory area to be
used for configuration tables like ACPI. But it should not be
cleared otherwise ACPI table will be missing.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

---

Changes in v2:
- new patch "Do not clear high table area for S3"
- drop patch "x86: fsp: Mark the first 64K low memory as reserved"
  as it causes boot failure on GRUB

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

diff --git a/arch/x86/lib/coreboot_table.c b/arch/x86/lib/coreboot_table.c
index ceab3cf..b1b4cd9 100644
--- a/arch/x86/lib/coreboot_table.c
+++ b/arch/x86/lib/coreboot_table.c
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <vbe.h>
+#include <asm/acpi_s3.h>
 #include <asm/coreboot_tables.h>
 #include <asm/e820.h>
 
@@ -19,7 +20,11 @@ int high_table_reserve(void)
 	gd->arch.high_table_ptr = gd->start_addr_sp;
 
 	/* clear the memory */
-	memset((void *)gd->arch.high_table_ptr, 0, CONFIG_HIGH_TABLE_SIZE);
+#ifdef CONFIG_HAVE_ACPI_RESUME
+	if (gd->arch.prev_sleep_state != ACPI_S3)
+#endif
+		memset((void *)gd->arch.high_table_ptr, 0,
+		       CONFIG_HIGH_TABLE_SIZE);
 
 	gd->start_addr_sp &= ~0xf;
 
-- 
2.9.2

  parent reply	other threads:[~2017-04-21 14:24 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21 14:24 [U-Boot] [PATCH v2 00/22] x86: Add ACPI S3 resume support Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 01/22] x86: acpi: Add Kconfig option and header file for ACPI resume Bin Meng
2017-04-26  7:33   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 02/22] x86: baytrail: acpi: Add APIs for determining/clearing sleep state Bin Meng
2017-04-26  7:33   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 03/22] x86: Add post codes for OS resume Bin Meng
2017-04-26  7:34   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 04/22] x86: fsp: acpi: Pass different boot mode to FSP init Bin Meng
2017-04-26  7:34   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 05/22] x86: Store and display previous sleep state Bin Meng
2017-04-26  7:34   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 06/22] x86: baytrail: Conditionally report S3 in the ACPI table Bin Meng
2017-04-26  7:34   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 07/22] x86: fsp: Mark memory used by U-Boot as reserved in the E820 table for S3 Bin Meng
2017-04-26  7:34   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 08/22] x86: acpi: Add wake up assembly stub Bin Meng
2017-04-26  7:34   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 09/22] x86: acpi: Add one API to find OS wakeup vector Bin Meng
2017-04-24  3:38   ` Simon Glass
2017-04-26  7:34     ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 10/22] x86: acpi: Resume OS if resume vector is found Bin Meng
2017-04-26  7:34   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 11/22] x86: Add an early CMOS access library Bin Meng
2017-04-26  7:34   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 12/22] x86: fsp: Save stack address to CMOS for next S3 boot Bin Meng
2017-04-26  7:34   ` Bin Meng
2017-04-21 14:24 ` Bin Meng [this message]
2017-04-24  3:38   ` [U-Boot] [PATCH v2 13/22] x86: Do not clear high table area for S3 Simon Glass
2017-04-26  7:35     ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 14/22] x86: Adjust board_final_cleanup() order Bin Meng
2017-04-26  7:35   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 15/22] x86: apci: Change PM1_CNT register access to RMW Bin Meng
2017-04-26  7:35   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 16/22] x86: acpi: Make enter_acpi_mode() public Bin Meng
2017-04-26  7:35   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 17/22] x86: acpi: Refactor acpi_resume() Bin Meng
2017-04-26  7:35   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 18/22] x86: acpi: Turn on ACPI mode for S3 Bin Meng
2017-04-26  7:35   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 19/22] x86: pci: Allow conditionally run VGA rom in S3 Bin Meng
2017-04-24  3:38   ` Simon Glass
2017-04-26  7:35     ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 20/22] x86: acpi: Fix Windows S3 resume failure Bin Meng
2017-04-24  3:38   ` Simon Glass
2017-04-25  1:51     ` Bin Meng
2017-04-26  7:35     ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 21/22] x86: minnowmax: Enable ACPI S3 resume Bin Meng
2017-04-26  7:35   ` Bin Meng
2017-04-21 14:24 ` [U-Boot] [PATCH v2 22/22] x86: Document ACPI S3 support Bin Meng
2017-04-26  7:35   ` Bin Meng
2017-04-24  9:28 ` [U-Boot] [PATCH v2 00/22] x86: Add ACPI S3 resume support Stefan Roese
2017-04-25  8:02   ` Bin Meng
2017-04-25  8:51     ` Stefan Roese
2017-04-25  9:34       ` Bin Meng
2017-04-25 11:11         ` Stefan Roese
2017-04-26  4:21           ` Bin Meng
2017-04-26  5:24             ` Stefan Roese
2017-04-26  7:37               ` Bin Meng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1492784689-15701-14-git-send-email-bmeng.cn@gmail.com \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.