搜尋此網誌

2014年12月21日 星期日

CHECK POWER MODE - E5h, Non-Data

CHECK POWER MODE (E5h)
Inputs:
Register
7
6
5
4
3
2
1
0
Features
Current
N/A
Previous
N/A
Sector Count
Current
N/A
Previous
N/A
LBA Low
Current
N/A
Previous
N/A
LBA Mid
Current
N/A
Previous
N/A
LBA High
Current
N/A
Previous
N/A
Device
obs
N/A
obs
TD
Reserved
Command
E5h
Transport Dependent (TD): All bits and fields that are labeled transport dependent are defined in the transport standards.

Normal Outputs:
Register
7
6
5
4
3
2
1
0
Error
N/A
Sector Count
HOB
Value  Description
00h  Device is in the:
a)      PM2:Standby state and Extended Power Conditions feature set is not supported; or
b)      PM2:Standby state, the Extended Power Conditions feature set is supported, and the device is in the Standby_z power condition.
01h  Device is in the PM2:Standby state, the Extended Power Conditions feature set is supported, and the device is in the Standby_y power condition.
02h..3Fh  Reserved
40h  Device is:
a) in the PM0:Active state;
b) the NV Cache power mode is enabled; and
c) the spindle is spun down or spinning down.
41h  Device is:
a) in the PM0:Active state;
b) the NV Cache power mode is enabled; and
c) the spindle is spun up or spinning up.
42h..7Fh  Reserved
80h   Device is in the
a)      PM1:Idle state and Extended Power Conditions feature set is not supported; or
b)      PM1:Idle state, Extended Power Conditions feature set is supported, and APM is enabled.
81h  Device is in the PM1:Idle State, Extended Power Conditions feature set is supported, and the device is in the Idle_a power condition.
82h  Device is in the PM1:Idle State, Extended Power Conditions feature set is supported, and the device is in the Idle_b power condition.
83h  Device is in the PM1:Idle State, Extended Power Conditions feature set is supported, and the device is in the Idle_c power condition.
84h..FEh  Reserved
FFh  Device is in the PM0:Active state or PM1:Idle State.
LBA Low
HOB = 0
N/A
HOB = 1
N/A
LBA Mid
HOB = 0
N/A
HOB = 1
N/A
LBA High
HOB = 0
N/A
HOB = 1
N/A
Device
obs
na
obs
TD
Reserved
Status
TD
DF
na
TD
na
na
ERR


IDEL IMMEDIATE - E1h, Non-Data

IDEL IMMEDIATE (E1h)
Inputs:
Register
7
6
5
4
3
2
1
0
Features
Current
N/A
Previous
N/A
Sector Count
Current
N/A
Previous
N/A
LBA Low
Current
N/A
Previous
N/A
LBA Mid
Current
N/A
Previous
N/A
LBA High
Current
N/A
Previous
N/A
Device
obs
N/A
obs
TD
Reserved
Command
E1h
Transport Dependent (TD): All bits and fields that are labeled transport dependent are defined in the transport standards.

Normal Outputs:
Register
7
6
5
4
3
2
1
0
Error
N/A
Sector Count
HOB = 0
N/A
HOB = 1
N/A
LBA Low
HOB = 0
N/A
HOB = 1
N/A
LBA Mid
HOB = 0
N/A
HOB = 1
N/A
LBA High
HOB = 0
N/A
HOB = 1
N/A
Device
obs
na
obs
TD
Reserved
Status
TD
DF
na
TD
na
na
ERR


2014年12月15日 星期一

Setup aarch64 cross compiler on Ubuntu

