Set SB800 ROM decode size based on kconfig.
[coreboot.git] / src / southbridge / amd / cimx / sb800 / bootblock.c
index aaec03cbea4507095f54387c78dca5feac36673c..170276ac6984f924677cba9ca3d588acfc06cfbc 100644 (file)
@@ -49,10 +49,9 @@ static void enable_rom(void)
        dword |= (1 << 0) | (1 << 1) | (1 << 4) | (1 << 6) | (1 << 21);
        pci_io_write_config32(dev, 0x48, dword);
 
-       /* Enable 4MB rom access at 0xFFE00000 - 0xFFFFFFFF */
-       /* Set the 4MB enable bits */
+       /* Enable rom access */
        word = pci_io_read_config16(dev, 0x6c);
-       word = 0xFFC0;
+       word = 0x10000 - (CONFIG_COREBOOT_ROMSIZE_KB >> 6);
        pci_io_write_config16(dev, 0x6c, word);
 }