On 10/03/19 10:04, Wu, Hao A wrote: > Before any comment on the patch, since I am not experienced in the Variable > driver, I would like to ask for help from other reviewers to look into this > patch and provide feedbacks as well. Thanks in advance. > > With the above fact, some comments provided below maybe wrong. So please help > to kindly correct me. > > > Some general comments: > 1. I am not sure if bringing the TimerLib dependency (delay in acquiring the > runtime cache read lock) to variable driver (a software driver for the most > part) is a good idea.
I agree. Most TimerLib instances do not expect sharing the hardware with the OS. Another complication is if the hardware is accessed via MMIO (that is, not IO ports). MMIO accesses are subject to page tables. Assuming that MicroSecondDelay() is invoked from the runtime DXE driver at OS runtime, a platform would have to expose the MMIO area of the timer hardware in the UEFI memory map as "runtime MMIO". (Via GCD memory space operations in a platform driver or in the TimerLib constructor.) Furthermore, the constructor function of the TimerLib instance would have to register a VirtualAddressChange event handler, and convert the MMIO address. Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#48429): https://edk2.groups.io/g/devel/message/48429 Mute This Topic: https://groups.io/mt/34318592/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-