前回の続き、エラーを潰していきます。

Not all control paths return a value (名前)
このエラーに対しては最後に値を返せばよさそうなので
Return (Zero) をそのセクションの最後に追加

ここまでの編集でエラーは出なくなったので最後にRTC,HPETの項目の編集をします。

HPETの編集

Device (HPET)
{
Name (_HID, EisaId ("PNP0103"))
Name (_UID, Zero)
Name (CRS0, ResourceTemplate ()
{
})
Name (CRS1, ResourceTemplate ()
{
Memory32Fixed (ReadWrite,
0x00000000, // Address Base
0x00000000, // Address Length
_Y0D)
IRQNoFlags ()
{0}
IRQNoFlags ()
{8}
})
Method (_STA, 0, NotSerialized)
{
If (LEqual (OSFL (), Zero))
{
If (LEqual (NVID, 0x10DE))
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
Else
{
Return (Zero)
}

}
Method (_CRS, 0, NotSerialized)
{
CreateDWordField (CRS1, \_SB.PCI0.SBRG.HPET._Y0D._BAS, HPX1)
CreateDWordField (CRS1, \_SB.PCI0.SBRG.HPET._Y0D._LEN, HPX2)
If (LEqual (NVID, 0x10DE))
{
Store (SHPB, HPX1)
Store (SHPL, HPX2)
Return (CRS1)
}
Else
{
Return (CRS0)
}

}
OperationRegion (HPTE, SystemMemory, SHPB, 0x04)
Field (HPTE, ByteAcc, NoLock, Preserve)
{
Offset (0x02),
NVID, 16
}
}

編集後
  Device (HPET)
{
Name (_HID, EisaId ("PNP0103"))
Name (_UID, Zero)
Name (CRS0, ResourceTemplate ()
{
})
Name (CRS1, ResourceTemplate ()
{
Memory32Fixed (ReadWrite,
0x00000000, // Address Base
0x00000000, // Address Length
_Y0D)
IRQNoFlags ()
{0}
IRQNoFlags ()
{8}
})
OperationRegion (HPTE, SystemMemory, SHPB, 0x04)
Field (HPTE, ByteAcc, NoLock, Preserve)
{
Offset (0x02),
NVID, 16
}
Method (_STA, 0, NotSerialized)
{
Return (0x0F)
}
Method (_CRS, 0, NotSerialized)
{
Return (CRS1)
}
}

Device (RTC)の編集は必要なさそうだったのでそのままスルー。

ここまで編集したら一度コンパイルしなおして新しいdsdt.amlとして保存
無事にDSDT.amlも確保できたので。別のマシン(MacbookAir)でパッチをあてる。


編集にはここのソフトを使いました。


早速Processor Aliasを削除
Scope (_PR)
{
Processor (P001, 0x01, 0x00000510, 0x06)
{
}
Processor (P002, 0x02, 0x00000000, 0x00)
{
}
Processor (P003, 0x03, 0x00000000, 0x00)
{
}
Processor (P004, 0x04, 0x00000000, 0x00)
{
}
Alias (P001, CPU1)
Alias (P002, CPU2)
Alias (P003, CPU3)
Alias (P004, CPU4)

}

変更後
  Scope (_PR)
{
Processor (P001, 0x01, 0x00000510, 0x06)
{
}
Processor (P002, 0x02, 0x00000000, 0x00)
{
}
Processor (P003, 0x03, 0x00000000, 0x00)
{
}
Processor (P004, 0x04, 0x00000000, 0x00)
{
}
} 

DTGP Methodの追加
DefinitionBlock(ファイルの先頭のほう)のすぐ下に追加した。
Method (DTGP, 5, NotSerialized)
{
If (LEqual (Arg0, Buffer (0x10)
{
/* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44,
/* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
}))
{
If (LEqual (Arg1, One))
{
If (LEqual (Arg2, Zero))
{
Store (Buffer (One)
{
0x03
}, Arg4)
Return (One)
}
If (LEqual (Arg2, One))
{
Return (One)
}
}
}
Store (Buffer (One)
{
0x00
}, Arg4)
Return (Zero)
}
ここまでをやってみてコンパイルしてみるとUse of compiler reserved name(_T_0)等のエラーが出る。この場合 "_T_0" を "T_0"にリネームする。
Possible operator timeout is ignored のエラーに対しては、
"Acqire (MUTE,"の項目のアドレス部を"0xFFFF"に書き換える。

Method (_WAK, 1, NotSerialized)の部分を探し出し最後の部分に手を加える。

編集前:
    Method (_WAK, 1, NotSerialized)
{
ShiftLeft (Arg0, 0x04, DBG8)
WAK (Arg0)
If (ASSB)
{
Store (WSSB, ASSB)
Store (WOTB, AOTB)
Store (WAXB, AAXB)
}
If (DerefOf (Index (WAKP, Zero)))
{
Store (Zero, Index (WAKP, One))
}
Else
{
Store (Arg0, Index (WAKP, One))
}
Return (WAKP)
}

編集後:
   Method (_WAK, 1, NotSerialized)
{
ShiftLeft (Arg0, 0x04, DBG8)
WAK (Arg0)
If (ASSB)
{
Store (WSSB, ASSB)
Store (WOTB, AOTB)
Store (WAXB, AAXB)
}
If (DerefOf (Index (WAKP, Zero)))
{
Store (Zero, Index (WAKP, One))
}
Else
{
Store (Arg0, Index (WAKP, One))
}
Return (WAKP)
Return (Package (0x02)
{
Zero,
Zero
})
}

次回に引き続きDSDTの編集を書きます。
前回の1番を実行する為にUbuntuのLiveCDのイメージファイルをダウンロードする。
ダウンロードは以下から。


ダウンロードが完了したらディスクユーティリティー等でイメージからCDを作る。

macia-CDイメージからディスクの作成

夢を見たいパソコンの電源を入れ、UbuntuのCDからブートする。

Main Menuの IDE ConfigurationからSATA Mode selectの部分をAHCIに変更
Onboard IDE ControllerはDisabledに変更
Main MenuのLegacy Diskette A もDisableに。

AdvancedのOnboard Devices ConfigurationのOnboard Devices Configurationより
シリアルポート、パラレルポートを無効(disabled)に変更

PowerのMenuのACPI Version FeaturesをEnabledに変更

Boot Menuより1St Boot DeviceをCDに、2ndをHDDに変更。

ターミナルを開いて /etc/apt/sources.listの"universe"の項目の各URLの前の#部分を消す。

パッケージリストの更新
sudo apt-get update

acpidumpコマンドのインストール
sudo apt-get install acpidump

DSDT.amlファイルの生成
acpidump -b -t DSDT -o DSDT.aml

ホームフォルダにDSDT.amlファイルが生成されるのでUSBのスティック等に保存してUbuntuを終了。

次回に続く。