[U-Boot] [PATCH v2 00/22] x86: Add ACPI S3 resume support

Bin Meng bmeng.cn at gmail.com
Fri Apr 21 14:24:27 UTC 2017


This adds ACPI S3 (suspend to ram) resume capability in U-Boot.
With S3 support within U-Boot, the board wakes up and resumes to
OS very quickly.

This so far is enabled and tested on Intel MinnowMax board. Please
check README.x86 for how to test it with a plain Linux kernel.
Linux (w/ or w/o SeaBIOS) and Windows 10 (w/ SeaBIOS) were tested.

This series is available for testing at u-boot-x86/s3-working.

Changes in v2:
- fixed several nits in CONFIG_HAVE_ACPI_RESUME Kconfig help text
- return -EINVAL instead of -1 in acpi_sleep_from_pm1()
- add a function comment block for acpi_sleep_from_pm1()
- add a function comment block for acpi_ss_string()
- use a string array for sleep state string
- add a description for gd->arch.prev_sleep_state
- change to use debug() in default_print_cpuinfo()
- add brackets around the second x in RELOCATED(x) macro
- word-wrap to use more columns
- change to use present tense in the comments
- add a function comment block for acpi_find_wakeup_vector()
- add a function comment block for fsp_save_s3_stack()
- check error on calling rtc_write32()
- add some comments about why calling cmos_read32() instead of rtc_
- 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
- add a function comment block for enter_acpi_mode()
- add a function comment block for acpi_find_fadt()
- new patch "Fix Windows S3 resume failure"
- add some notes about testing S3 resume on Windows
- rebase on u-boot/master

Bin Meng (22):
  x86: acpi: Add Kconfig option and header file for ACPI resume
  x86: baytrail: acpi: Add APIs for determining/clearing sleep state
  x86: Add post codes for OS resume
  x86: fsp: acpi: Pass different boot mode to FSP init
  x86: Store and display previous sleep state
  x86: baytrail: Conditionally report S3 in the ACPI table
  x86: fsp: Mark memory used by U-Boot as reserved in the E820 table for
    S3
  x86: acpi: Add wake up assembly stub
  x86: acpi: Add one API to find OS wakeup vector
  x86: acpi: Resume OS if resume vector is found
  x86: Add an early CMOS access library
  x86: fsp: Save stack address to CMOS for next S3 boot
  x86: Do not clear high table area for S3
  x86: Adjust board_final_cleanup() order
  x86: apci: Change PM1_CNT register access to RMW
  x86: acpi: Make enter_acpi_mode() public
  x86: acpi: Refactor acpi_resume()
  x86: acpi: Turn on ACPI mode for S3
  x86: pci: Allow conditionally run VGA rom in S3
  x86: acpi: Fix Windows S3 resume failure
  x86: minnowmax: Enable ACPI S3 resume
  x86: Document ACPI S3 support

 arch/x86/Kconfig                                   |  32 +++++
 arch/x86/cpu/Makefile                              |   1 +
 arch/x86/cpu/baytrail/acpi.c                       |  47 ++++++++
 arch/x86/cpu/cpu.c                                 |  30 ++++-
 arch/x86/cpu/wakeup.S                              |  78 ++++++++++++
 arch/x86/include/asm/acpi_s3.h                     | 131 +++++++++++++++++++++
 arch/x86/include/asm/acpi_table.h                  |  28 +++++
 .../include/asm/arch-baytrail/acpi/sleepstates.asl |   2 +
 arch/x86/include/asm/arch-baytrail/iomap.h         |  24 ++++
 arch/x86/include/asm/cmos_layout.h                 |  31 +++++
 arch/x86/include/asm/early_cmos.h                  |  43 +++++++
 arch/x86/include/asm/global_data.h                 |   4 +
 arch/x86/include/asm/post.h                        |   2 +
 arch/x86/include/asm/tables.h                      |   1 +
 arch/x86/include/asm/u-boot-x86.h                  |  13 ++
 arch/x86/lib/Makefile                              |   2 +
 arch/x86/lib/acpi_s3.c                             |  82 +++++++++++++
 arch/x86/lib/acpi_table.c                          |  84 ++++++++++++-
 arch/x86/lib/coreboot_table.c                      |   7 +-
 arch/x86/lib/early_cmos.c                          |  51 ++++++++
 arch/x86/lib/fsp/fsp_common.c                      |  63 +++++++++-
 arch/x86/lib/fsp/fsp_dram.c                        |  12 ++
 configs/minnowmax_defconfig                        |   1 +
 doc/README.x86                                     |  24 +++-
 drivers/pci/pci_rom.c                              |  14 +++
 25 files changed, 795 insertions(+), 12 deletions(-)
 create mode 100644 arch/x86/cpu/wakeup.S
 create mode 100644 arch/x86/include/asm/acpi_s3.h
 create mode 100644 arch/x86/include/asm/cmos_layout.h
 create mode 100644 arch/x86/include/asm/early_cmos.h
 create mode 100644 arch/x86/lib/acpi_s3.c
 create mode 100644 arch/x86/lib/early_cmos.c

-- 
2.9.2



More information about the U-Boot mailing list