小華的部落格: UEFI Shell Utility - pwrtest.efi

搜尋此網誌

網頁

星期一, 2月 05, 2018

UEFI Shell Utility - pwrtest.efi

The pwrtest.efi is an UEFI Shell tool that help developer to confirm RTC wake function from a system(Support on both Intel and AMD platform).

最近在幫忙ODM看一個RTC Wake 問題,所以就順便寫了一個TOOL來驗證一些東西。原本遇到的問題也解決了,所以就順便把這個小TOOL分享一下給有需要的人使用。

Usage:
    pwrtest -s3 -t 10 -w 60  ; 系統會在10 sec delay 後進入S3,然後在60 sec 後喚醒(Wake up) 
    pwrtest [-h|-s3|-s4|-s5|-s|-ss|-sx|-cb|-r]
                  -h help
                  -s3|-s4|-s5        ;選擇系統的Sx State (Intel platform)
                  -cb                   ;做coldboot ,我是透過 gRT->ResetSystem()  方式去做的
                  -ss                   ; 做Shutdown,我是透過 gRT->ResetSystem()  方式去做的
                  -sx value         ; 支援AMD platform去做Sx State,因為填的SLP_TYP值不同.
                                            value = 3/4/5 for AMD platform(S3/S4/S5)
                                            value = 5/6/7 for Intel Platform (S3/S4/S5)
e.g,
    pwrtest -sx 4 -t 5 -w 30 ; For AMD Platform,  Put system to S4 after 5 sec, then wake after 30 sec.
    pwrtest -sx 6 -t 5 -w 30 ; For INTEL Platform,  Put system to S4 after 5 sec, then wake after 30 sec.
    pwrtest -s3 -t 5 -w 30    ; For INTEL Platform,  Put system to S3 after 5 sec, then wake after 30 sec.
    pwrtest -r                       ; Warm boot
    pwrtest -cb                    ; Cold boot

[註]
    - S3 功能只能喚醒系統,喚醒後會當機,因為我沒有支援Reset Vector(Not support)
    - 有些系統S4/S5 並不支援RTC wake up,所以請跟你們的BIOS/EC確認,因為這個工具只是去填RTC Enable bit & RTC Alarm interrupt而已。


Download (Password: harrison):

version 1.1 : pwrtest



10 則留言:

匿名 提到...

大師,有什麼方式可以讀到和修改EC.目前好像只能用RW

Gimmy_Liu 提到...

還是有在動嘛...老骨頭.

小華的部落格 提到...

自己看Issue 啊 XD~

Eddie Chen 提到...

如果是我的話,大概只會填PM register XD

匿名 提到...

沒想到小華還在這個產業
新人時期都看您的blog

Quart 提到...

最近休眠都出現kernal power 41 63爬文都沒找到相關解決方法. 您的pwrtest.efi 能幫助找到問題嗎? CPU是AMD AthlomX4  860k win10 1809.  在請問要如何使用pwrtest.efi?

Star 提到...

thank you

小華的部落格 提到...


AMD 請這樣用:
pwrtest -sx 4 -t 5 -w 30 ; For AMD Platform, Put system to S4 after 5 sec, then wake after 30 sec.

不過這只是個小工具,在UEFI SHELL底下設定相關暫存器達到Wake功能,實際能不能wake還要看系統在Sx時候有沒有留電,有電才能WAKE...

Leo 提到...

請問你是如何抓的 ACPI base address?
我在 Alder Lake 的 PMC 都已經隱藏掉了
為什麼你在 Shell 環境還能抓到 ACPI base address?

艾斯羅 提到...

請問可以再分享一次連結嗎? 那個onedrive的連結好像掛了。感謝哩