nb/intel/haswell: Drop ASM to call into MRC
Commit c2ee680
(sandybridge: Use calls rather than asm to call to MRC.)
did it for Sandy Bridge, and this commit does it for Haswell.
Tested on Asrock B85M Pro4, still boots with MRC.
Change-Id: Ic915ae2a30f99805b2c87df8f9a9586a74a40c29
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46370
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
0117e4eae3
commit
1ca6b531ee
|
@ -108,7 +108,8 @@ static void report_memory_config(void)
|
||||||
*/
|
*/
|
||||||
void sdram_initialize(struct pei_data *pei_data)
|
void sdram_initialize(struct pei_data *pei_data)
|
||||||
{
|
{
|
||||||
unsigned long entry;
|
int (*entry)(struct pei_data *pei_data) __attribute__((regparm(1)));
|
||||||
|
|
||||||
uint32_t type = CBFS_TYPE_MRC;
|
uint32_t type = CBFS_TYPE_MRC;
|
||||||
struct cbfsf f;
|
struct cbfsf f;
|
||||||
|
|
||||||
|
@ -137,11 +138,9 @@ void sdram_initialize(struct pei_data *pei_data)
|
||||||
die("mrc.bin not found!");
|
die("mrc.bin not found!");
|
||||||
|
|
||||||
/* We don't care about leaking the mapping */
|
/* We don't care about leaking the mapping */
|
||||||
entry = (unsigned long)rdev_mmap_full(&f.data);
|
entry = rdev_mmap_full(&f.data);
|
||||||
if (entry) {
|
if (entry) {
|
||||||
int rv;
|
int rv = entry(pei_data);
|
||||||
asm volatile ("call *%%ecx\n\t"
|
|
||||||
:"=a" (rv) : "c" (entry), "a" (pei_data));
|
|
||||||
|
|
||||||
/* The mrc.bin reconfigures USB, so usbdebug needs to be reinitialized */
|
/* The mrc.bin reconfigures USB, so usbdebug needs to be reinitialized */
|
||||||
if (CONFIG(USBDEBUG_IN_PRE_RAM))
|
if (CONFIG(USBDEBUG_IN_PRE_RAM))
|
||||||
|
|
Loading…
Reference in New Issue