On 06/22/2009 09:27 PM, Marcelo Tosatti wrote:
This in the BIOS is writing 1's into the reserved address bits into
variable MTRR:
wrmsr_smp(MTRRphysMask_MSR(0), ~(0x2000ull - 1) | 0x800);
So i'll leave just memory type validity checking and MSR_MTRRdefType
valid bit checks in for now:
On Thu, Jun 18, 2009 at 10:39:32AM +0800, Yang, Sheng wrote:
> On Tuesday 16 June 2009 20:05:29 Marcelo Tosatti wrote:
> > Do not allow invalid MTRR/PAT values in set_msr_mtrr.
> >
> > Please review carefully.
> >
> > Signed-off-by: Marcelo Tosatti
> >
> Looks fine to me.
>
> Is it necessary to c
On 06/16/2009 03:05 PM, Marcelo Tosatti wrote:
Do not allow invalid MTRR/PAT values in set_msr_mtrr.
Please review carefully.
Signed-off-by: Marcelo Tosatti
+static unsigned mtrr_types[] = {0, 1, 4, 5, 6};
+static unsigned pat_types[] = {0, 1, 4, 5, 6, 7};
+
+static bool valid_mt(unsigned typ
On Tuesday 16 June 2009 20:05:29 Marcelo Tosatti wrote:
> Do not allow invalid MTRR/PAT values in set_msr_mtrr.
>
> Please review carefully.
>
> Signed-off-by: Marcelo Tosatti
>
Looks fine to me.
Is it necessary to check reserved bit of MSR_MTRRdefType and variable MTRRs as
well? Maybe like this