Fix the length calculated in generic_get_mtrr(). The +1 would usually be added

to the mask and then shifted, but as we don't do the shifting at all, we need
to add a page size instead of just 1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31024 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2009-06-13 02:35:19 +00:00
parent 62232fd053
commit bcc2ed0722

View File

@ -151,7 +151,7 @@ generic_get_mtrr(uint32 index, uint64 *_base, uint64 *_length, uint8 *_type)
uint64 base = x86_read_msr(IA32_MSR_MTRR_PHYSICAL_BASE_0 + index * 2);
*_base = base & ~(B_PAGE_SIZE - 1);
*_length = (~mask & gPhysicalMask) + 1;
*_length = (~mask & gPhysicalMask) + B_PAGE_SIZE;
*_type = base & 0xff;
return B_OK;