[PATCH] Make pmtimer tsc calibration not take 51 seconds to fail.

2018-02-19 Thread Peter Jones
On my laptop running at 2.4GHz, if I run a VM where tsc calibration using pmtimer will fail presuming a broken pmtimer, it takes ~51 seconds to do so (as measured with the stopwatch on my phone), with a tsc delta of 0x1cd1c85300, or around 125 billion cycles. If instead of trying to wait for 5-200

[PATCH v2] chainloader: Fix wrong break condition (must be AND not, OR)

2018-02-19 Thread C. Masloch
The definition of bpb's num_total_sectors_16 and num_total_sectors_32 is that either the 16-bit field is non-zero and is used (in which case eg mkfs.fat sets the 32-bit field to zero), or it is zero and the 32-bit field is used. Therefore, a BPB is invalid only if *both* fields are zero; having one

Re: [PATCH] chainloader: Fix wrong break condition (must be AND not OR)

2018-02-19 Thread C. Masloch
On at 2018-02-06 16:41 +01:00, Daniel Kiper wrote: >>> I am happy that you fix that issue but >>> https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system#BPB331_OFS_15h >>> shows that life is more complicated. >>> >>> Could you take that into account? >> >> MS-DOS 3.20 and 3.30 BPBs aren't su