1) Change the alignment from 1 to 2 for IA32 and X64 arch.

2) Move ALIGNMENT macro to common variable.h file.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2538 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2007-04-05 08:12:30 +00:00
parent 95122138b0
commit 20798fc576
6 changed files with 34 additions and 70 deletions

View File

@ -1,6 +1,7 @@
/*++ /**@file
Header file for EFI Variable Services.
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -9,15 +10,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: **/
EfiVariable.h
Abstract:
Header file for EFI Variable Services
--*/
#ifndef _EFI_VARIABLE_H_ #ifndef _EFI_VARIABLE_H_
#define _EFI_VARIABLE_H_ #define _EFI_VARIABLE_H_
@ -34,6 +27,15 @@ Abstract:
#define VARIABLE_STORE_FORMATTED 0x5a #define VARIABLE_STORE_FORMATTED 0x5a
#define VARIABLE_STORE_HEALTHY 0xfe #define VARIABLE_STORE_HEALTHY 0xfe
//
// The alignment of variable's start offset.
//
#if defined (MDE_CPU_IPF)
#define ALIGNMENT 8
#else
#define ALIGNMENT 2
#endif
// //
// Variable Store Status // Variable Store Status
// //

View File

@ -1,6 +1,7 @@
/*++ /**@file
Variable Machine Type
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -9,19 +10,10 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: **/
VarMachine.h
Abstract:
Variable Machine Type
--*/
#ifndef _VAR_MACHINE_H #ifndef _VAR_MACHINE_H
#define _VAR_MACHINE_H #define _VAR_MACHINE_H
#define ALIGNMENT 1
#endif #endif

View File

@ -1,6 +1,7 @@
/*++ /**@file
Variable Machine Type
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -9,19 +10,10 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: **/
VarMachine.h
Abstract:
Variable Machine Type
--*/
#ifndef _VAR_MACHINE_H #ifndef _VAR_MACHINE_H
#define _VAR_MACHINE_H #define _VAR_MACHINE_H
#define ALIGNMENT 1
#endif #endif

View File

@ -1,6 +1,7 @@
/*++ /**@file
Variable Machine Type
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -9,19 +10,11 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: **/
VarMachine.h
Abstract:
Variable Machine Type
--*/
#ifndef _VAR_MACHINE_H #ifndef _VAR_MACHINE_H
#define _VAR_MACHINE_H #define _VAR_MACHINE_H
#define ALIGNMENT 8
#endif #endif

View File

@ -1,6 +1,7 @@
/*++ /**@file
Variable Machine Type
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2007 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -9,19 +10,9 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: **/
VarMachine.h
Abstract:
Variable Machine Type
--*/
#ifndef _VAR_MACHINE_H #ifndef _VAR_MACHINE_H
#define _VAR_MACHINE_H #define _VAR_MACHINE_H
#define ALIGNMENT 1
#endif #endif

View File

@ -29,12 +29,6 @@ Abstract:
// //
#include <Common/Variable.h> #include <Common/Variable.h>
#if defined (MDE_CPU_IPF)
#define ALIGNMENT 8
#else
#define ALIGNMENT 1
#endif
#define VARIABLE_RECLAIM_THRESHOLD (1024) #define VARIABLE_RECLAIM_THRESHOLD (1024)
#define VARIABLE_STORE_SIZE (64 * 1024) #define VARIABLE_STORE_SIZE (64 * 1024)