Page MenuHomeFreeBSD

Fix the MPTable probe code after the 4:4 changes on i386.
ClosedPublic

Authored by jhb on Aug 19 2018, 4:20 PM.

Details

Summary

The MPTable probe code was using PMAP_MAP_LOW as the PA -> VA offset
when searching for the table signature but still using KERNBASE once
it had found the table. As a result, the mpfps table pointed into a
random part of the kernel text instead of the actual MP Table.

Rather than adding more #ifdef's, use BIOS_PADDRTOVADDR from
<machine/pc/bios.h> which already uses PMAP_MAP_LOW on i386 and KERNBASE
on amd64.

Test Plan
  • boot an i386 kernel in bhyve and see a weird message about an unsupported MPTable configuration type. Also examined the 'mpfps' pointer in kgdb in old and new kernels and confirmed it was random strings in the kernel before and now points to the actual MPTable.
  • compiled an amd64 kernel that includes 'device mptable'.

I did not boot an actual kernel that used MPTable instead of ACPI on i386,
and I didn't bother booting an MPTable kernel at all on amd64.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable