working until smm

Change-Id: Ia3d6fe1d250571420b0303ffc191a6699910e16a
This commit is contained in:
Alexander Couzens 2018-03-02 14:20:46 +01:00
parent 0b2ef73350
commit 0641651e5b
3 changed files with 10 additions and 10 deletions

View File

@ -23,7 +23,7 @@
void mainboard_get_spd(spd_raw_data *spd, bool id_only)
{
/* uint8_t *spd_file;
uint8_t *spd_file;
size_t spd_file_len;
spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
@ -38,12 +38,11 @@ void mainboard_get_spd(spd_raw_data *spd, bool id_only)
memcpy(&spd[1], spd_file, 256);
//memcpy(&spd[2], spd_file, 256);
//memcpy(&spd[3], spd_file, 256);
*/
read_spd (&spd[0], 0x50, id_only);
read_spd (&spd[1], 0x51, id_only);
read_spd (&spd[2], 0x52, id_only);
read_spd (&spd[3], 0x53, id_only);
/* try to read it from the bus */
//read_spd (&spd[0], 0x50, id_only);
//read_spd (&spd[1], 0x51, id_only);
//read_spd (&spd[2], 0x52, id_only);
//read_spd (&spd[3], 0x53, id_only);
}

View File

@ -418,8 +418,9 @@ static void init_dram_ddr3(int mobile, int min_tck, int s3resume)
ctrl.sandybridge = IS_SANDY_CPU(cpu);
/* Get ECC support and mode */
ctrl.ecc_supported = get_host_ecc_cap();
ctrl.ecc_forced = ctrl.ecc_supported ? get_host_ecc_mode() : 0;
ctrl.ecc_forced = get_host_ecc_mode();
ctrl.ecc_supported = ctrl.ecc_forced || get_host_ecc_cap();
printk(BIOS_DEBUG, "capid0_A: 0x%08x\n", pci_read_config32(PCI_DEV(0, 0, 0), CAPID0_A));
printk(BIOS_DEBUG, "ECC supported: %s ECC forced: %s\n",
ctrl.ecc_supported ? "yes" : "no",
ctrl.ecc_forced ? "yes" : "no");

View File

@ -493,7 +493,7 @@ size_t get_host_ecc_mode(void)
{
/* read Capabilities A Register */
const u32 reg32 = pci_read_config32(PCI_DEV(0, 0, 0), CAPID0_A);
return !!(reg32 & (1 << 24));
return reg32 & (1 << 24);
}
void dram_memorymap(ramctr_timing * ctrl, int me_uma_size)