• R/O
  • SSH

tinyvisor-uefi: Commit

TinyVisor用ゲストUEFI-BIOSのソースツリーです。

EDK2のソースツリーの一部をexportして作成しました。
https://svn.code.sf.net/p/edk2/code/trunk/edk2


Commit MetaInfo

Revisione92a03fa7fd95c940f93e0ec0388888db90b3560 (tree)
Time2016-01-01 16:49:43
AuthorYuichi Watanabe <yuichi_ <xy@ybb....>
CommiterYuichi Watanabe <yuichi_

Log Message

[patch 5/5] APIC timer の init count が 0 の場合は ffffffff に設定する。

Change Summary

Incremental Difference

diff -r 1515d7cdf545 -r e92a03fa7fd9 UefiCpuPkg/Include/Library/LocalApicLib.h
--- a/UefiCpuPkg/Include/Library/LocalApicLib.h Fri Jan 01 16:49:43 2016 +0900
+++ b/UefiCpuPkg/Include/Library/LocalApicLib.h Fri Jan 01 16:49:43 2016 +0900
@@ -263,6 +263,12 @@
263263 VOID
264264 );
265265
266+VOID
267+EFIAPI
268+SetApicTimerInitCount (
269+ IN UINT32 InitCount
270+ );
271+
266272 /**
267273 Read the current count value from the current-count register.
268274
diff -r 1515d7cdf545 -r e92a03fa7fd9 UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
--- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c Fri Jan 01 16:49:43 2016 +0900
+++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c Fri Jan 01 16:49:43 2016 +0900
@@ -645,6 +645,20 @@
645645 }
646646
647647 /**
648+ Write a initial count value to the init-count register.
649+
650+ @param InitCount a initial count Value to be written.
651+**/
652+VOID
653+EFIAPI
654+SetApicTimerInitCount (
655+ IN UINT32 InitCount
656+ )
657+{
658+ WriteLocalApicReg (XAPIC_TIMER_INIT_COUNT_OFFSET, InitCount);
659+}
660+
661+/**
648662 Read the current count value from the current-count register.
649663
650664 @return The current count value read from the current-count register.
diff -r 1515d7cdf545 -r e92a03fa7fd9 UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/X86TimerLib.c
--- a/UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/X86TimerLib.c Fri Jan 01 16:49:43 2016 +0900
+++ b/UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/X86TimerLib.c Fri Jan 01 16:49:43 2016 +0900
@@ -67,6 +67,10 @@
6767 // Delay and the Init Count.
6868 //
6969 InitCount = GetApicTimerInitCount ();
70+ if (InitCount == 0) {
71+ SetApicTimerInitCount(0xffffffff);
72+ InitCount = 0xffffffff;
73+ }
7074 Times = Delay / (InitCount / 2);
7175 Delay = Delay % (InitCount / 2);
7276
Show on old repository browser