Hello

I'm trying to port some code which interacts with memory mapped hardware
registers.
The original code was developed in 2015-18 on edk2, and does not want to
compile anymore.

The way it works is there are three 32 bit registers.
The first is a status/command register which I read to determine if the
hardware is ready.
The next two are used to pass a 64-bit memory address (hi + lo).
Once the param registers are set, I update the command/status register and
the hardware executes the command returning the results at the address
provided by the two param registers.

In the original code, the address of the buffer is used to fill in the two
param registers, and as far as I can tell this worked back then.
When I try to do the same, the address in my pointer is only 32 bits long,
a virtual address, not a physical address.

Is there a way I can convert this 32 bit virtual address to a 64-bit
physical address in a uefi shell app, or would I need a driver to do this?
I did something similar in linux for memory mapped IO, I am guessing I just
haven't found the right function for this yet.

I would greatly appreciate it if someone could point me in the right
direction.

Thank you
xp


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


Reply via email to