1. Download aarch64 compiler from: http://releases.linaro.org/14.04/components/toolchain/binaries
2. Choose gcc-linaro-aarch64-linux-gnu-4.8-2014.04_linux.tar.bz2
3. This compiler is for ARM, AMCC 64CPU platform , not x86 platform.
4. $tar xvf gcc-linaro-aarch64-linux-gnu-4.8-2014.04_linux.tar.bz2
5. $cp -avr ~/Desktop/gcc-linaro-aarch64-linux-gnu-4.8-2014.04_linux /opt
6. $vi .bashrc  → go to last line→  add →
export PATH=$PATH:/opt/gcc-linaro-aarch64-linux-gnu-4.8-2014.04_linux/bin
7. go to your test program ~/Desktop/test/$ export CROSS=aarch64-linux-gnu    as /opt/gcc-linaro-aarch64-linux-gnu-4.8-2014.04_linux/bin file name
8.  ~/Desktop/test/$make clean
9.  ~/Desktop/test/$make all


2014年12月7日 星期日

Using EDK II with Native GCC in Ubuntu 13.04



  • The Ubuntu platform is not officially supported or tested by the edk2 project at this time.
  • Both the x86 (32-bit) and x86-64 (64-bit) Ubuntu versions will install GCC 4.8 which is capable of building UEFI for both the IA32 and X64 architectures.
  • These instructions should work for Ubuntu 10.10 as well

Open the GNOME Terminal program
These instructions will utilize Ubuntu's built in command shell (bash) via the GNOME Terminal application. To open the Terminal application, locate it under the Applications menu and the Accessories sub-menu.

Install required software from apt
Several ubuntu packages will be needed to fully set up an edk2 build environment. In order to easily install all the requirements, you need to run this command.

bash$ sudo apt-get install build-essential subversion uuid-dev iasl
bash$ sudo apt-get install nasm
Continue with common instructions

The remaining instructions are common for most UNIX-like systems.

Common instructions
A significant portion of the steps are common on the various UNIX-like platforms. You should start with the instructions for the operating system that most closely matches your platform, and it will direct you here at the appropriate time.

Get the edk2 source tree
bash$ mkdir ~/src
bash$ cd ~/src
bash$ git clone https://github.com/tianocore/edk2
======================================================
Or, download source using subversion:
If you are behind a web proxy, then you may need to configure your proxy in the ~/.subversion/servers file.
bash$ mkdir ~/src
bash$ cd ~/src
bash$ svn co https://svn.code.sf.net/p/edk2/code/trunk/edk2
======================================================
Build the EDK II BaseTools
bash$ make -C edk2/BaseTools

Setup build shell environment
bash$ cd ~/src/edk2
bash$ export EDK_TOOLS_PATH=$HOME/src/edk2/BaseTools
bash$ . edksetup.sh BaseTools

Modify Conf Files
You will need to edit the Conf/tools_def.txt and Conf/target.txt files. These changes will enable the MdeModulePkg to be built using the GCC 4.4 compiler.

Set Build Target Information
For the Conf/target.txt file, find the following lines:

ACTIVE_PLATFORM       = Nt32Pkg/Nt32Pkg.dsc
TOOL_CHAIN_TAG        = MYTOOLS
And change the corresponding lines to match these:

ACTIVE_PLATFORM       = MdeModulePkg/MdeModulePkg.dsc
TOOL_CHAIN_TAG        = GCC48
Note: The 'gcc --version' command can be used to find out your GCC version. Use the GCC45 toolchain for gcc 4.5.* and the GCC46 toolchain for gcc 4.6.*.

Optionally, you may consider finding:

TARGET_ARCH           = IA32
...and changing it if your GCC 4.4 installation supports 64-bit builds. You can change it to either 'X64', or even 'IA32 X64' which will build both architectures.

Build Hello World! (and the rest of MdeModulePkg)
Now you should be able to simply run the build command to compile the MdeModulePkg.

bash$ build
One result of the build is that you should have the HelloWorld UEFI application:

bash$ ls Build/MdeModule/DEBUG_*/*/HelloWorld.efi
*: IA32 or X64


[Build OVMF]
Once your build environment is set up you might be interested in building the OVMF platform which is included in the main edk2 source tree. Since OVMF builds a full system firmware image this may be of interest to UEFI system firmware developers.

OVMF is an EDK II based project to enable UEFI support for Virtual Machines.