grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 2/2] Add new MSR modules (rdmsr/wrmsr)


From: Jesús DF
Subject: Re: [PATCH v3 2/2] Add new MSR modules (rdmsr/wrmsr)
Date: Fri, 22 Mar 2019 09:36:12 +0100

El vie., 22 mar. 2019 a las 0:24, Eric Snowberg
(<address@hidden>) escribió:
>
>
> > On Mar 7, 2019, at 5:26 PM, Jesús Diéguez Fernández <address@hidden> wrote:
> >
> > 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.

[...]

> > +extern __inline void grub_msr_write(grub_uint32_t msr_id, grub_uint64_t 
> > msr_value)
>
> Also here:
>
> In file included from commands/i386/wrmsr.c:29:0:
> ../include/grub/i386/wrmsr.h:27:20: error: no previous prototype for 
> _grub_msr_write_ [-Werror=missing-prototypes]
>  extern inline void grub_msr_write(grub_uint32_t msr_id, grub_uint64_t 
> msr_value)
>                     ^
> cc1: all warnings being treated as errors
>
> I believe it would be best to either provide a global definition for the 
> function, or declare the functions as static inline, or move them into the c 
> file, since neither is used elsewhere. If you would like me to fix it, let me 
> know the approach you would like to see done.
>

I would add the missing prototype. If you can fix it, I appreciate it.
If you are busy I can send the patch late this night or tomorrow.

Thank you.

> > +{
> > +    grub_uint32_t low = msr_value, high = msr_value >> 32;
> > +
> > +    asm volatile ( "wrmsr" : : "c"(msr_id), "a"(low), "d"(high) );
> > +}
> > +
> > +#endif /* GRUB_WRMSR_H */
> > --
> > 2.17.1
> >
> >
> > _______________________________________________
> > Grub-devel mailing list
> > address@hidden
> > https://lists.gnu.org/mailman/listinfo/grub-devel
>



reply via email to

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