Page MenuHomeFreeBSD

apic_enumerator: only set mp_ncpus and mp_maxid at probe cpus phase
ClosedPublic

Authored by royger on Aug 7 2017, 10:23 AM.

Details

Summary

Populate the lapics arrays and call cpu_add/lapic_create in the setup
phase instead. Also store the max APIC ID found in the newly
introduced max_apic_id global variable.

This is a requirement in order to make the static arrays currently
using MAX_LAPIC_ID dynamic.

Sponsored by: Citrix Systems R&D

Diff Detail

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

Event Timeline

kib added inline comments.
sys/x86/include/apicvar.h
178 ↗(On Diff #31698)

Add this to x86/include/x86_var.h ?

sys/x86/x86/mptable.c
480 ↗(On Diff #31698)

I think that xAPIC constant should be used for mptable configs.

This revision is now accepted and ready to land.Aug 7 2017, 11:09 AM

Thanks.

sys/x86/x86/mptable.c
480 ↗(On Diff #31698)

MAX_LAPIC_ID is set to 63 or 11 on the top of the file. I'm not sure it safe to expand it to 254 (xAPIC_MAX_APIC_ID).

This revision was automatically updated to reflect the committed changes.
royger marked an inline comment as done.