microfind is somewhat less than ideal
The kernel has a function,
tenmicrosec(), for generating a delay of around 10 microseconds using a spin loop. When this function is used early in boot, prior to the configuration of more modern timing services, this function uses a loop count (
microdata) calibrated to take about 10 microseconds to complete.
The function that calibrates
microdata for the machine's CPU,
microfind(), is a bit rubbish. The function is quite rough around the edges, both in code and comments, and worst of all: it does not seem to work properly.
The failure becomes particularly pronounced when the OS is booted via iPXE in a VMware guest, when the OS panics most (but not all!) times this particular method of booting is attempted. Upon inspection, it seems that our use of the i8254 Programmable Interval Timer is itself not incorrect; nor is the emulated PIT malfunctioning in any detectable way.
In order to fix the problem a simpler, better documented replacement will be substituted for the existing
microfind() implementation. The replacement function will make repeated trials of delay measurement in order to smooth out jitter in the scheduling of virtual machine guests.