diff options
author | Simon Glass | 2020-07-17 08:48:26 -0600 |
---|---|---|
committer | Bin Meng | 2020-07-20 09:46:47 +0800 |
commit | 8dda2baa976a3b4caa9c6e52a861adb0431f7dbf (patch) | |
tree | d350537e855ce28e6d6047dd27f765770e111d68 /cmd | |
parent | aa3a4d870e53e4517320140902eb9488a73e84ce (diff) |
x86: mtrr: Add support for writing to MTRRs on any CPU
To enable support for the 'mtrr' command, add a way to perform MTRR
operations on selected CPUs.
This works by setting up a little 'operation' structure and sending it
around the CPUs for action.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/x86/mtrr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/x86/mtrr.c b/cmd/x86/mtrr.c index f357f587670..46ef6a2830e 100644 --- a/cmd/x86/mtrr.c +++ b/cmd/x86/mtrr.c @@ -96,7 +96,7 @@ static int do_mtrr_set(uint reg, int argc, char *const argv[]) return 0; } -static int mtrr_set_valid(int reg, bool valid) +static int mtrr_set_valid_(int reg, bool valid) { struct mtrr_state state; uint64_t mask; @@ -134,9 +134,9 @@ static int do_mtrr(struct cmd_tbl *cmdtp, int flag, int argc, return CMD_RET_USAGE; } if (*cmd == 'e') - return mtrr_set_valid(reg, true); + return mtrr_set_valid_(reg, true); else if (*cmd == 'd') - return mtrr_set_valid(reg, false); + return mtrr_set_valid_(reg, false); else if (*cmd == 's') return do_mtrr_set(reg, argc - 1, argv + 1); else |