public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* question about uefi calling convention
@ 2018-08-14  9:09 krishnaLee
  2018-08-14 13:54 ` Laszlo Ersek
  0 siblings, 1 reply; 3+ messages in thread
From: krishnaLee @ 2018-08-14  9:09 UTC (permalink / raw)
  To: edk2-devel

Hi,
In uefi 2.6 specification -> 2.3.4 x64 Platforms,
"Paging mode is enabled and any memory space defined by the UEFI memory map is identity mapped (virtual address equals physical address)" ...
is that mean if I write C code like " void *pointer=0xabcd",the pointer is virtual address ,is equal to the physical address, and they are the same?
How the virtual address translate from "CR3->Page Base address,Page directory,page table ..." to physical address in "x64 Long mode,64-bit mode"? is there any sample not theory?






thank you,
krishna.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: question about uefi calling convention
  2018-08-14  9:09 question about uefi calling convention krishnaLee
@ 2018-08-14 13:54 ` Laszlo Ersek
  2018-08-15  0:14   ` krishnaLee
  0 siblings, 1 reply; 3+ messages in thread
From: Laszlo Ersek @ 2018-08-14 13:54 UTC (permalink / raw)
  To: krishnaLee, edk2-devel

On 08/14/18 11:09, krishnaLee wrote:
> Hi,
> In uefi 2.6 specification -> 2.3.4 x64 Platforms,
> "Paging mode is enabled and any memory space defined by the UEFI memory map is identity mapped (virtual address equals physical address)" ...
> is that mean if I write C code like " void *pointer=0xabcd",the pointer is virtual address ,is equal to the physical address, and they are the same?

Yes.

> How the virtual address translate from "CR3->Page Base address,Page directory,page table ..." to physical address in "x64 Long mode,64-bit mode"? is there any sample not theory?

The page tables are built in the DXE IPL PEIM, function
CreateIdentityMappingPageTables().

Laszlo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: question about uefi calling convention
  2018-08-14 13:54 ` Laszlo Ersek
@ 2018-08-15  0:14   ` krishnaLee
  0 siblings, 0 replies; 3+ messages in thread
From: krishnaLee @ 2018-08-15  0:14 UTC (permalink / raw)
  To: Laszlo Ersek; +Cc: edk2-devel

thank you,Laszlo.


krishna.








At 2018-08-14 21:54:03, "Laszlo Ersek" <lersek@redhat.com> wrote:
>On 08/14/18 11:09, krishnaLee wrote:
>> Hi,
>> In uefi 2.6 specification -> 2.3.4 x64 Platforms,
>> "Paging mode is enabled and any memory space defined by the UEFI memory map is identity mapped (virtual address equals physical address)" ...
>> is that mean if I write C code like " void *pointer=0xabcd",the pointer is virtual address ,is equal to the physical address, and they are the same?
>
>Yes.
>
>> How the virtual address translate from "CR3->Page Base address,Page directory,page table ..." to physical address in "x64 Long mode,64-bit mode"? is there any sample not theory?
>
>The page tables are built in the DXE IPL PEIM, function
>CreateIdentityMappingPageTables().
>
>Laszlo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-15  0:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-14  9:09 question about uefi calling convention krishnaLee
2018-08-14 13:54 ` Laszlo Ersek
2018-08-15  0:14   ` krishnaLee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox