Hi,
me and Kyösti Mälkki(kmalkki on IRC) figured out how to workarround the following problem: If I installed 4GB of ram in the m4a785t-m the screen comes up,however it's black. If I only installed 2GB of ram it worked fine.
I made a patch(I'll send it right after that email) but it seem to break graphics for the case where 2GB of ram is installed.
So I wonder what would be the correct fix(a fix that would work for every cases).
Explanation of the patch that will be sent right after the mail: "basek - mmio_basek;" should be 1048576 (1G): According to Kyösti Mälkki the correct value for the sizek is 1048576. So I looked for what could create that size and found that. I'm not convinced that "basek - mmio_basek" is the right fix but at least we're in the right direction.
Denis.
Thanks a lot to Kyösti Mälkki(kmalkki) for the help on #coreboot IRC channel on Freenode Servers.
Signed-off-by: Denis 'GNUtoo' Carikli GNUtoo@no-log.org --- src/northbridge/amd/amdfam10/northbridge.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c index 3b20684..573c535 100644 --- a/src/northbridge/amd/amdfam10/northbridge.c +++ b/src/northbridge/amd/amdfam10/northbridge.c @@ -1028,6 +1028,11 @@ static void amdfam10_domain_set_resources(device_t dev) unsigned pre_sizek; pre_sizek = mmio_basek - basek; if(pre_sizek>0) { +#if CONFIG_GFXUMA + /* Deduct uma memory before reporting because + * this is what the mtrr code expects */ + pre_sizek -= uma_memory_size / 1024; +#endif ram_resource(dev, (idx | i), basek, pre_sizek); idx += 0x10; sizek -= pre_sizek; @@ -1063,15 +1068,10 @@ static void amdfam10_domain_set_resources(device_t dev) } else { basek = 4*1024*1024; - sizek -= (4*1024*1024 - mmio_basek); + sizek = basek - mmio_basek; } }
-#if CONFIG_GFXUMA - /* Deduct uma memory before reporting because - * this is what the mtrr code expects */ - sizek -= uma_memory_size / 1024; -#endif ram_resource(dev, (idx | i), basek, sizek); idx += 0x10; #if CONFIG_WRITE_HIGH_TABLES
On Sat, 2012-06-30 at 18:18 +0200, Denis 'GNUtoo' Carikli wrote:
Hi,
me and Kyösti Mälkki(kmalkki on IRC) figured out how to workarround the following problem: If I installed 4GB of ram in the m4a785t-m the screen comes up,however it's black. If I only installed 2GB of ram it worked fine.
I made a patch(I'll send it right after that email) but it seem to break graphics for the case where 2GB of ram is installed.
So I wonder what would be the correct fix(a fix that would work for every cases).
Explanation of the patch that will be sent right after the mail: "basek - mmio_basek;" should be 1048576 (1G): According to Kyösti Mälkki the correct value for the sizek is 1048576. So I looked for what could create that size and found that. I'm not convinced that "basek - mmio_basek" is the right fix but at least we're in the right direction.
My explanation of the issue: uma_memory_size must reduce the size of the last RAM resource _below_ 4GB. It now touches the last RAM resource, even if located over 4GB.
Thanks, KM
On Sat, Jun 30, 2012 at 12:01 PM, Kyösti Mälkki kyosti.malkki@gmail.com wrote:
On Sat, 2012-06-30 at 18:18 +0200, Denis 'GNUtoo' Carikli wrote:
Hi,
me and Kyösti Mälkki(kmalkki on IRC) figured out how to workarround the following problem: If I installed 4GB of ram in the m4a785t-m the screen comes up,however it's black. If I only installed 2GB of ram it worked fine.
I made a patch(I'll send it right after that email) but it seem to break graphics for the case where 2GB of ram is installed.
So I wonder what would be the correct fix(a fix that would work for every cases).
Explanation of the patch that will be sent right after the mail: "basek - mmio_basek;" should be 1048576 (1G): According to Kyösti Mälkki the correct value for the sizek is 1048576. So I looked for what could create that size and found that. I'm not convinced that "basek - mmio_basek" is the right fix but at least we're in the right direction.
My explanation of the issue: uma_memory_size must reduce the size of the last RAM resource _below_ 4GB. It now touches the last RAM resource, even if located over 4GB.
Yes, The UMA graphics memory is allocated in the lower 4GB. I think that should be happening in mainboard.c. See the AMD reference platforms.
Regards, Marc