On Sep 6, 2014, at 11:40 AM, stanley.ganyezu <[email protected]> wrote:

> Hi Andrew,
>          Do Neeraj mentioned limitation have any influence on your method?
>  
>  

No the SDM is defining the initial state. It is a form of big real mode. You 
can still put the processor in protected mode (32-bit) and from protected mode 
you can enable PAE (32-bit, uses page tables to access memory > 4GB) or 
transition to Long mode (64-bit).

Thanks,

Andrew Fish

>  
>  
>  
> Best wishes,
> Stanley
>  
> 发件人: Andrew Fish [mailto:[email protected]] 
> 发送时间: 2014年9月7日 1:57
> 收件人: [email protected]
> 主题: Re: [edk2] 答复: run SMM in 64-bit
>  
>  
> On Sep 6, 2014, at 10:50 AM, stanley.ganyezu <[email protected]> 
> wrote:
> 
> 
> Hi Neeraj,
>          Some server have multi PCI segment. These PCI segment are put above 
> 4GB to save more memory space belowme
> 4GB for legacy device(some device only use 32-bit Memory Mapped IO space).My 
> SMI want to access these PCI segment.
> But I can’t find a method to touch it in X64.
>  
>  
>  
> You need to enable PAE or put the processor in Long mode to access memory > 
> 4GB.
>  
> Thanks,
>  
> Andrew Fish
> 
> 
>  
> Best wishes,
> Stanley
>  
> 发件人: Neeraj Ladkani [mailto:[email protected]] 
> 发送时间: 2014年9月7日 0:58
> 收件人: [email protected]
> 主题: Re: [edk2] run SMM in 64-bit
>  
> Hi,
>  
> as par SDM section 34.5.1. not sure if its a hardware limitation. 
> be
>  
> "After saving the current context of the processor, the processor initializes 
> its core registers to the values shown in Table 34-4. Upon entering SMM, the 
> PE and PG flags in control register CR0 are cleared, which places the 
> processor
> in an environment similar to real-address mode. The differences between the 
> SMM execution environment and the
> real-address mode execution environment are as follows:
> • The addressable address space ranges from 0 to FFFFFFFFH (4 GBytes).
> • The normal 64-KByte segment limit for real-address mode is increased to 4 
> GBytes.
> • The default operand and address sizes are set to 16 bits, which restricts 
> the addressable SMRAM address space
> to the 1-MByte real-address mode limit for native real-address-mode code. 
> However, operand-size and
> address-size override prefixes can be used to access the address space beyond 
> the 1-MByte.​
>  
>  
>  I am just curious, what kind of limitations you are facing in 4 GB limit?
>  
> Neeraj
>  
>  
> 
> On Sat, Sep 6, 2014 at 10:08 PM, Andrew Fish <[email protected]> wrote:
>  
> On Sep 6, 2014, at 3:52 AM, stanley.ganyezu <[email protected]> wrote:
> 
> 
> 
> Hi Experts,
>          Currently, X86 cpu run SMM in 32-bit. There are a lot of limitation 
> about 32-bit. I want to run SMM in 64-bit to access whole cpu address 
> space,but I can’t figure it out.
>  
> UEFI/PI systems run SMM in 64-bit mode? See UEFI Platform Initialization 
> Specification Version 1.3. http://www.uefi.org/specifications
> 
> 
> 
> Can you give me some tips? Any suggestion will be appreciated.
>  
>  
>  
> Put the system in Long mode, this requires page tables. The DXE IPL and 
> 64-bit SEC in Ovmf both have code that transitions to 64-bit long mode.
> https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdeModulePkg/Core/DxeIplPeim/
> https://svn.code.sf.net/p/edk2/code/trunk/edk2/OvmfPkg/ResetVector/
>  
> It is really dangerous to modify the SMM code if you do not fully understand 
> it, since SMM runs at a higher privilege than the OS it is an attack point 
> that the OS can not defend against. 
>  
> Thanks,
>  
> Andrew Fish
> 
> 
> 
>  
>  
>  
>  
>  
> Best wishes,
> Stanley
>  
>  
> ------------------------------------------------------------------------------
> Slashdot TV.  
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/_______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>  
> 
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> 
> 
> 
>  
> --
> Thanks 
> Neeraj
>  
> ------------------------------------------------------------------------------
> Slashdot TV.  
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/_______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>  
> ------------------------------------------------------------------------------
> Slashdot TV.  
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/_______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to