El vie., 22 mar. 2019 a las 0:24, Eric Snowberg
(<eric.snowb...@oracle.com>) escribió:
>
>
> > On Mar 7, 2019, at 5:26 PM, Jesús Diéguez Fernández <jesu...@gmail.com> 
> > 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
> > Grub-devel@gnu.org
> > https://lists.gnu.org/mailman/listinfo/grub-devel
>

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to