summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Holewa <mono@posteo.de>2014-12-25 08:11:54 +0100
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2015-01-10 08:45:15 +0100
commit1682b8d97a451b1ef96033a62f45b8196aa63715 (patch)
treeb6779b71a2d31a153a248501381f2e918e23d9ed
parent560c643e3213d8b73b1d82b25867743a330f0208 (diff)
macbook21: Add CST entries
Due to the CST entries the machine uses less power running GNU/Linux-libre. This can be seen by monitoring CPU temperature and time left the machine can run on battery. CPU temperature measurements have been done with lm_sensors, battery querying with acpi. Tests have been done before applying this patch and after. In both cases the battery was fully loaded and the machine powered up on battery, without AC. In both tests the machine was idleing for more than 1 hour. Without this patch battery was predicted to last 01:52:30 hours, CPU temperature first measurement showed 38 degrees. After 15 min idle, temperature has reached its maximum value in this test of 61 and 62 degrees (Core 0 and 1). Fan speed begins to increase shortly after 15 min. From its minimal value 1800 rpm it reaches 3100 rpm after 40 min. CPU temperature did not increase any further. After 60 min idle, the battery was predicted to still last 57 min. With this patch battery was predicted to last 02:22:40 hours. That is plus 30 min. CPU temperature begins at 35 degrees. After 15 min temperature has reached 45 degrees; after 30 min it has reached the maximal temperature during this test of about 50 degrees. That is 10 degrees improvement. The fan stayed at minimal speed. After 60 min idle, the battery was predicted to still last 01:22:48 hours; a 25 minute improvement. Change-Id: I6b2173df1dc09300329b61b51b79f4b9f4a8fb13 Signed-off-by: Axel Holewa <mono@posteo.de> Reviewed-on: http://review.coreboot.org/7923 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
-rw-r--r--src/mainboard/apple/macbook21/mainboard.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/mainboard/apple/macbook21/mainboard.c b/src/mainboard/apple/macbook21/mainboard.c
index 99527c1e75..fccd81502c 100644
--- a/src/mainboard/apple/macbook21/mainboard.c
+++ b/src/mainboard/apple/macbook21/mainboard.c
@@ -36,9 +36,43 @@
#include <drivers/intel/gma/int15.h>
#define PANEL INT15_5F35_CL_DISPLAY_DEFAULT
+static acpi_cstate_t cst_entries[] = {
+ {
+ .ctype = 1,
+ .latency = 1,
+ .power = 1000,
+ .resource = {
+ .space_id = ACPI_ADDRESS_SPACE_FIXED,
+ .bit_width = ACPI_FFIXEDHW_VENDOR_INTEL,
+ .bit_offset = ACPI_FFIXEDHW_CLASS_MWAIT,
+ {
+ .resv = 0,
+ },
+ .addrl = 0,
+ .addrh = 0,
+ }
+ },
+ {
+ .ctype = 2,
+ .latency = 1,
+ .power = 500,
+ .resource = {
+ .space_id = ACPI_ADDRESS_SPACE_FIXED,
+ .bit_width = ACPI_FFIXEDHW_VENDOR_INTEL,
+ .bit_offset = ACPI_FFIXEDHW_CLASS_MWAIT,
+ {
+ .resv = 0,
+ },
+ .addrl = 0x10,
+ .addrh = 0,
+ }
+ },
+};
+
int get_cst_entries(acpi_cstate_t **entries)
{
- return 0;
+ *entries = cst_entries;
+ return ARRAY_SIZE(cst_entries);
}
static void mainboard_init(device_t dev)