如何使用 _OSI 來識別 ACPI 中的 Windows 版本
本主題描述如何使用進階組態和Power Interface (ACPI) Source Language (ASL) 中的 _OSI 方法來識別主機操作系統。 使用此方法時,ASL 寫入器可以建立支持未來操作系統版本的韌體,並讓操作系統根據要求的介面層級變更行為。
此資訊適用於下列作業系統:
Windows 11 版本 22H2
Windows 11
Windows 10 (版本 2004)
Windows 10 (版本 1903)
Windows 10 版本 1809
Windows 10 (版本 1803)
Windows 10 (版本 1709)
Windows 10 (版本 1703)
Windows 10 (版本 1607)
Windows Server Technical Preview
Windows 10
Windows Server 2012 R2
Windows 8.1
Windows Server 2012
Windows 8
Windows Server 2008 R2
Windows 7
Windows Server 2008
Windows Vista
Windows Server 2003
Windows XP
_OSI 方法
所有最新版的 Windows 作業系統都支援進 階設定和 Power Interface (ACPI) 規格的元件。 ACPI 規格會定義解譯的語言 ACPI 來源語言 (ASL) ,讓作業系統能夠執行電源管理和設定的韌體提供控制方法。 為了改善 ASL 寫入器識別主機操作系統版本的能力,ASL 會提供作業系統介面層級 (_OSI) 。
使用 _OSI 方法,ASL 寫入器可以輕鬆地判斷主機操作系統支援的 ACPI 介面版本。 此版本設定方法提供建立韌體的解決方案,可支持未來的操作系統,並讓操作系統根據要求的介面層級變更行為。
已定義_OSI
_OSI 方法有一個自變數和一個傳回值。 自變數是由和 為每個作業系統定義的字串。 如果不支援介面,則傳回值會0x00000000;如果支援介面,則傳回值0xFFFFFFFF。
最新版的 ACPI 規格已擴充主機操作系統版本識別以外的_OSI方法使用案例。
不過,Windows 僅支援_OSI用於識別系統上執行的 Windows 主機版本。
_OSI方法的定義如下:
- _OSI - 作業系統介面
引數
由和定義的字串,用於每個作業系統。 例如:
適用於 Windows 8.1 和 Windows Server 2012 R2 的 “Windows 2013”
“Windows 2012” for Windows 8 and Windows Server 2012
適用於 Windows 7 和 Windows Server 2008 R2 的 “Windows 2009”
Windows XP 的 “Windows 2001”
Windows Server 2003 的 “Windows 2001.1”
傳回值
傳回值如下所示:
如果操作系統不支援 自變數中的版本,0x00000000。
如果操作系統支援 自變數中的版本,0xFFFFFFFF。
Windows _OSI自變數詳細數據
下表列出 ASL 可以使用對應的_OSI字串來識別的 Windows 版本。
如果 _OSI 方法的自變數指定舊版 Windows,Windows 作業系統會傳回0xFFFFFFFF。 例如,Windows 7 會針對 Windows 2009 (Windows 7) 和 “Windows 2006” (Windows Vista) 傳回0xFFFFFFFF。
適用於 Windows 作業系統的_OSI字串
OSI 字串 | 目標 OS |
---|---|
Windows 2000 | Windows 2000 |
Windows 2001 | Windows XP |
Windows 2001 SP1 | Windows XP SP1 |
Windows 2001.1 | Windows Server 2003 |
Windows 2001 SP2 | Windows XP SP2 |
Windows 2001.1 SP1 | Windows Server 2003 SP1 |
Windows 2006 | Windows Vista |
Windows 2006 SP1 | Windows Vista SP1 |
Windows 2006.1 | Windows Server 2008 |
Windows 2009 | Windows 7、Win Server 2008 R2 |
Windows 2012 | Windows 8,Win Server 2012 |
Windows 2013 | Windows 8.1 |
Windows 2015 | Windows 10 |
Windows 2016 | Windows 10 (版本 1607) |
Windows 2017 | Windows 10 (版本 1703) |
Windows 2017.2 | Windows 10 (版本 1709) |
Windows 2018 | Windows 10 (版本 1803) |
Windows 2018.2 | Windows 10 版本 1809 |
Windows 2019 | Windows 10 (版本 1903) |
Windows 2020 | Windows 10 (版本 2004) |
Windows 2021 | Windows 11 |
Windows 2022 | Windows 11 版本 22H2 |
實作注意事項
將識別操作系統的例程放在_SB範圍下_INI方法中,以便儘快執行_OSI。
這個位置很重要,因為操作系統會根據 _OSI 方法的字串自變數提供功能。