Vladimir Serbinenko (phcoder(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4617
-gerrit
commit ae9a332c8b8baab4aecf33f52e9a5ef6eeeec788
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Sun Jan 5 06:50:10 2014 +0100
acpi/ec: Add missing delays
Without these delays on fast systems like X230 the port is read before it's
updated.
Change-Id: I3e01fc348cc5170cec108a05095ba301055ed6b0
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
---
src/ec/acpi/ec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/ec/acpi/ec.c b/src/ec/acpi/ec.c
index ab287d6..634d2bb 100644
--- a/src/ec/acpi/ec.c
+++ b/src/ec/acpi/ec.c
@@ -53,6 +53,8 @@ int send_ec_command(u8 command)
// return -1;
}
+ udelay(10);
+
outb(command, ec_cmd_reg);
return 0;
}
@@ -73,6 +75,8 @@ int send_ec_data(u8 data)
// return -1;
}
+ udelay(10);
+
outb(data, ec_data_reg);
return 0;
@@ -104,6 +108,8 @@ u8 recv_ec_data(void)
// return -1;
}
+ udelay(10);
+
data = inb(ec_data_reg);
printk(BIOS_SPEW, "recv_ec_data: 0x%02x\n", data);
Vladimir Serbinenko (phcoder(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4675
-gerrit
commit 15cbbdeaa7f5bf3054595ed0ddd922fa8131aff4
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Sun Jan 12 14:28:56 2014 +0100
sandybridge: Use calls rather than asm to call to MRC.
Using asm as it's done currently is unsafe because caller-saved registers
are not declared as clobbered.
Using real call is nicer.
regparm((1)) ensures that argument is passed in %eax as expected.
Change-Id: I7449182582eaa53d4e473bc834b472edd8ee0d30
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
---
src/northbridge/intel/sandybridge/raminit.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c
index 80d7618..899935e 100644
--- a/src/northbridge/intel/sandybridge/raminit.c
+++ b/src/northbridge/intel/sandybridge/raminit.c
@@ -219,7 +219,7 @@ static void post_system_agent_init(struct pei_data *pei_data)
void sdram_initialize(struct pei_data *pei_data, int skip_cache)
{
struct sys_info sysinfo;
- unsigned long entry;
+ int (*entry) (struct pei_data *pei_data) __attribute__ ((regparm(1)));
report_platform_info();
@@ -252,13 +252,11 @@ void sdram_initialize(struct pei_data *pei_data, int skip_cache)
/* Locate and call UEFI System Agent binary. */
/* TODO make MRC blob (0xab?) defined in cbfs_core.h. */
- entry = (unsigned long)cbfs_get_file_content(
+ entry = cbfs_get_file_content(
CBFS_DEFAULT_MEDIA, "mrc.bin", 0xab, NULL);
if (entry) {
int rv;
- asm volatile (
- "call *%%ecx\n\t"
- :"=a" (rv) : "c" (entry), "a" (pei_data));
+ rv = entry (pei_data);
if (rv) {
switch (rv) {
case -1: