grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 0/2] i386: Code cleanup and new MSR modules


From: Jesús Diéguez Fernández
Subject: [PATCH v3 0/2] i386: Code cleanup and new MSR modules
Date: Fri, 8 Mar 2019 01:26:35 +0100

This patch series consist in a code cleanup and two new modules to access MSR:

The first patch replaces __asm__ __volatile__ with asm volatile.
The second patch adds the modules rdmsr and wrmsr, which register two commands 
with the same name to read from and write to MSR.

Currently, it lacks a GP# handler, and therefore accessing a reserved or 
unimplemented MSR, results in a general protection exception and system reboot.

Changes in v3:

    - Add a cover letter to the patch series.
    - In Makefile.core.def, leave only x86.
    - Fixed incorrect #endif positioning.
    - Fixed variable types and parameter parsing.
    - Check that the CPU supports the MSR instructions.
    - Add TODO comments indicating that a GP# handler should be implemented.
    - Add a warning to the documentation, explaining that accessing a reserved
      or unimplemented MSR address results in a general protection exception.

Changes in v2:

    - Patch all source code files with s/__asm__ __volatile__/asm volatile/g.
    - Split the module in two (rdmsr/wrmsr).
    - Include the wrmsr module in the forbidden modules efi list.
    - Code indentation and cleanup.
    - Copyright year update.
    - Implicit casting mask removed.
    - Use the same assembly code for x86 and x86_64.
    - Add missing documentation.
    - Patch submitted with Signed-off-by.

Jesús Diéguez Fernández (2):
  Replace __asm__ __volatile__ with asm volatile.
  Add new MSR modules (rdmsr/wrmsr)

 docs/grub.texi                     |  53 +++++++++++++--
 grub-core/Makefile.core.def        |  10 +++
 grub-core/commands/efi/shim_lock.c |   2 +-
 grub-core/commands/i386/rdmsr.c    | 101 +++++++++++++++++++++++++++++
 grub-core/commands/i386/wrmsr.c    |  92 ++++++++++++++++++++++++++
 grub-core/efiemu/runtime/efiemu.c  |  10 +--
 grub-core/lib/i386/halt.c          |   2 +-
 include/grub/arm/time.h            |   2 +-
 include/grub/arm64/time.h          |   2 +-
 include/grub/i386/io.h             |  12 ++--
 include/grub/i386/rdmsr.h          |  34 ++++++++++
 include/grub/i386/time.h           |   2 +-
 include/grub/i386/tsc.h            |   2 +-
 include/grub/i386/wrmsr.h          |  32 +++++++++
 include/grub/x86_64/time.h         |   2 +-
 15 files changed, 335 insertions(+), 23 deletions(-)
 create mode 100644 grub-core/commands/i386/rdmsr.c
 create mode 100644 grub-core/commands/i386/wrmsr.c
 create mode 100644 include/grub/i386/rdmsr.h
 create mode 100644 include/grub/i386/wrmsr.h

-- 
2.17.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]