[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 2/8] i386/msr: Rename grub_msr_read() and grub_msr_write()
From: |
Sergii Dmytruk |
Subject: |
[PATCH v2 2/8] i386/msr: Rename grub_msr_read() and grub_msr_write() |
Date: |
Fri, 20 Sep 2024 01:02:06 +0300 |
From: Daniel Kiper <daniel.kiper@oracle.com>
Use more obvious names which match corresponding instructions:
* grub_msr_read() => grub_rdmsr()
* grub_msr_write() => grub_wrmsr()
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
---
grub-core/commands/i386/rdmsr.c | 2 +-
grub-core/commands/i386/wrmsr.c | 2 +-
include/grub/i386/msr.h | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/grub-core/commands/i386/rdmsr.c b/grub-core/commands/i386/rdmsr.c
index fa4622f9e..89ece7657 100644
--- a/grub-core/commands/i386/rdmsr.c
+++ b/grub-core/commands/i386/rdmsr.c
@@ -76,7 +76,7 @@ grub_cmd_msr_read (grub_extcmd_context_t ctxt, int argc, char
**argv)
if (*ptr != '\0')
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("invalid argument"));
- value = grub_msr_read (addr);
+ value = grub_rdmsr (addr);
if (ctxt->state[0].set)
{
diff --git a/grub-core/commands/i386/wrmsr.c b/grub-core/commands/i386/wrmsr.c
index 8f352f205..cf6bf6c8f 100644
--- a/grub-core/commands/i386/wrmsr.c
+++ b/grub-core/commands/i386/wrmsr.c
@@ -77,7 +77,7 @@ grub_cmd_msr_write (grub_command_t cmd __attribute__
((unused)), int argc, char
if (*ptr != '\0')
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("invalid argument"));
- grub_msr_write (addr, value);
+ grub_wrmsr (addr, value);
return GRUB_ERR_NONE;
}
diff --git a/include/grub/i386/msr.h b/include/grub/i386/msr.h
index 7b52b5d61..4fba1b8e0 100644
--- a/include/grub/i386/msr.h
+++ b/include/grub/i386/msr.h
@@ -25,7 +25,7 @@
*/
static inline grub_uint64_t
-grub_msr_read (grub_uint32_t msr_id)
+grub_rdmsr (grub_uint32_t msr_id)
{
grub_uint32_t low, high;
@@ -35,7 +35,7 @@ grub_msr_read (grub_uint32_t msr_id)
}
static inline void
-grub_msr_write(grub_uint32_t msr_id, grub_uint64_t msr_value)
+grub_wrmsr (grub_uint32_t msr_id, grub_uint64_t msr_value)
{
grub_uint32_t low = msr_value, high = msr_value >> 32;
--
2.46.1
- [PATCH v2 0/8] i386: memory/MSR/CR code updates, Sergii Dmytruk, 2024/09/19
- [PATCH v2 2/8] i386/msr: Rename grub_msr_read() and grub_msr_write(),
Sergii Dmytruk <=
- [PATCH v2 5/8] i386/memory: Rename PAGE_SIZE to GRUB_PAGE_SIZE and make it global, Sergii Dmytruk, 2024/09/19
- [PATCH v2 1/8] i386/msr: Merge rdmsr.h and wrmsr.h into msr.h, Sergii Dmytruk, 2024/09/19
- [PATCH v2 8/8] i386: Add CRx, MMIO, MSR and extend CPUID definitions, Sergii Dmytruk, 2024/09/19
- [PATCH v2 4/8] i386/memory: Rename PAGE_SHIFT to GRUB_PAGE_SHIFT, Sergii Dmytruk, 2024/09/19
- [PATCH v2 6/8] i386/memory: Define GRUB_PAGE_MASK constant and GRUB_PAGE_{UP, DOWN} macros, Sergii Dmytruk, 2024/09/19