include/cpu/amd/mtrr: fix typo in get_top_of_mem_above_4gb
Add the missing 'b' to the 4gb so that get_top_of_mem_above_4gb is in line with get_top_of_mem_below_4gb. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ic9170372d8b0c27d7de3bd04d822c95e2015cb10 Reviewed-on: https://review.coreboot.org/c/coreboot/+/74710 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
@@ -70,7 +70,7 @@ static inline uint32_t get_top_of_mem_below_4gb(void)
|
|||||||
return rdmsr(TOP_MEM).lo;
|
return rdmsr(TOP_MEM).lo;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint64_t get_top_of_mem_above_4g(void)
|
static inline uint64_t get_top_of_mem_above_4gb(void)
|
||||||
{
|
{
|
||||||
msr_t msr = rdmsr(TOP_MEM2);
|
msr_t msr = rdmsr(TOP_MEM2);
|
||||||
return (uint64_t)msr.hi << 32 | msr.lo;
|
return (uint64_t)msr.hi << 32 | msr.lo;
|
||||||
|
@@ -550,7 +550,7 @@ static void northbridge_fill_ssdt_generator(const struct device *device)
|
|||||||
* Shift value right by 20 bit to make it fit into 32bit,
|
* Shift value right by 20 bit to make it fit into 32bit,
|
||||||
* giving us 1MB granularity and a limit of almost 4Exabyte of memory.
|
* giving us 1MB granularity and a limit of almost 4Exabyte of memory.
|
||||||
*/
|
*/
|
||||||
acpigen_write_name_dword("TOM2", get_top_of_mem_above_4g() >> 20);
|
acpigen_write_name_dword("TOM2", get_top_of_mem_above_4gb() >> 20);
|
||||||
acpigen_pop_len();
|
acpigen_pop_len();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -834,7 +834,7 @@ static void domain_read_resources(struct device *dev)
|
|||||||
sizek = 0;
|
sizek = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uint64_t topmem2 = get_top_of_mem_above_4g();
|
uint64_t topmem2 = get_top_of_mem_above_4gb();
|
||||||
basek = 4 * 1024 * 1024;
|
basek = 4 * 1024 * 1024;
|
||||||
sizek = topmem2 / 1024 - basek;
|
sizek = topmem2 / 1024 - basek;
|
||||||
}
|
}
|
||||||
|
@@ -58,6 +58,6 @@ void acpi_fill_root_complex_tom(const struct device *device)
|
|||||||
* Shift value right by 20 bit to make it fit into 32bit,
|
* Shift value right by 20 bit to make it fit into 32bit,
|
||||||
* giving us 1MB granularity and a limit of almost 4Exabyte of memory.
|
* giving us 1MB granularity and a limit of almost 4Exabyte of memory.
|
||||||
*/
|
*/
|
||||||
acpigen_write_name_dword("TOM2", get_top_of_mem_above_4g() >> 20);
|
acpigen_write_name_dword("TOM2", get_top_of_mem_above_4gb() >> 20);
|
||||||
acpigen_pop_len();
|
acpigen_pop_len();
|
||||||
}
|
}
|
||||||
|
@@ -328,7 +328,7 @@ void domain_read_resources(struct device *dev)
|
|||||||
uint32_t uma_size = get_uma_size();
|
uint32_t uma_size = get_uma_size();
|
||||||
uint32_t mem_useable = (uintptr_t)cbmem_top();
|
uint32_t mem_useable = (uintptr_t)cbmem_top();
|
||||||
uint32_t tom = get_top_of_mem_below_4gb();
|
uint32_t tom = get_top_of_mem_below_4gb();
|
||||||
uint64_t high_tom = get_top_of_mem_above_4g();
|
uint64_t high_tom = get_top_of_mem_above_4gb();
|
||||||
uint64_t high_mem_useable;
|
uint64_t high_mem_useable;
|
||||||
int idx = 0x10;
|
int idx = 0x10;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user