This morning while in the shower it came to me what the +1 was for in
Ollie's mtrr code.  It is a rounding issue and my proposed changes will
fail for anything that needs more than 1 mtrr.

I think that the correct version is:

                range_wb = 1 << (fms(ramsizeK - 1) + 1);
                range_uc = range_wb - ramsizeK;

                if ((range_uc==0) || ((ramsizeK % range_uc) == 0)) {

Note that instead of removing the +1 I have added a -1 to the fms()
arguement.  The (range_uc==0) part of the if statement is still needed
to prevent doing a (ramsizeK % 0) as this seem to cause an exception or
otherwise lock up the computer.

When I get back after next week I will submit a separate patch for this.

Cheers!
Ty

-- 
Tyson D Sawyer                             iRobot Corporation
Senior Systems Engineer                    Real World Interface Div.
[EMAIL PROTECTED]                         Robots for the Real World
603-532-6900 ext 206                       http://www.irobot.com

Reply via email to