␉␉// Pike R. Alpha - 12 October 2014␊ |
␉␉//␊ |
␉␉UInt8 index = 0;␊ |
␉␉EFI_UINT16 PMTimerValue = 0;␊ |
␉␉EFI_UINT16 PMTimerValue = 0, PMRepeatCount = 0xffff;␊ |
␊ |
#if RANDOMSEED␊ |
␉␉EFI_UINT32 randomValue = 0, cpuTick = 0;␊ |
|
␊ |
␉␉␉␉if (esi < ecx)␉␉␉␉␉␉␉// cmp␉␉%ecx,␉%esi␊ |
␉␉␉␉{␊ |
␉␉␉␉␉/*␊ |
␉␉␉␉␉ * This is a workaround to prevent an infinite loop␊ |
␉␉␉␉␉ * if PMTimer is not at port 0x408 - zenith432␊ |
␉␉␉␉␉ */␊ |
␉␉␉␉␉if (PMRepeatCount)␊ |
␉␉␉␉␉{␊ |
␉␉␉␉␉--PMRepeatCount;␊ |
␉␉␉␉␉continue;␉␉␉␉␉␉// jb␉␉0x17e55␉␉(retry)␊ |
␉␉␉␉␉}␊ |
␉␉␉␉}␊ |
␉␉␉␉else␊ |
␉␉␉␉␉PMRepeatCount = 0xffff;␊ |
␊ |
␉␉␉␉cpuTick = (EFI_UINT32) getCPUTick();␉␉␉␉// callq␉0x121a7␊ |
//␉␉␉␉printf("value: 0x%x\n", getCPUTick());␊ |