LoginSignup
3
4

More than 5 years have passed since last update.

ACPI Table

Last updated at Posted at 2015-12-24
  • kernel の num_possible_cpus() の挙動がおかしかったので APIC の認識状態を確認した時にざっと調べた内容
  • APIC の情報は RAM 上の ACPI Table に入っており BIOS によって初期化されている

16.3.2 BIOS Initialization of Memory
During a power-on reset, an exit from an S4 sleeping state, or an exit from an S5 soft-off state, the
BIOS needs to initialize memory. This section explains how the BIOS should configure memory for
use by a number of features including:
• ACPI tables.
• BIOS memory that wants to be saved across S4 sleeping sessions and should be cached.
• BIOS memory that does not require saving and should be cached.

definition

  • ACPI Table はシステム初期化に必要なデータ構造で RAM に置かれている
  • 次のような階層関係でデータを参照できる
  • RSDP: Root System Description Pointer
    • RSDT: Root System Description Table
    • XSDT: eXtended System Description Table / RSDT の 64bit 版
      • 様々なテーブルへのポインタを持つ
      • FACP: Fiexed ACPI Control Pointer (FADT: Fixed ACPI Description Table)
        • 最も重要なポインタでこれが指すテーブルに含まれる情報は次のようなものがある
        • ACPI ハードウェアレジスタの位置 − FACS: Firmware ACPI Control Structure
          • 排他制御などにおいて BIOS とのやり取りに使うためのメモリ位置
        • DSDT: Differentiated System Description Table の位置
          • AML: ACPI Machine Language で記述されたシステム情報
          • AML は ASL: ACPI Source Language から生成される
          • 複数個存在する
  • DSDT のパースにはオーべヘッドがあるため一部は XSDT のエントリとして置かれる
    • SSDT (SSDT: Secondary System Description Table)
      • デバイス情報
    • APIC (MADT: Multiple Apic Description Table)
      • システム内の APIC 情報
    • その他いろいろ

disassemble

procfs から参照できる。

$ ls /sys/firmware/acpi/tables/
APIC  BERT  DMAR  DSDT  dynamic  EINJ  ERST  FACP  FACS  HEST  HPET  MCEJ  MCFG  MSCT  PMCT  PRAD  SLIC  SLIT  SRAT  SSDT1  SSDT2  SSDT3  WD__

iasl を用いると ASL に戻せるのでいろいろ中身を見て確かめられる。

$ sudo yum install iasl -y
$ sudo cat /sys/firmware/acpi/tables/APIC > apic.dat
$ iasl -d apic.dat
$ less apic.dsl
$ grep 'Processor Enabled' | wc -l
144
3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4