ShellPkg: update ping to use timer service instead of timer arch protocol .

The ping command uses PI CPU arch protocol to calculate the RTT time, which is
not allowed to use in UEFI shell. This patch updates it to use the UEFI timer
event and Stall service to estimate the system timer period.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Hegde, Nagaraj P <nagaraj-p.hegde@hpe.com>
This commit is contained in:
Fu Siyuan
2016-09-08 11:27:12 +08:00
parent 8e947c07b6
commit 2a3263303b
3 changed files with 171 additions and 70 deletions

View File

@ -56,9 +56,9 @@
#string STR_PING_NOROUTE_FOUND #language en-US "There is no route to the destination '%B%s%N' from the source '%B%s%N' was found.\r\n"
#string STR_PING_START #language en-US "Ping %s %d data bytes.\r\n"
#string STR_PING_TIMEOUT #language en-US "Echo request sequence %d timeout.\r\n"
#string STR_PING_REPLY_INFO #language en-US "%d bytes from %s : icmp_seq=%d ttl=%d time%c%dms\r\n"
#string STR_PING_REPLY_INFO #language en-US "%d bytes from %s : icmp_seq=%d ttl=%d time%d~%dms\r\n"
#string STR_PING_STAT #language en-US "\n%d packets transmitted, %d received, %d%% packet loss, time %dms\r\n"
#string STR_PING_RTT #language en-US "\nRtt(round trip time) min=%dms max=%dms avg=%dms\r\n"
#string STR_PING_RTT #language en-US "\nRtt(round trip time) min=%d~%dms max=%d~%dms avg=%d~%dms\r\n"
#string STR_IFCONFIG_UNSUPPORTED_OPTION #language en-US "The option '%H%s%N' is unsupported now.\n"
#string STR_IFCONFIG_LACK_OPTION #language en-US "Flags lack.\n"