Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5555
-gerrit
commit 38d327dfc7a97d0d15e6d5b723a01ace8ff38c8e
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Sat Apr 19 15:10:14 2014 -0500
hp/pavilion_m6_1035dx: Do not re-init EC and lid SMI on S3 resume
It's not needed, and puts the EC back into APM mode. The EC does not
shut down during S3 sleep, so we don't need to re-initialize it.
Lid SMI will have been disabled in the switch to ACPI mode, don't
re-enable it.
Change-Id: I2c06df140f63427dac32ae095d29e68f64135358
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
src/mainboard/hp/pavilion_m6_1035dx/mainboard.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/mainboard.c b/src/mainboard/hp/pavilion_m6_1035dx/mainboard.c
index 2e8436b..81260f1 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/mainboard.c
+++ b/src/mainboard/hp/pavilion_m6_1035dx/mainboard.c
@@ -32,19 +32,21 @@
#include <southbridge/amd/agesa/hudson/smi.h>
-/*************************************************
- * enable the dedicated function in parmer board.
- *************************************************/
+
+static void pavilion_cold_boot_init(void)
+{
+ /* Lid SMI is only used in non-ACPI mode; leave it off in S3 resume */
+ hudson_configure_gevent_smi(EC_LID_GEVENT, SMI_MODE_SMI, SMI_LVL_LOW);
+ /* EC is not powered off during S3 sleep */
+ pavilion_m6_1035dx_ec_init();
+}
+
static void mainboard_enable(device_t dev)
{
printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");
- pavilion_m6_1035dx_ec_init();
-
hudson_configure_gevent_smi(EC_SMI_GEVENT, SMI_MODE_SMI, SMI_LVL_HIGH);
- hudson_configure_gevent_smi(EC_LID_GEVENT, SMI_MODE_SMI, SMI_LVL_LOW);
hudson_enable_smi_generation();
-
/*
* The mainboard is the first place that we get control in ramstage. Check
* for S3 resume and call the approriate AGESA/CIMx resume functions.
@@ -53,7 +55,10 @@ static void mainboard_enable(device_t dev)
acpi_slp_type = acpi_get_sleep_type();
if (acpi_slp_type == 3)
agesawrapper_fchs3earlyrestore();
+ else
#endif
+ pavilion_cold_boot_init();
+
}
struct chip_operations mainboard_ops = {
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5555
-gerrit
commit 30f0cbafcf94e6d5d4b319df3ed81cb304eaea0b
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Sat Apr 19 15:10:14 2014 -0500
hp/pavilion_m6_1035dx: Do not re-init EC and SMI on S3 resume
It's not needed, and puts the EC back into APM mode. The EC does not
shut down during S3 sleep, so we don't need to re-initialize it.
SMI triggers don't need to be set up again, as that resets their state
and re-enables shutdown on lid close.
Change-Id: I2c06df140f63427dac32ae095d29e68f64135358
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
src/mainboard/hp/pavilion_m6_1035dx/mainboard.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/mainboard.c b/src/mainboard/hp/pavilion_m6_1035dx/mainboard.c
index 2e8436b..c86cfbf 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/mainboard.c
+++ b/src/mainboard/hp/pavilion_m6_1035dx/mainboard.c
@@ -32,18 +32,18 @@
#include <southbridge/amd/agesa/hudson/smi.h>
-/*************************************************
- * enable the dedicated function in parmer board.
- *************************************************/
-static void mainboard_enable(device_t dev)
-{
- printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");
-
- pavilion_m6_1035dx_ec_init();
+static void pavilion_cold_boot_init(void)
+{
hudson_configure_gevent_smi(EC_SMI_GEVENT, SMI_MODE_SMI, SMI_LVL_HIGH);
hudson_configure_gevent_smi(EC_LID_GEVENT, SMI_MODE_SMI, SMI_LVL_LOW);
hudson_enable_smi_generation();
+ pavilion_m6_1035dx_ec_init();
+}
+
+static void mainboard_enable(device_t dev)
+{
+ printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");
/*
* The mainboard is the first place that we get control in ramstage. Check
@@ -53,7 +53,10 @@ static void mainboard_enable(device_t dev)
acpi_slp_type = acpi_get_sleep_type();
if (acpi_slp_type == 3)
agesawrapper_fchs3earlyrestore();
+ else
#endif
+ pavilion_cold_boot_init();
+
}
struct chip_operations mainboard_ops = {
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5553
-gerrit
commit a61a8fedadf418fc380743844572c0d9ea0f6eed
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Sat Apr 19 21:31:27 2014 +0200
util/board_status: Use capture and not commit time
Currently the directory structure is
<vendor>/<board>/<revision>/<timestamp>
where the time stamp is the commit date. This does not allow to upload
results for the same commit and same board with different configuration.
The hardware could differ, for example the used processor, or the
configuration of coreboot or the used payload or its configuration.
Also it is theoretically possible, though not very easy to achieve with
the current Gerrit workflow, that two commits have the same commit date.
So instead of using the date of the commit simply use the date of
running the script `board_status.sh`.
<vendor>/<board>/<revision>/<time_now>
In theory that could still give collisions, but the chances of two
people having the same board running coreboot build from the same commit
and running `board_status.sh` at the same time are very low.
Getting the current time is not easy, as the interface of `date` is not
standardized, though `date -u` probably should work the same. As
`getrevision.sh` already takes care of the formatting, pass the
non-tracked file `/bin/true` to `getrevision.sh`, which causes it to
return the current time properly formatted. Get rid of the resulting
warning
Warning: Path "/bin/true" is not under version control.
by removing the line from `getrevision.sh`.
Change-Id: Id92a4b660e910b524f15297472ff570ef797039e
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/board_status/board_status.sh | 7 ++++---
util/board_status/getrevision.sh | 3 ---
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index 3cff231..19c69d1 100644
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -141,7 +141,7 @@ fi
tmpdir=$(mktemp -d)
# Obtain board and revision info to form the directory structure:
-# <vendor>/<board>/<revision>/<timestamp>
+# <vendor>/<board>/<revision>/<time_now>
cbfstool_cmd="util/cbfstool/cbfstool"
test_cmd $LOCAL "$cbfstool_cmd"
$cbfstool_cmd build/coreboot.rom extract -n config -f ${tmpdir}/config.txt
@@ -153,8 +153,9 @@ getrevision="util/board_status/getrevision.sh"
test_cmd $LOCAL $getrevision
tagged_version=$($getrevision -T)
timestamp=$($getrevision -t)
+time_now=$($getrevision -t /bin/true)
-results="${vendor}/${mainboard}/${tagged_version}/${timestamp}"
+results="${vendor}/${mainboard}/${tagged_version}/${time_now}"
echo "Temporarily placing output in ${tmpdir}/${results}"
mkdir -p "${tmpdir}/${results}"
@@ -202,7 +203,7 @@ if [ $UPLOAD_RESULTS -eq 1 ]; then
echo "Uploading results"
git add "${vendor}"
- git commit -a -m "${mainboard_dir}/${tagged_version}/${timestamp}"
+ git commit -a -m "${mainboard_dir}/${tagged_version}/${time_now}"
git push origin
# Results have been uploaded so it's pointless to keep the
diff --git a/util/board_status/getrevision.sh b/util/board_status/getrevision.sh
index 0a6b6c6..bdd4748 100755
--- a/util/board_status/getrevision.sh
+++ b/util/board_status/getrevision.sh
@@ -233,9 +233,6 @@ main() {
if [ -z "$query_path" ] ; then
query_path=.
fi
- if ! is_file_tracked "$query_path" ; then
- echo "Warning: Path \"${query_path}\" is not under version control.">&2
- fi
if [ -z "$action" ] ; then
show_help
echo "Error: No actions specified"
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5549
-gerrit
commit 6be6f7cc3864450e723913dca7ad42c10b4572b8
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Fri Apr 18 21:29:59 2014 -0500
hp/pavilion_m6_1035dx: Suspend/resume on lid close/open with ACPI
This patch completes ACPI support for the lid switch. The lid SCI now
notifies the OSPM of the status change when the lid is closed or
opened, allowing system to suspend. The wake source is also declares,
and the system wakes when the lid is opened.
The system resumes successfully, but the display still does not come
back on.
Change-Id: I803c4fc64e15f8d1a90791ec246af66604646d8b
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl | 9 +++++++++
src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl | 17 +++++++++++++++++
src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl | 2 ++
3 files changed, 28 insertions(+)
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl b/src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl
index 89c002a..7a78485 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl
+++ b/src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl
@@ -54,6 +54,15 @@ Scope(\_GPE) { /* Start Scope GPE */
/* DBGO("\\_GPE\\_L11\n") */
}
+ /* Lid switch opened or closed */
+ Method(_L16) {
+ Store("Lid status changed", Debug)
+ /* Flip trigger polarity */
+ Not(LPOL, LPOL)
+ /* Notify lid object of status change */
+ Notify(\_SB.LID, 0x80)
+ }
+
/* GPIO0 or GEvent8 event */
Method(_L18) {
/* DBGO("\\_GPE\\_L18\n") */
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl b/src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl
index 5700e86..4171700 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl
+++ b/src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl
@@ -57,6 +57,14 @@
GE22, 1, /* General event 22 - connected to lid switch */
}
+ /* SMI/SCI control block -- hardcoded to 0xfed80200 by AGESA */
+ OperationRegion (SMIX, SystemMemory, 0xfed80200, 0x100)
+ Field (SMIX, AnyAcc, NoLock, Preserve) {
+ Offset (0x08), /* SCI level: 0 = active low, 1 = active high */
+ , 22,
+ LPOL, 1, /* SCI22 trigger polarity - lid switch */
+ }
+
/*
* Used by EC code on certain events
*
@@ -75,10 +83,19 @@ Scope (\_SB) {
Device (LID)
{
Name(_HID, EisaId("PNP0C0D"))
+ Name(_PRW, Package () {EC_LID_GPE, 0x04}) /* wake from S1-S4 */
Method(_LID, 0)
{
Return (GE22) /* GE pin 22 */
}
+
+ Method (_INI, 0)
+ {
+ /* Make sure lid trigger polarity is set so that we
+ * trigger an SCI when lid status changes.
+ */
+ Not(GE22, LPOL)
+ }
}
Device (MB) {
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl b/src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl
index c1f1933..4783394 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl
+++ b/src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "mainboard.h"
+
/* DefinitionBlock Statement */
DefinitionBlock (
"DSDT.AML", /* Output filename */