Hi,

Does this work for you?
https://edk2-docs.gitbook.io/edk-ii-uefi-driver-writer-s-guide/18_pci_driver_design_guidelines/readme.5

On Mon, Jun 13, 2022 at 8:39 PM M.T. <xzavierpo...@gmail.com> wrote:

> 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
>
>
>
> 
>
>

-- 
Pedro Falcato


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#90504): https://edk2.groups.io/g/devel/message/90504
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