Nick Kochlowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/85543?usp=email )
Change subject: Documentation: Convert AMD-S3.txt to markdown ......................................................................
Documentation: Convert AMD-S3.txt to markdown
Convert the document to Markdown to be rendered as a link within the AMD index page.
Change-Id: I56647c9e2d96c3cdfbe0a870496bb892f6e0c6f7 Signed-off-by: Nicolas Kochlowski nickkochlowski@gmail.com --- R Documentation/architecture_and_design/soc/amd/AMD-S3.md M Documentation/architecture_and_design/soc/amd/index.md 2 files changed, 23 insertions(+), 25 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/85543/1
diff --git a/Documentation/architecture_and_design/soc/amd/AMD-S3.txt b/Documentation/architecture_and_design/soc/amd/AMD-S3.md similarity index 88% rename from Documentation/architecture_and_design/soc/amd/AMD-S3.txt rename to Documentation/architecture_and_design/soc/amd/AMD-S3.md index bfabcbe..e0f3f4b 100644 --- a/Documentation/architecture_and_design/soc/amd/AMD-S3.txt +++ b/Documentation/architecture_and_design/soc/amd/AMD-S3.md @@ -1,3 +1,4 @@ +```shell _____ ____ _____ ______ ____ ____ ____ _______ / ____/ __ | __ | ____| _ \ / __ \ / __ __ __| | | | | | | |__) | |__ | |_) | | | | | | | | | @@ -12,21 +13,20 @@ / ____ | | | | |__| | ____) | ___) | /_/ __| |_|_____/ |_____/ |____/
+```
- S3 in coreboot (V 1.2) ----------------------------------------- - Zheng Bao - zheng.bao@amd.com - fishbaozi@gmail.com +# S3 in coreboot (V 1.2)
-Introduction -============ +**Author:** Zheng Bao +zheng.bao@amd.com +fishbaozi@gmail.com + +## Introduction This document is about how the feature S3 is implemented on coreboot, specifically on AMD platform. This topic deals with ACPI spec, hardware, BIOS, OS. We try to help coreboot users to realize their own S3.
-S3 in a nutshell -================ +## S3 in a nutshell The S3 sleeping state is a low wake latency sleeping state where all system context is lost except system memory. [1]. S3 is a ACPI definition. @@ -52,8 +52,7 @@ to linux kernel or some other open source projects to find out how they handle S3 resume.
-ACPI registers -============== +## ACPI registers ACPI specification defines a group of registers. OSes handle all these registers to read and write status to all the platform. On AMD platform, these registers are provided by southbridge. For @@ -62,8 +61,7 @@ are. BIOS has the responsibility to allocated the IO resources and write all these address to FADT, a ACPI defined table.
-Memory Layout -============= +## Memory Layout Restoring memory is the most important job done by BIOS. When the power is off, the memory is maintained by standby power. BIOS need to make sure that when flow goes to OS, everything in memory should be @@ -86,8 +84,7 @@ 2efe0000 --- 2f000000 heap in highmem 2f000000 TOM
-AMD requirements in S3 -====================== +## AMD requirements in S3 Chip vendor like AMD will provide bunch of routines to restore the board.[2] * AmdS3Save: It is called in cold boot, save required register into @@ -99,8 +96,7 @@ Provided by Southbridge vendor code. Early is called before PCI enumeration, and Late is called after that.
-Lifecycle of booting, sleeping and waking coreboot and Ubuntu -============================================================= +## Lifecycle of booting, sleeping and waking coreboot and Ubuntu 1. Cold boot. For a system with S3 feature, the BIOS needs to save some data to non-volatile storage at cold boot stage. What data need to be save are @@ -115,16 +111,18 @@ 2. OS goes in S3. For Linux, besides the kernel needs to do some saving, most distributions run some scripts. For Ubuntu, scripts are located at /usr/lib/pm-utils/sleep.d. - # ls /usr/lib/pm-utils/sleep.d + ```shell + # ls /usr/lib/pm-utils/sleep.d 000kernel-change 49bluetooth 90clock 95led 00logging 55NetworkManager 94cpufreq 98video-quirk-db-handler 00powersave 60_wpa_supplicant 95anacron 99video 01PulseAudio 75modules 95hdparm-apm -The script with lower prefix runs before the one with higher prefix. -99video is the last one. -Those scripts have hooks called hibernate, suspend, thaw, resume. For -each script, suspend is called when system sleeps and wakeup is called -when system wakeups. + ``` + The script with lower prefix runs before the one with higher prefix. + 99video is the last one. + Those scripts have hooks called hibernate, suspend, thaw, resume. For + each script, suspend is called when system sleeps and wakeup is called + when system wakeups.
3. Firmware detects S3 wakeup As we mentioned, Firmware detects the SLP_TYPx to find out if the board @@ -144,8 +142,7 @@ coreboot/Kconfig. That needs more troubleshooting.
-Reference -========= +## Reference [1] ACPI40a, http://www.acpi.info/spec40a.htm [2] coreboot Vendorcode, {top}/src/vendorcode/amd/agesa/{family}/Proc/Common/ [3] coreboot AGESA wrapper, {top}/src/mainboard/amd/parmer/agesawrapper.c diff --git a/Documentation/architecture_and_design/soc/amd/index.md b/Documentation/architecture_and_design/soc/amd/index.md index 0ad8816..1c81f3c 100644 --- a/Documentation/architecture_and_design/soc/amd/index.md +++ b/Documentation/architecture_and_design/soc/amd/index.md @@ -10,6 +10,7 @@ Family 15h <family15h.md> Family 17h <family17h.md> Platform Security Processor Integration <psp_integration.md> +S3 Feature Implementation <AMD-S3.md> ```
## amd_blobs Repository License