I've been doing some work on USB and ended up realizing that gBS->Stall(1) is taking much longer than it should: on my Juno R2 it's stalling for 100 us, while on my Raspberry Pi 4 it's 10 us.

This appears to be causing a USB bulk transfer request that asks for a 1ms timeout taking 100ms on the Juno.

I'm measuring the delay with the following code:


UINT64 First = GetPerformanceCounter ();

gBS->Stall (XHC_1_MICROSECOND);

UINT64 Second = GetPerformanceCounter ();

UINT64 FirstNs = GetTimeInNanoSecond (First);
UINT64 SecondNs = GetTimeInNanoSecond (Second);

DEBUG ((DEBUG_INFO, "Stalled for %llu ns (%llu ms)\n", (SecondNs - FirstNs), (SecondNs - FirstNs) / 1024 / 1024));



I see output such as:

Stalled for 10500 ns (0 ms)


--
Rebecca Cran


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96656): https://edk2.groups.io/g/devel/message/96656
Mute This Topic: https://groups.io/mt/95317735/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to