Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2484
-gerrit
commit de80b9e34eca0ffae25634164f0f7c193291af2a
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Fri Feb 22 12:33:08 2013 +0100
src/arch/x86/boot/acpigen.c: Small coding style and comment fixes
While reading through the file fix some spotted errors like
indentation, locution(?), capitalization and missing full stops.
Change-Id: Id435b4750e329b06a9b36c1df2c39d2038a09b18
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
src/arch/x86/boot/acpigen.c | 36 +++++++++++++++++++-----------------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/src/arch/x86/boot/acpigen.c b/src/arch/x86/boot/acpigen.c
index 47845a0..f906c27 100644
--- a/src/arch/x86/boot/acpigen.c
+++ b/src/arch/x86/boot/acpigen.c
@@ -17,11 +17,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* how many nesting we support */
+/* How much nesting do we support? */
#define ACPIGEN_LENSTACK_SIZE 10
-/* if you need to change this, change the acpigen_write_f and
- acpigen_patch_len */
+/*
+ * If you need to change this, change acpigen_write_f and
+ * acpigen_patch_len
+ */
#define ACPIGEN_MAXLEN 0xfff
@@ -38,7 +40,7 @@ int ltop = 0;
int acpigen_write_len_f(void)
{
ASSERT(ltop < (ACPIGEN_LENSTACK_SIZE - 1))
- len_stack[ltop++] = gencurrent;
+ len_stack[ltop++] = gencurrent;
acpigen_emit_byte(0);
acpigen_emit_byte(0);
return 2;
@@ -47,7 +49,7 @@ int acpigen_write_len_f(void)
void acpigen_patch_len(int len)
{
ASSERT(len <= ACPIGEN_MAXLEN)
- ASSERT(ltop > 0)
+ ASSERT(ltop > 0)
char *p = len_stack[--ltop];
/* generate store length for 0xfff max */
p[0] = (0x40 | (len & 0xf));
@@ -148,10 +150,10 @@ int acpigen_emit_stream(const char *data, int size)
return size;
}
-/* The NameString are bit tricky, each element can be 4 chars, if
- less its padded with underscore. Check 18.2.2 and 18.4
- and 5.3 of ACPI specs 3.0 for details
-*/
+/* The NameString term is a bit tricky, each element can be 4 chars,
+ * if less it’s padded with underscores. Check 18.2.2 and 18.4
+ * and 5.3 of ACPI specs 3.0 for details.
+ */
static int acpigen_emit_simple_namestring(const char *name) {
int i, len = 0;
@@ -370,7 +372,7 @@ int acpigen_write_empty_PTC(void)
return len + nlen;
}
-/* generates a func with max supported P states */
+/* Generates a func with max supported P states. */
int acpigen_write_PPC(u8 nr)
{
/*
@@ -396,7 +398,7 @@ int acpigen_write_PPC(u8 nr)
return len;
}
-/* generates a func with max supported P states */
+/* Generates a func with max supported P states. */
int acpigen_write_PPC_NVS(void)
{
/*
@@ -621,7 +623,7 @@ int acpigen_write_io16(u16 min, u16 max, u8 align, u8 len, u8 decode16)
* Bit2-0: 111 (0x7) => 7 Bytes long
*/
acpigen_emit_byte(0x47);
- /* does the device decode all 16 or just 10 bits? */
+ /* Does the device decode all 16 or just 10 bits? */
/* bit1-7 are ignored */
acpigen_emit_byte(decode16 ? 0x01 : 0x00);
/* minimum base address the device may be configured for */
@@ -642,12 +644,12 @@ int acpigen_write_resourcetemplate_header(void)
/*
* A ResourceTemplate() is a Buffer() with a
* (Byte|Word|DWord) containing the length, followed by one or more
- * resource items, terminated by the end tag
+ * resource items, terminated by the end tag.
* (small item 0xf, len 1)
*/
- len = acpigen_emit_byte(0x11); /* Buffer opcode */
+ len = acpigen_emit_byte(0x11); /* Buffer opcode */
len += acpigen_write_len_f();
- len += acpigen_emit_byte(0x0b); /* Word opcode */
+ len += acpigen_emit_byte(0x0b); /* Word opcode */
len_stack[ltop++] = acpigen_get_current();
len += acpigen_emit_byte(0x00);
len += acpigen_emit_byte(0x00);
@@ -700,13 +702,13 @@ int acpigen_write_mainboard_resource_template(void)
len = acpigen_write_resourcetemplate_header();
start = acpigen_get_current();
- /* Add reserved memory ranges */
+ /* Add reserved memory ranges. */
search_global_resources(
IORESOURCE_MEM | IORESOURCE_RESERVE,
IORESOURCE_MEM | IORESOURCE_RESERVE,
acpigen_add_mainboard_rsvd_mem32, 0);
- /* Add reserved io ranges */
+ /* Add reserved io ranges. */
search_global_resources(
IORESOURCE_IO | IORESOURCE_RESERVE,
IORESOURCE_IO | IORESOURCE_RESERVE,
the following patch was just integrated into master:
commit fbf078311f37ae392b1c97dd5271035f1a056486
Author: Hung-Te Lin <hungte(a)chromium.org>
Date: Wed Feb 20 15:50:06 2013 +0800
libpayload: cbfs: Fix CBFS max size calculation.
Cherry-picking CBFS fix from http://review.coreboot.org/#/c/2292/
For x86, the old CBFS search behavior was to bypass bootblock and we should keep
that. This will speed up searching if a file does not exist in CBFS.
For arm, the size in header is correct now so we can remove the hack by
CONFIG_ROM_SIZE.
Change-Id: I286ecda73bd781550e03b0b817ed3fb567d6b8d7
Signed-off-by: Hung-Te Lin <hungte(a)chromium.org>
Reviewed-on: http://review.coreboot.org/2458
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
See http://review.coreboot.org/2458 for details.
-gerrit
the following patch was just integrated into master:
commit 58fd5e1d3d4153ae86a997fcc9b0cfc5fd85e4b7
Author: Hung-Te Lin <hungte(a)chromium.org>
Date: Wed Feb 20 15:43:47 2013 +0800
libcbfs: Fix legacy CBFS API, typos
Pulling CBFS fix from libpayload: http://review.coreboot.org/#/c/2455/2
get_cbfs_header expects CBFS_HEADER_INVALID_ADDRESS (0xffffffff)
instead of NULL when something is wrong.
Also, fix typo.
Change-Id: I7f393f7c24f74a3358f7339a3095b0d845bdc02d
Signed-off-by: Hung-Te Lin <hungte(a)chromium.org>
Reviewed-on: http://review.coreboot.org/2457
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
See http://review.coreboot.org/2457 for details.
-gerrit
the following patch was just integrated into master:
commit 39d497d5cfe62457bcacdd3826663c544b8bab37
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Thu Feb 21 15:39:01 2013 -0800
Update 3rdparty mark to latest repository
Change-Id: Ied5515a332e3f2f9abbed1c015cad76f7bb4cd9f
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
Reviewed-on: http://review.coreboot.org/2480
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Tested-by: build bot (Jenkins)
See http://review.coreboot.org/2480 for details.
-gerrit
2013/2/21 ron minnich <rminnich(a)gmail.com>:
> I just updated it.
> https://code.google.com/p/i915tool/
> I had to wait, starting some time ago, because there was too much info
> appearing in it about this:
> http://techland.time.com/2013/02/21/googles-chomebook-pixel-the-chromebook-…
>
> and I got nervous.
>
> Status: you'll see in as we upstream the coreboot that we can turn on
> graphics in coreboot now without a vbios. The code is crude and I'm in
> the process of creating a replacement. The tool to create the real
> code is in the i915tool and is called gen915code.c. Note that it does
> lot of annotation, turning things like this:
> {W, 1, "", _PIPEACONF, 0x00000040, },
>
> {W, 1, "", _PIPEACONF, (/* PIPECONF_FRAME_START_DELAY_MASK */0x0<<27)|
> PIPECONF_BPP_6 | PIPECONF_DITHER_TYPE_SP |0x00000
>
> What this means is that moving to other laptops *may* be easier.
>
> We've got kernel patches too, and the result is that we've (in an
> experiment) reduced boot time to a login prompt to less than 4 seconds
> (after firmware is finished).
>
> My goal is to make that better, but we'll see. But we chopped a full 3
> seconds off of boot.
>
> I am sorry this i915tool is a mess. I really wish it were better. I
> offer it in the state it is because I'm hoping it can be used, but
> it's very experimental and represents a lot of lessons learned the
> hard way. Part of this mess is that my ideas about how to do the work
> have changed so much since I started it.
>
> Here are docs, which are also not very good, sorry!
> https://docs.google.com/document/d/1g8FMob25VZYxbWri2iFB8YiSL8gwF9vKJH3HGxr…
>
> Questions to me. Hope that some part of this is useful.
>
nice!
--
Christian Gmeiner, MSc
Zheng Bao (zheng.bao(a)amd.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2483
-gerrit
commit 1cc2aa13987688165e7d805f2e567b2259cd4fe4
Author: Zheng Bao <fishbaozi(a)gmail.com>
Date: Fri Feb 22 12:40:10 2013 +0800
documentation: Complete the AMD-S3.txt
Fix some typos and finish empty sections.
Change-Id: I08cc971e763252b035ab8ed2118180140e34ac72
Signed-off-by: Zheng Bao <zheng.bao(a)amd.com>
Signed-off-by: Zheng Bao <fishbaozi(a)gmail.com>
---
documentation/AMD-S3.txt | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/documentation/AMD-S3.txt b/documentation/AMD-S3.txt
index 1ef87c0..ac996a9 100644
--- a/documentation/AMD-S3.txt
+++ b/documentation/AMD-S3.txt
@@ -22,7 +22,7 @@
Introduction
============
This document is about how the feature S3 is implemented on coreboot,
-specificly on AMD platform. This topic deals with ACPI spec, hardware,
+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
@@ -103,20 +103,40 @@ 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-volitile storage at cold boot stage. What data need to be save are
+non-volatile storage at cold boot stage. What data need to be save are
provided by AmdS3Save. After the wrapper calls the AmdS3Save, it gets
the VolatileStorage and NvStorage, which are where the data are
located. It is the wrappers's responsibility to save the data.[3][4]
-Currently, the wrappers allocate a CBFS modules in BIOS image. Todo
+Currently, the wrappers allocate a CBFS modules in BIOS image. To do
that, the wrapper needs to have the ability to write flash chips. It
is not as comprehensive as flashrom. But for the SST chip on Parmer,
MX chip on Thather, coreboot works well.[5]
2. OS goes in S3.
+For Linux, besides the kernel need 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
+ 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.
3. BIOS detect S3 wakeup
+As we mentioned, BIOS detects the SLP_TYPx to find out if the board
+wakes up. In romstage.c, the AmdInitReset and AmdInitEarly are called
+as they are during cold boot. AmdInitResume and AmdS3LateRestore are
+called only during it resumes. For whole ramstage, Coreboot goes through
+almost the same way as cold boot, other than not calling the AmdInitMid,
+AmdInitLate and AmdS3Save, and restoring all the MTRRs.
+At last step of BIOS stage, coreboot find out the wakeup vector in FADT,
+written by OS, and jump.
4. OS resumes.
+When Linux resume, all the sleeping scripts continues. If we are more lucky,
+all the scripts can go through. More chances that the 99video hangs or fails
+to get the display back. That needs more trouble shooting.
Reference
Zheng Bao (zheng.bao(a)amd.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2483
-gerrit
commit aed172e7758db6563807209532f620f883ae16b4
Author: Zheng Bao <fishbaozi(a)gmail.com>
Date: Fri Feb 22 12:29:05 2013 +0800
documentation: Complete the AMD-S3.text
Fix some typos and finish empty sections.
Change-Id: I08cc971e763252b035ab8ed2118180140e34ac72
Signed-off-by: Zheng Bao <zheng.bao(a)amd.com>
Signed-off-by: Zheng Bao <fishbaozi(a)gmail.com>
---
documentation/AMD-S3.txt | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/documentation/AMD-S3.txt b/documentation/AMD-S3.txt
index 1ef87c0..ac996a9 100644
--- a/documentation/AMD-S3.txt
+++ b/documentation/AMD-S3.txt
@@ -22,7 +22,7 @@
Introduction
============
This document is about how the feature S3 is implemented on coreboot,
-specificly on AMD platform. This topic deals with ACPI spec, hardware,
+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
@@ -103,20 +103,40 @@ 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-volitile storage at cold boot stage. What data need to be save are
+non-volatile storage at cold boot stage. What data need to be save are
provided by AmdS3Save. After the wrapper calls the AmdS3Save, it gets
the VolatileStorage and NvStorage, which are where the data are
located. It is the wrappers's responsibility to save the data.[3][4]
-Currently, the wrappers allocate a CBFS modules in BIOS image. Todo
+Currently, the wrappers allocate a CBFS modules in BIOS image. To do
that, the wrapper needs to have the ability to write flash chips. It
is not as comprehensive as flashrom. But for the SST chip on Parmer,
MX chip on Thather, coreboot works well.[5]
2. OS goes in S3.
+For Linux, besides the kernel need 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
+ 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.
3. BIOS detect S3 wakeup
+As we mentioned, BIOS detects the SLP_TYPx to find out if the board
+wakes up. In romstage.c, the AmdInitReset and AmdInitEarly are called
+as they are during cold boot. AmdInitResume and AmdS3LateRestore are
+called only during it resumes. For whole ramstage, Coreboot goes through
+almost the same way as cold boot, other than not calling the AmdInitMid,
+AmdInitLate and AmdS3Save, and restoring all the MTRRs.
+At last step of BIOS stage, coreboot find out the wakeup vector in FADT,
+written by OS, and jump.
4. OS resumes.
+When Linux resume, all the sleeping scripts continues. If we are more lucky,
+all the scripts can go through. More chances that the 99video hangs or fails
+to get the display back. That needs more trouble shooting.
Reference
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2480
-gerrit
commit 19040f404483e4c4602006d4c7910dc767db615b
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Thu Feb 21 15:39:01 2013 -0800
Update 3rdparty mark to latest repository
Change-Id: Ied5515a332e3f2f9abbed1c015cad76f7bb4cd9f
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
---
3rdparty | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/3rdparty b/3rdparty
index dcd1ca7..dac1a18 160000
--- a/3rdparty
+++ b/3rdparty
@@ -1 +1 @@
-Subproject commit dcd1ca72bbef1c53b54282e1c77633f0f1876325
+Subproject commit dac1a18d184976e4447b98479f0b7a172054b98f
the following patch was just integrated into master:
commit 2872f4e946b5cc9ccad2b1b47cea18db95e3191d
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Thu Feb 21 13:10:24 2013 +0100
AMD Fam14 boards: Unify `acpi_table.c` by mainly using Inagua’s one
There were just whitespace differences and three boards did not
contain
printk(BIOS_DEBUG, "alib\n");
dump_mem(ssdt, ((void *)alib) + alib->length);
which is enclosed `#if DUMP_ACPI_TABLES == 1` to dump the ACPI
tables.
Basically the whitespace in the license header in Inagua’s file
was fixed and then the file copied over to the other directories.
Change-Id: I23f73acad427b5ec14cf51651af67240871f7488
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/2470
Tested-by: build bot (Jenkins)
Reviewed-by: Alvaro G. <andor(a)pierdelacabeza.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Build-Tested: build bot (Jenkins) at Thu Feb 21 13:35:07 2013, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Thu Feb 21 19:23:02 2013, giving +2
See http://review.coreboot.org/2470 for details.
-gerrit