aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/amd/persimmon/mainboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/amd/persimmon/mainboard.c')
-rw-r--r--src/mainboard/amd/persimmon/mainboard.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/mainboard/amd/persimmon/mainboard.c b/src/mainboard/amd/persimmon/mainboard.c
index 135f8f458f..3b181a12bf 100644
--- a/src/mainboard/amd/persimmon/mainboard.c
+++ b/src/mainboard/amd/persimmon/mainboard.c
@@ -63,14 +63,14 @@ static void persimmon_enable(device_t dev)
/* TOP_MEM: the top of DRAM below 4G */
msr = rdmsr(TOP_MEM);
printk
- (BIOS_INFO, "%s, TOP MEM: msr.lo = 0x%08x, msr.hi = 0x%08x\n",
- __func__, msr.lo, msr.hi);
+ (BIOS_INFO, "%s, TOP MEM: msr.lo = 0x%08x, msr.hi = 0x%08x\n",
+ __func__, msr.lo, msr.hi);
/* TOP_MEM2: the top of DRAM above 4G */
msr2 = rdmsr(TOP_MEM2);
printk
- (BIOS_INFO, "%s, TOP MEM2: msr2.lo = 0x%08x, msr2.hi = 0x%08x\n",
- __func__, msr2.lo, msr2.hi);
+ (BIOS_INFO, "%s, TOP MEM2: msr2.lo = 0x%08x, msr2.hi = 0x%08x\n",
+ __func__, msr2.lo, msr2.hi);
/* refer to UMA Size Consideration in Family14h BKDG. */
sys_mem = msr.lo + 0x1000000; // Ignore 16MB allocated for C6 when finding UMA size, refer MemNGetUmaSizeON()
@@ -78,17 +78,16 @@ static void persimmon_enable(device_t dev)
uma_memory_size = 0x18000000; /* >= 2G memory, 384M recommended UMA */
}
else {
- if (sys_mem >= 0x40000000) {
- uma_memory_size = 0x10000000; /* >= 1G memory, 256M recommended UMA */
- }
- else {
- uma_memory_size = 0x4000000; /* <1G memory, 64M recommended UMA */
- }
+ if (sys_mem >= 0x40000000) {
+ uma_memory_size = 0x10000000; /* >= 1G memory, 256M recommended UMA */
+ } else {
+ uma_memory_size = 0x4000000; /* <1G memory, 64M recommended UMA */
+ }
}
uma_memory_base = msr.lo - uma_memory_size; /* TOP_MEM1 */
printk(BIOS_INFO, "%s: uma size 0x%08llx, memory start 0x%08llx\n",
- __func__, uma_memory_size, uma_memory_base);
+ __func__, uma_memory_size, uma_memory_base);
/* TODO: TOP_MEM2 */
#else
@@ -105,9 +104,9 @@ int add_mainboard_resources(struct lb_memory *mem)
*/
#if (CONFIG_GFXUMA == 1)
printk(BIOS_INFO, "uma_memory_start=0x%llx, uma_memory_size=0x%llx \n",
- uma_memory_base, uma_memory_size);
+ uma_memory_base, uma_memory_size);
lb_add_memory_range(mem, LB_MEM_RESERVED, uma_memory_base,
- uma_memory_size);
+ uma_memory_size);
#endif
return 0;
}