Comments (7)
非常有意思的方法,利用序列化调用覆盖 Package 里的值。妙哉
不过我有几个问题,恳请大佬解答
-
hotpatch重命名ZUPC为XPUC
这里的
ZUPC
指的是GUPC
?XPUC
指的是XUPC
? -
有考虑过其他操作系统的兼容性吗?比如在
_UPC
通过If (_OSI("Darwin")){}
判断并返回被重命名的XUPC()
-
重写的
GUPC
收了一个参数,调用的时候也给了一个 One,但是我没看出来这个参数的用途,新的函数里也没使用过Arg0
-
然后任一端口的_UPC Method均调用序列化GUPC方法
据我所知,每个接口都有个
_UPC
方法,任意端口放一个等于是只调用了一次?
from oc-little.
- 是的,笔误。应该是hotpatch重命名GUPC为XUPC
2.当然可以,这一点很简单。
3.我只是举了一个调用的例子而已,这个参数是Zero还是One在原始的ssdt调用GUPC方法的时候已经写好,对应着USB端口是否启用。但是我们可以拦截改写。Arg0是可以不用,我只是偷懒,因为我的本机SSDT里关于USB端口是否启用的配置都是正确的,所以用传入的Arg0做判断而已。另外我自己屏蔽了HS04端口。
4.根据我在自己的电脑的测试,确实是这样的。
from oc-little.
@williambj1
考虑操作系统的兼容性的话可以这样处理:
Name (USBP, Zero)
Method (GUPC, 1, Serialized)
{
If (_OSI ("Darwin"))
{
Name (PCKG, Package (0x04)
{
0xFF,
0x03,
Zero,
Zero
})
USBP += One
If (((USBP == 0x04) || (Arg0 == Zero)))
{
PCKG [Zero] = Zero
}
If ((((USBP == 0x04) || (USBP == 0x05)) || (USBP == 0x06)))
{
PCKG [One] = 0xFF
}
Return (PCKG)
}
Else
{
Local0 = XUPC (Arg0)
Return (Local0)
}
}
from oc-little.
能否上传一份啰嗦模式下开机时的日志看一下有没有相关的ACPI报错呢
from oc-little.
@athlonreg 我早已反复确认过了,不存在acpi错误
from oc-little.
已经将本方法具体写为教程了,链接如下
https://blog.gzxiaobai.cn/post/利用GUPC以热补丁定制USB端口
from oc-little.
from oc-little.
Related Issues (20)
- About battery hotpatch guide HOT 1
- IRQ补丁自动重启 HOT 2
- 手贱导致的问题 HOT 2
- 关于02-04仿冒环境光传感器中已存在ALSD环境光传感器情况 HOT 6
- 添加:I2C部件的触摸板热Hotpatch教程 HOT 2
- PTSWAK - DGPU 操作相关疑问 HOT 1
- 使用IRQ补丁,在睡眠之后时间为睡眠前的时间,RTC没有工作 HOT 1
- SSDT-PLUG-_PR.PR00.asl 编译错误 HOT 1
- 使用0D/6D补丁睡眠后关机黑屏无法断电 HOT 1
- 使用Maciasl.app编译报错 HOT 3
- ACPIDebug - maybe something is missing HOT 2
- SSDT-PNLF-ACPI on HP 630 CPU Arrandale HOT 1
- 每隔2小时自动唤醒,该怎么处理呢? HOT 1
- 07-PS2键盘映射及亮度快捷键,执行“ioio -s ApplePS2Keyboard LogScanCodes 1”提示:“No service matching "ApplePS2Keyboard"” HOT 2
- Converted your repo to English
- 亮度调节问题 HOT 4
- 链接失效
- 屏幕亮度无法调节 HOT 2
- 禁止PCI设备会导致进入WIndows出现ACPI BIOS ERROR HOT 1
- 惠普2代笔记本使用HPAE会导致开机后无故重启
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oc-little.