Home | History | Annotate | Download | only in OvmfPkg
      1 ## @file

      2 #  FDF include file that defines the main macros and sets the dependent PCDs.

      3 #

      4 #  Copyright (C) 2014, Red Hat, Inc.

      5 #  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>

      6 #

      7 #  This program and the accompanying materials are licensed and made available

      8 #  under the terms and conditions of the BSD License which accompanies this

      9 #  distribution. The full text of the license may be found at

     10 #  http://opensource.org/licenses/bsd-license.php

     11 #

     12 #  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,

     13 #  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR

     14 #  IMPLIED.

     15 #

     16 ##

     17 
     18 #

     19 # Default flash size is 2MB.

     20 #

     21 # Defining FD_SIZE_1MB on the build command line can override this.

     22 #

     23 
     24 DEFINE BLOCK_SIZE        = 0x1000
     25 DEFINE VARS_SIZE         = 0x20000
     26 DEFINE VARS_BLOCKS       = 0x20
     27 
     28 !ifdef $(FD_SIZE_1MB)
     29 
     30 DEFINE FW_BASE_ADDRESS   = 0xFFF00000
     31 DEFINE FW_SIZE           = 0x00100000
     32 DEFINE FW_BLOCKS         = 0x100
     33 DEFINE CODE_BASE_ADDRESS = 0xFFF20000
     34 DEFINE CODE_SIZE         = 0x000E0000
     35 DEFINE CODE_BLOCKS       = 0xE0
     36 DEFINE FVMAIN_SIZE       = 0x000CC000
     37 DEFINE SECFV_OFFSET      = 0x000EC000
     38 DEFINE SECFV_SIZE        = 0x14000
     39 
     40 !else
     41 
     42 DEFINE FW_BASE_ADDRESS   = 0xFFE00000
     43 DEFINE FW_SIZE           = 0x00200000
     44 DEFINE FW_BLOCKS         = 0x200
     45 DEFINE CODE_BASE_ADDRESS = 0xFFE20000
     46 DEFINE CODE_SIZE         = 0x001E0000
     47 DEFINE CODE_BLOCKS       = 0x1E0
     48 DEFINE FVMAIN_SIZE       = 0x001AC000
     49 DEFINE SECFV_OFFSET      = 0x001CC000
     50 DEFINE SECFV_SIZE        = 0x34000
     51 
     52 !endif
     53 
     54 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress     = $(FW_BASE_ADDRESS)
     55 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize    = $(FW_SIZE)
     56 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize = $(BLOCK_SIZE)
     57 
     58 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase = $(FW_BASE_ADDRESS)
     59 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize = 0xE000
     60 
     61 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
     62 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize = $(BLOCK_SIZE)
     63 
     64 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize
     65 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize = $(BLOCK_SIZE)
     66 
     67 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
     68 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize = 0x10000
     69 
     70 DEFINE MEMFD_BASE_ADDRESS = 0x800000
     71