]> git.proxmox.com Git - grub2.git/commit
msr: Add new MSR modules (rdmsr/wrmsr)
authorJesús Diéguez Fernández <jesusdf@gmail.com>
Fri, 8 Mar 2019 00:26:37 +0000 (01:26 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 12 Mar 2019 19:04:07 +0000 (20:04 +0100)
commit46f5d5134392384c45710554bfe717ffa9c6dd46
treee21c78dd90f52663620ae5aefba0fb95270b368a
parent3611c4f42ee90d2b31082a1ee3d82ebc863585d3
msr: Add new MSR modules (rdmsr/wrmsr)

In order to be able to read from and write to model-specific registers,
two new modules are added. They are i386 specific, as the cpuid module.

rdmsr module registers the command rdmsr that allows reading from a MSR.
wrmsr module registers the command wrmsr that allows writing to a MSR.

wrmsr module is disabled if UEFI secure boot is enabled.

Please note that on SMP systems, interacting with a MSR that has a scope
per hardware thread, implies that the value only applies to the
particular cpu/core/thread that ran the command.

Also, if you specify a reserved or unimplemented MSR address, it will
cause a general protection exception (which is not currently being
handled) and the system will reboot.

Signed-off-by: Jesús Diéguez Fernández <jesusdf@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
docs/grub.texi
grub-core/Makefile.core.def
grub-core/commands/efi/shim_lock.c
grub-core/commands/i386/rdmsr.c [new file with mode: 0644]
grub-core/commands/i386/wrmsr.c [new file with mode: 0644]
include/grub/i386/rdmsr.h [new file with mode: 0644]
include/grub/i386/wrmsr.h [new file with mode: 0644]