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.
Tags
None
Referenced Files
Unknown Object (File)
Feb 25 2024, 8:19 AM
Unknown Object (File)
Feb 22 2024, 7:00 AM
Unknown Object (File)
Dec 20 2023, 2:49 AM
Unknown Object (File)
Sep 16 2023, 6:04 PM
Unknown Object (File)
Sep 15 2023, 5:15 AM
Unknown Object (File)
Aug 15 2023, 12:34 PM
Unknown Object (File)
Aug 15 2023, 12:09 PM
Unknown Object (File)
Jul 30 2023, 7:25 AM
Subscribers

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