diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2021-07-31 11:45:26 +0300 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2021-08-02 10:11:41 +0300 |
commit | 9a7c6fde07d04e392dadfd406b7837c04aed0d72 (patch) | |
tree | 02e024f7f95da9b256d73d384a98942e14c07707 /cmd | |
parent | 3bcd6cf89efee5c8088dce2f770bdd5592186efb (diff) | |
download | u-boot-9a7c6fde07d04e392dadfd406b7837c04aed0d72.tar.xz |
x86: mtrr: Abort if requested size is not power of 2
The size parameter of mtrr_add_request() and mtrr_set_next_var()
shall be power of 2, otherwise the logic creates a mask that does
not meet the requirement of IA32_MTRR_PHYSMASK register.
Programming such a mask value to IA32_MTRR_PHYSMASK generates #GP.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax
Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd')
0 files changed, 0 insertions, 0 deletions