wok diff virtualbox-ose/stuff/vbox-cpuhotplug.dsl @ rev 25438
Update some web_site
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Sep 01 11:12:31 2022 +0000 (2022-09-01) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/virtualbox-ose/stuff/vbox-cpuhotplug.dsl Thu Sep 01 11:12:31 2022 +0000 1.3 @@ -0,0 +1,190 @@ 1.4 +// $Id: vbox-cpuhotplug.dsl $ 1.5 +/// @file 1.6 +// 1.7 +// VirtualBox ACPI 1.8 +// 1.9 +// Copyright (C) 2006-2007 Oracle Corporation 1.10 +// 1.11 +// This file is part of VirtualBox Open Source Edition (OSE), as 1.12 +// available from http://www.virtualbox.org. This file is free software; 1.13 +// you can redistribute it and/or modify it under the terms of the GNU 1.14 +// General Public License (GPL) as published by the Free Software 1.15 +// Foundation, in version 2 as it comes in the "COPYING" file of the 1.16 +// VirtualBox OSE distribution. VirtualBox OSE is distributed in the 1.17 +// hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 1.18 + 1.19 +DefinitionBlock ("SSDT-cpuhotplug.aml", "SSDT", 1, "VBOX ", "VBOXCPUT", 2) 1.20 +{ 1.21 + External(CPUC) 1.22 + External(CPUL) 1.23 + External(CPEV) 1.24 + External(CPET) 1.25 + 1.26 + // Method to check for the CPU status 1.27 + Method(CPCK, 1) 1.28 + { 1.29 + Store (Arg0, CPUC) 1.30 + Return(LEqual(CPUL, 0x01)) 1.31 + } 1.32 + 1.33 + // Method to notify the VMM that a CPU is not 1.34 + // in use anymore and can be safely removed. 1.35 + // Using the extra method here because the CPUL 1.36 + // register identifer clashes with the CPUL object defined 1.37 + // below making iasl starting with version 20150930 fail. 1.38 + // 1.39 + // Think of CPLO as "CPU Lock Open" 1.40 + Method(CPLO, 1) 1.41 + { 1.42 + Store(Arg0, CPUL) 1.43 + } 1.44 + 1.45 + Scope (\_SB) 1.46 + { 1.47 + 1.48 +#define GENERATE_CPU_OBJECT(id, sck, sckuid, cpu, cpuuid) \ 1.49 + Device (sck) \ 1.50 + { \ 1.51 + Name (_HID, "ACPI0004") \ 1.52 + Name (_UID, sckuid) \ 1.53 + \ 1.54 + \ 1.55 + Processor (cpu, /* Name */ \ 1.56 + id, /* Id */ \ 1.57 + 0x0, /* Processor IO ports range start */ \ 1.58 + 0x0 /* Processor IO ports range length */ \ 1.59 + ) \ 1.60 + { \ 1.61 + Name (_HID, "ACPI0007") \ 1.62 + Name (_UID, cpuuid) \ 1.63 + Name (_PXM, 0x00) \ 1.64 + \ 1.65 + Method(_MAT, 0, Serialized) \ 1.66 + { \ 1.67 + Name (APIC, Buffer (8) {0x00, 0x08, id, id}) \ 1.68 + IF (CPCK(id)) \ 1.69 + { \ 1.70 + Store (One, Index (APIC, 4)) \ 1.71 + } \ 1.72 + Else \ 1.73 + { \ 1.74 + Store (Zero, Index (APIC, 4)) \ 1.75 + } \ 1.76 + Return (APIC) \ 1.77 + } \ 1.78 + Method(_STA) /* Used for device presence detection */ \ 1.79 + { \ 1.80 + IF (CPCK(id)) \ 1.81 + { \ 1.82 + Return (0xF) \ 1.83 + } \ 1.84 + Else \ 1.85 + { \ 1.86 + Return (0x0) \ 1.87 + } \ 1.88 + } \ 1.89 + Method(_EJ0, 1) \ 1.90 + { \ 1.91 + CPLO(id) /* Unlock the CPU */ \ 1.92 + Return \ 1.93 + } \ 1.94 + } \ 1.95 + } \ 1.96 + 1.97 + GENERATE_CPU_OBJECT(0x00, SCK0, "SCKCPU0", CPU0, "SCK0-CPU0") 1.98 + GENERATE_CPU_OBJECT(0x01, SCK1, "SCKCPU1", CPU1, "SCK1-CPU0") 1.99 + GENERATE_CPU_OBJECT(0x02, SCK2, "SCKCPU2", CPU2, "SCK2-CPU0") 1.100 + GENERATE_CPU_OBJECT(0x03, SCK3, "SCKCPU3", CPU3, "SCK3-CPU0") 1.101 + GENERATE_CPU_OBJECT(0x04, SCK4, "SCKCPU4", CPU4, "SCK4-CPU0") 1.102 + GENERATE_CPU_OBJECT(0x05, SCK5, "SCKCPU5", CPU5, "SCK5-CPU0") 1.103 + GENERATE_CPU_OBJECT(0x06, SCK6, "SCKCPU6", CPU6, "SCK6-CPU0") 1.104 + GENERATE_CPU_OBJECT(0x07, SCK7, "SCKCPU7", CPU7, "SCK7-CPU0") 1.105 + GENERATE_CPU_OBJECT(0x08, SCK8, "SCKCPU8", CPU8, "SCK8-CPU0") 1.106 + GENERATE_CPU_OBJECT(0x09, SCK9, "SCKCPU9", CPU9, "SCK9-CPU0") 1.107 + GENERATE_CPU_OBJECT(0x0a, SCKA, "SCKCPUA", CPUA, "SCKA-CPU0") 1.108 + GENERATE_CPU_OBJECT(0x0b, SCKB, "SCKCPUB", CPUB, "SCKB-CPU0") 1.109 + GENERATE_CPU_OBJECT(0x0c, SCKC, "SCKCPUC", CPUC, "SCKC-CPU0") 1.110 + GENERATE_CPU_OBJECT(0x0d, SCKD, "SCKCPUD", CPUD, "SCKD-CPU0") 1.111 + GENERATE_CPU_OBJECT(0x0e, SCKE, "SCKCPUE", CPUE, "SCKE-CPU0") 1.112 + GENERATE_CPU_OBJECT(0x0f, SCKF, "SCKCPUF", CPUF, "SCKF-CPU0") 1.113 + GENERATE_CPU_OBJECT(0x10, SCKG, "SCKCPUG", CPUG, "SCKG-CPU0") 1.114 + GENERATE_CPU_OBJECT(0x11, SCKH, "SCKCPUH", CPUH, "SCKH-CPU0") 1.115 + GENERATE_CPU_OBJECT(0x12, SCKI, "SCKCPUI", CPUI, "SCKI-CPU0") 1.116 + GENERATE_CPU_OBJECT(0x13, SCKJ, "SCKCPUJ", CPUJ, "SCKJ-CPU0") 1.117 + GENERATE_CPU_OBJECT(0x14, SCKK, "SCKCPUK", CPUK, "SCKK-CPU0") 1.118 + GENERATE_CPU_OBJECT(0x15, SCKL, "SCKCPUL", CPUL, "SCKL-CPU0") 1.119 + GENERATE_CPU_OBJECT(0x16, SCKM, "SCKCPUM", CPUM, "SCKM-CPU0") 1.120 + GENERATE_CPU_OBJECT(0x17, SCKN, "SCKCPUN", CPUN, "SCKN-CPU0") 1.121 + GENERATE_CPU_OBJECT(0x18, SCKO, "SCKCPUO", CPUO, "SCKO-CPU0") 1.122 + GENERATE_CPU_OBJECT(0x19, SCKP, "SCKCPUP", CPUP, "SCKP-CPU0") 1.123 + GENERATE_CPU_OBJECT(0x1a, SCKQ, "SCKCPUQ", CPUQ, "SCKQ-CPU0") 1.124 + GENERATE_CPU_OBJECT(0x1b, SCKR, "SCKCPUR", CPUR, "SCKR-CPU0") 1.125 + GENERATE_CPU_OBJECT(0x1c, SCKS, "SCKCPUS", CPUS, "SCKS-CPU0") 1.126 + GENERATE_CPU_OBJECT(0x1d, SCKT, "SCKCPUT", CPUT, "SCKT-CPU0") 1.127 + GENERATE_CPU_OBJECT(0x1e, SCKU, "SCKCPUU", CPUU, "SCKU-CPU0") 1.128 + GENERATE_CPU_OBJECT(0x1f, SCKV, "SCKCPUV", CPUV, "SCKV-CPU0") 1.129 + 1.130 +#undef GENERATE_CPU_OBJECT 1.131 + } 1.132 + 1.133 + Scope (\_GPE) 1.134 + { 1.135 + 1.136 +#define CHECK_CPU(cpu, sck, cpuname) \ 1.137 + IF (LEqual(Local0, cpu)) \ 1.138 + { \ 1.139 + Notify (\_SB.sck.cpuname, Local1) \ 1.140 + } \ 1.141 + 1.142 + // GPE bit 1 handler 1.143 + // GPE.1 must be set and SCI raised when 1.144 + // processor info changed and CPU must be 1.145 + // re-evaluated 1.146 + Method (_L01, 0, NotSerialized) 1.147 + { 1.148 + Store(CPEV, Local0) 1.149 + Store(CPET, Local1) 1.150 + 1.151 + CHECK_CPU(0x01, SCK1, CPU1) 1.152 + CHECK_CPU(0x02, SCK2, CPU2) 1.153 + CHECK_CPU(0x03, SCK3, CPU3) 1.154 + CHECK_CPU(0x04, SCK4, CPU4) 1.155 + CHECK_CPU(0x05, SCK5, CPU5) 1.156 + CHECK_CPU(0x06, SCK6, CPU6) 1.157 + CHECK_CPU(0x07, SCK7, CPU7) 1.158 + CHECK_CPU(0x08, SCK8, CPU8) 1.159 + CHECK_CPU(0x09, SCK9, CPU9) 1.160 + CHECK_CPU(0x0a, SCKA, CPUA) 1.161 + CHECK_CPU(0x0b, SCKB, CPUB) 1.162 + CHECK_CPU(0x0c, SCKC, CPUC) 1.163 + CHECK_CPU(0x0d, SCKD, CPUD) 1.164 + CHECK_CPU(0x0e, SCKE, CPUE) 1.165 + CHECK_CPU(0x0f, SCKF, CPUF) 1.166 + CHECK_CPU(0x10, SCKG, CPUG) 1.167 + CHECK_CPU(0x11, SCKH, CPUH) 1.168 + CHECK_CPU(0x12, SCKI, CPUI) 1.169 + CHECK_CPU(0x13, SCKJ, CPUJ) 1.170 + CHECK_CPU(0x14, SCKK, CPUK) 1.171 + CHECK_CPU(0x15, SCKL, CPUL) 1.172 + CHECK_CPU(0x16, SCKM, CPUM) 1.173 + CHECK_CPU(0x17, SCKN, CPUN) 1.174 + CHECK_CPU(0x18, SCKO, CPUO) 1.175 + CHECK_CPU(0x19, SCKP, CPUP) 1.176 + CHECK_CPU(0x1a, SCKQ, CPUQ) 1.177 + CHECK_CPU(0x1b, SCKR, CPUR) 1.178 + CHECK_CPU(0x1c, SCKS, CPUS) 1.179 + CHECK_CPU(0x1d, SCKT, CPUT) 1.180 + CHECK_CPU(0x1e, SCKU, CPUU) 1.181 + CHECK_CPU(0x1f, SCKV, CPUV) 1.182 + } 1.183 + 1.184 +#undef CHECK_CPU 1.185 + } 1.186 + 1.187 +} 1.188 + 1.189 +/* 1.190 + * Local Variables: 1.191 + * comment-start: "//" 1.192 + * End: 1.193 + */