amd/agesa: Make BottomIo position configurable
Some PCI peripherals, such as discrete VGA adapters, require a great amount of memory mapped IO. This patch allows the user to select at build time the bottom IO to leave enough space for such devices. We cannot calculate this value at runtime because it has to be set before the PCI devices are enumerated. 0x80000000 has been successfully boot-tested on A88XM-E (fam15tn), G505S (fam15tn) and AM1I-A (fam16kb). Signed-off-by: Mike Banon <mikebdp2@gmail.com> Change-Id: Ie235631231bcb4aeebaff2e0026da2ea9d82f9d0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/38472 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
This commit is contained in:
parent
4ac376a67b
commit
e7f176cd61
|
@ -19,6 +19,17 @@ config NORTHBRIDGE_AMD_AGESA
|
|||
|
||||
if NORTHBRIDGE_AMD_AGESA
|
||||
|
||||
config BOTTOMIO_POSITION
|
||||
hex "Bottom of 32-bit IO space"
|
||||
default 0x80000000
|
||||
help
|
||||
If PCI peripherals with big BARs are connected to the system
|
||||
the bottom of the IO must be decreased to allocate such devices.
|
||||
|
||||
Declare the beginning of the 128MB-aligned MMIO region. This
|
||||
option is useful when PCI peripherals requesting large address
|
||||
ranges are present, for example, graphic cards.
|
||||
|
||||
config CONSOLE_VGA_MULTI
|
||||
bool
|
||||
default n
|
||||
|
|
|
@ -48,6 +48,8 @@ void platform_BeforeInitEarly(struct sysinfo *cb, AMD_EARLY_PARAMS *Early)
|
|||
|
||||
void platform_BeforeInitPost(struct sysinfo *cb, AMD_POST_PARAMS *Post)
|
||||
{
|
||||
Post->MemConfig.BottomIo = (UINT16)(MIN(0xE0000000,
|
||||
MAX(0x28000000, CONFIG_BOTTOMIO_POSITION)) >> 24) & 0xF8;
|
||||
}
|
||||
|
||||
void platform_AfterInitPost(struct sysinfo *cb, AMD_POST_PARAMS *Post)
|
||||
|
|
|
@ -18,6 +18,8 @@ void platform_BeforeInitEarly(struct sysinfo *cb, AMD_EARLY_PARAMS *Early)
|
|||
|
||||
void platform_BeforeInitPost(struct sysinfo *cb, AMD_POST_PARAMS *Post)
|
||||
{
|
||||
Post->MemConfig.BottomIo = (UINT16)(MIN(0xE0000000,
|
||||
MAX(0x28000000, CONFIG_BOTTOMIO_POSITION)) >> 24) & 0xF8;
|
||||
}
|
||||
|
||||
void platform_AfterInitPost(struct sysinfo *cb, AMD_POST_PARAMS *Post)
|
||||
|
|
|
@ -20,6 +20,9 @@ void platform_BeforeInitPost(struct sysinfo *cb, AMD_POST_PARAMS *Post)
|
|||
{
|
||||
AGESA_STATUS status;
|
||||
|
||||
Post->MemConfig.BottomIo = (UINT16)(MIN(0xE0000000,
|
||||
MAX(0x28000000, CONFIG_BOTTOMIO_POSITION)) >> 24) & 0xF8;
|
||||
|
||||
if (CONFIG(ENABLE_MRC_CACHE)) {
|
||||
status = OemInitResume(&Post->MemConfig.MemContext);
|
||||
if (status == AGESA_SUCCESS)
|
||||
|
|
Loading…
Reference in New Issue