the following patch was just integrated into master:
commit dbe6336f908800ec028dc1a1087d6782e5a38851
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Thu Apr 17 00:47:47 2014 -0500
hp/pavilion_m6_1035dx: Shutdown on low battery with non-ACPI OS
Intercept the low battery SMI from the EC, and shut down the system
immediately. The EC only sends this SMI when the OS did not enable
ACPI mode, so ACPI OSes are not affected by this.
On the other hand, payloads such as GRUB or SeaBIOS will experience
the shutdown. This behavior is helpful for protecting the battery, for
example, when the OS fails to boot and we are stuck in the payload.
The low battery SMI is triggered at 10% charge, at which point the risk
of cell degradation exists.
Change-Id: I4c6c1a4feed8576cbdbb1945768de0805a1f5e42
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Reviewed-on: http://review.coreboot.org/5527
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)gmail.com>
See http://review.coreboot.org/5527 for details.
-gerrit
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/5527
-gerrit
commit dbe036e07d70408acd09f27c9bdcfbe77a39a2bc
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Thu Apr 17 00:47:47 2014 -0500
hp/pavilion_m6_1035dx: Shutdown on low battery with non-ACPI OS
Intercept the low battery SMI from the EC, and shut down the system
immediately. The EC only sends this SMI when the OS did not enable
ACPI mode, so ACPI OSes are not affected by this.
On the other hand, payloads such as GRUB or SeaBIOS will experience
the shutdown. This behavior is helpful for protecting the battery, for
example, when the OS fails to boot and we are stuck in the payload.
The low battery SMI is triggered at 10% charge, at which point the risk
of cell degradation exists.
Change-Id: I4c6c1a4feed8576cbdbb1945768de0805a1f5e42
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
.../hp/pavilion_m6_1035dx/mainboard_smi.c | 26 ++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/mainboard_smi.c b/src/mainboard/hp/pavilion_m6_1035dx/mainboard_smi.c
index bb9cc2e..f911443 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/mainboard_smi.c
+++ b/src/mainboard/hp/pavilion_m6_1035dx/mainboard_smi.c
@@ -6,14 +6,26 @@
*/
#include "ec.h"
+#include <arch/io.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
#include <delay.h>
#include <ec/compal/ene932/ec.h>
#include <southbridge/amd/agesa/hudson/hudson.h>
+#define ACPI_PM1_CNT_SLEEP(state) ((1 << 13) | (state & 0x7) << 10)
+
+enum sleep_states {
+ S0 = 0,
+ S1 = 1,
+ S3 = 3,
+ S4 = 4,
+ S5 = 5,
+};
+
enum ec_smi_event {
EC_SMI_EVENT_IDLE = 0x80,
+ EC_SMI_BATTERY_LOW = 0xb3,
};
/* Tell EC to operate in APM mode. Events generate SMIs instead of SCIs */
@@ -37,12 +49,18 @@ static uint8_t ec_get_smi_event(void)
static void ec_process_smi(uint8_t src)
{
- /*
- * Stub: We aren't processing any events yet, but reading the SMI source
- * satisfies the EC in terms of responding to the event.
+ /* Reading the SMI source satisfies the EC in terms of responding to
+ * the event, regardless of whether we take an action or not.
*/
- printk(BIOS_DEBUG, "EC_SMI event 0x%x\n", src);
+ switch (src) {
+ case EC_SMI_BATTERY_LOW:
+ printk(BIOS_DEBUG, "Battery low. Shutting down\n");
+ outl(ACPI_PM1_CNT_SLEEP(S5), ACPI_PM1_CNT_BLK);
+ break;
+ default:
+ printk(BIOS_DEBUG, "EC_SMI event 0x%x\n", src);
+ }
}
static void handle_ec_smi(void)
Ronald G. Minnich (rminnich(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5544
-gerrit
commit bc9814aae61351f8baa1de28cf29ce21f8854849
Author: Ronald G. Minnich <rminnich(a)google.com>
Date: Fri Apr 18 09:40:12 2014 -0700
cbfstool: fix an error in the use of makemagic.
This fixes an error in the creation of the BSS payload constant.
Change-Id: If55021a7bf3fc3399e2de0adaa457d0c08ff7352
Signed-off-by: Ronald G. Minnich <rminnich(a)google.com>
---
util/cbfstool/cbfs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h
index a561b2b..1ce615a 100644
--- a/util/cbfstool/cbfs.h
+++ b/util/cbfstool/cbfs.h
@@ -73,7 +73,7 @@ struct cbfs_stage {
#define PAYLOAD_SEGMENT_CODE makemagic('C', 'O', 'D', 'E')
#define PAYLOAD_SEGMENT_DATA makemagic('D', 'A', 'T', 'A')
-#define PAYLOAD_SEGMENT_BSS makemagic(' ', 'B', 'S', 'S')
+#define PAYLOAD_SEGMENT_BSS makemagic('B', 'S', 'S', ' ')
#define PAYLOAD_SEGMENT_PARAMS makemagic('P', 'A', 'R', 'A')
#define PAYLOAD_SEGMENT_ENTRY makemagic('E', 'N', 'T', 'R')
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5543
-gerrit
commit c14e1ec6aa90e1dad67e41394a608ac1472f4b27
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Fri Mar 15 10:47:50 2013 +0100
vendorcode/amd/agesa/*/AGESA.h: Correct typo in *b*e
The typo is not present anymore in Family 16h (Kabini), so fix it for
the older families (Family 10h, 12h, 14h, 15h, 15h Trinity) too using
the command below.
$ git grep -l ' ne ' src/vendorcode/amd/agesa | xargs sed -i 's/ ne / be /g'
Change-Id: I9cb419251eeec79925f48a5832fac339d40f01d1
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
src/vendorcode/amd/agesa/f10/AGESA.h | 2 +-
src/vendorcode/amd/agesa/f12/AGESA.h | 2 +-
src/vendorcode/amd/agesa/f14/AGESA.h | 2 +-
src/vendorcode/amd/agesa/f15/AGESA.h | 2 +-
src/vendorcode/amd/agesa/f15tn/AGESA.h | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/vendorcode/amd/agesa/f10/AGESA.h b/src/vendorcode/amd/agesa/f10/AGESA.h
index e6f5cfb..d111ae4 100644
--- a/src/vendorcode/amd/agesa/f10/AGESA.h
+++ b/src/vendorcode/amd/agesa/f10/AGESA.h
@@ -764,7 +764,7 @@ typedef enum {
/// GNB configuration info
typedef struct {
IN PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
- * Last element of array must ne terminated with DESCRIPTOR_TERMINATE_LIST
+ * Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST
* Example of topology definition for single socket system:
* @code
* PCIe_PORT_DESCRIPTOR PortList [] = {
diff --git a/src/vendorcode/amd/agesa/f12/AGESA.h b/src/vendorcode/amd/agesa/f12/AGESA.h
index 9f61807..a240481 100644
--- a/src/vendorcode/amd/agesa/f12/AGESA.h
+++ b/src/vendorcode/amd/agesa/f12/AGESA.h
@@ -1022,7 +1022,7 @@ typedef struct {
/// GNB configuration info
typedef struct {
IN PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
- * Last element of array must ne terminated with DESCRIPTOR_TERMINATE_LIST
+ * Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST
* Example of topology definition for single socket system:
* @code
* PCIe_PORT_DESCRIPTOR PortList [] = {
diff --git a/src/vendorcode/amd/agesa/f14/AGESA.h b/src/vendorcode/amd/agesa/f14/AGESA.h
index 2a9bed1..4237f86 100644
--- a/src/vendorcode/amd/agesa/f14/AGESA.h
+++ b/src/vendorcode/amd/agesa/f14/AGESA.h
@@ -877,7 +877,7 @@ typedef struct {
/// GNB configuration info
typedef struct {
IN PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
- * Last element of array must ne terminated with DESCRIPTOR_TERMINATE_LIST
+ * Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST
* Example of topology definition for single socket system:
* @code
* PCIe_PORT_DESCRIPTOR PortList [] = {
diff --git a/src/vendorcode/amd/agesa/f15/AGESA.h b/src/vendorcode/amd/agesa/f15/AGESA.h
index 6b0171b..8b77fd8 100644
--- a/src/vendorcode/amd/agesa/f15/AGESA.h
+++ b/src/vendorcode/amd/agesa/f15/AGESA.h
@@ -1145,7 +1145,7 @@ typedef struct {
/// GNB configuration info
typedef struct {
IN PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
- * Last element of array must ne terminated with DESCRIPTOR_TERMINATE_LIST
+ * Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST
* Example of topology definition for single socket system:
* @code
* PCIe_PORT_DESCRIPTOR PortList [] = {
diff --git a/src/vendorcode/amd/agesa/f15tn/AGESA.h b/src/vendorcode/amd/agesa/f15tn/AGESA.h
index a709274..1392810 100644
--- a/src/vendorcode/amd/agesa/f15tn/AGESA.h
+++ b/src/vendorcode/amd/agesa/f15tn/AGESA.h
@@ -1244,7 +1244,7 @@ typedef struct {
/// GNB configuration info
typedef struct {
IN PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
- * Last element of array must ne terminated with DESCRIPTOR_TERMINATE_LIST
+ * Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST
* Example of topology definition for single socket system:
* @code
* PCIe_PORT_DESCRIPTOR PortList [] = {
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3981
-gerrit
commit d76d5e543f4455d96e84605dd2648e6135260a1e
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Sun Oct 20 00:11:34 2013 +0200
util/xcompile/xcompile: Remove `-Wno-unused-but-set-variable` from `CFLAGS`
Do not disable warnings about unused but set variables to further
improve the code quality.
Change-Id: I25fa29ac42c9d09596d03f11fb01f31635a62a11
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/xcompile/xcompile | 5 -----
1 file changed, 5 deletions(-)
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index df7d558..bfb6da1 100644
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -89,11 +89,6 @@ testas() {
detect_special_flags() {
local architecture="$1"
- # GCC 4.6 is much more picky about unused variables.
- # Turn off it's warnings for now:
- testcc "$CC" "$CFLAGS -Wno-unused-but-set-variable " &&
- CFLAGS="$CFLAGS -Wno-unused-but-set-variable "
-
# Use bfd linker instead of gold if available:
testcc "$CC" "$CFLAGS -fuse-ld=bfd" &&
CFLAGS="$CFLAGS -fuse-ld=bfd" && LINKER_SUFFIX='.bfd'