[BRLTTY] BRLTTY in GRUB2

Vladimir 'φ-coder/phcoder' Serbinenko phcoder at gmail.com
Wed Apr 4 18:59:12 EDT 2012


On 05.04.2012 00:30, Dave Mielke wrote:
> There's one place in the code which does an 80 microsecond pause, which, of 
> course, is less than a millisecond. Even though there's no particular need to 
> include this part in the grub build, it'd still be kind of nice to address it. 
> Does grub offer any way to sleep for less than a millisecond?
>
> What's the difference between grub_get_time_ms() and grub_get_rtc()?
grub_get_rtc is platform-specific with platform-specific behaviour. In
case of i386 it always uses PIT with its 55ms resolution.
grub_get_tsc goes at TSC frequency (tsc_ticks_per_ms kHz)
Neither of 2 functions is available outside kernel ("private").
As GRUB didn't need any shorter sleep we never bothered. It's possible
to change overall code to normalise to microseconds though if it's
necessary but without giving any guaranty. Currently available resolution:
emu: whatever OS has, so often microseconds.
i386-* and x86_64-*: TSC frequency, usually some multiple of FSB, 55 ms
resolution if CPU is old.
mips_loongson: 2.5ns/400 MHz resolution.
sparc64_ieee1275, powerpc_ieee1275: 1ms/1kHz resolution.
mips_arc: 64 MHz
ia64_efi: ns but without guarantee
mips_qemu_mips: 64 MHz


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 294 bytes
Desc: OpenPGP digital signature
URL: <http://mielke.cc/pipermail/brltty/attachments/20120405/c0145104/attachment.sig>


More information about the BRLTTY mailing list