mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-18 10:54:37 +00:00
x86: Update mtrr command to support 64-bit values
The MTRR registers have 64-bit values. Update the command to use 64-bit values so that memory larger than 4GB can be handled. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
8bd563707d
commit
5450836115
1 changed files with 3 additions and 3 deletions
|
@ -13,7 +13,7 @@
|
|||
static int do_mtrr_set(int cpu_select, uint reg, int argc, char *const argv[])
|
||||
{
|
||||
const char *typename = argv[0];
|
||||
uint32_t start, size;
|
||||
u64 start, size;
|
||||
u64 base, mask;
|
||||
int type = -1;
|
||||
bool valid;
|
||||
|
@ -26,8 +26,8 @@ static int do_mtrr_set(int cpu_select, uint reg, int argc, char *const argv[])
|
|||
printf("Invalid type name %s\n", typename);
|
||||
return CMD_RET_USAGE;
|
||||
}
|
||||
start = hextoul(argv[1], NULL);
|
||||
size = hextoul(argv[2], NULL);
|
||||
start = hextoull(argv[1], NULL);
|
||||
size = hextoull(argv[2], NULL);
|
||||
|
||||
base = start | type;
|
||||
valid = native_read_msr(MTRR_PHYS_MASK_MSR(reg)) & MTRR_PHYS_MASK_VALID;
|
||||
|
|
Loading…
Add table
Reference in a new issue