[if gte mso 9]>

[edk2]答复: 答复: run SMM in 64-bit

Subject: [edk2]答复: 答复: run SMM in 64-bit

From: "stanley.ganyezu" <stanley.ganyezu@gmail.com>

To: <edk2-devel@lists.sourceforge.net>

Date: 2014-09-07 10:40:34

Hi Andrew,

Do Neeraj mentioned limitation have any influence on your method?

 

 

 

 

 

Best wishes,

Stanley

 

: Andrew Fish [mailto:afish@apple.com]
: 201497 1:57
: edk2-devel@lists.sourceforge.net
: Re: [edk2] : run SMM in 64-bit

 

 

On Sep 6, 2014, at 10:50 AM, stanley.ganyezu <stanley.ganyezu@gmail.com> 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 cant 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:neeraj.ladkani@gmail.com] 
: 201497 0:58
: edk2-devel@lists.sourceforge.net
: 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 <afish@apple.com> wrote:

 

On Sep 6, 2014, at 3:52 AM, stanley.ganyezu <stanley.ganyezu@gmail.com> 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 spacebut I cant 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.

 

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
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

 


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
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
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel