Ard Biesheuvel f311e5d8b5 ArmVirtPkg: remove ArmPlatformSysConfigLib dependency
Now that the PL031 RTC driver library no longer depends on the ARM
platform specific ArmPlatformSysConfigLib, we no longer need to
implement ArmPlatform.h or have a resolution for that library.
This allows us to get rid of a rather dodgy practice of including
platform headers using compiler flags, which is a bad idea at various
levels.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2017-11-16 16:22:55 +00:00

57 lines
1.5 KiB
C

/** @file
Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR>
This program and the accompanying materials
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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include <Library/NorFlashPlatformLib.h>
#define QEMU_NOR_BLOCK_SIZE SIZE_256KB
#define QEMU_NOR0_BASE 0x0
#define QEMU_NOR0_SIZE SIZE_64MB
#define QEMU_NOR1_BASE 0x04000000
#define QEMU_NOR1_SIZE SIZE_64MB
EFI_STATUS
NorFlashPlatformInitialization (
VOID
)
{
return EFI_SUCCESS;
}
NOR_FLASH_DESCRIPTION mNorFlashDevices[] = {
{
QEMU_NOR0_BASE,
QEMU_NOR0_BASE,
QEMU_NOR0_SIZE,
QEMU_NOR_BLOCK_SIZE,
{0xF9B94AE2, 0x8BA6, 0x409B, {0x9D, 0x56, 0xB9, 0xB4, 0x17, 0xF5, 0x3C, 0xB3}}
}, {
QEMU_NOR1_BASE,
QEMU_NOR1_BASE,
QEMU_NOR1_SIZE,
QEMU_NOR_BLOCK_SIZE,
{0x8047DB4B, 0x7E9C, 0x4C0C, {0x8E, 0xBC, 0xDF, 0xBB, 0xAA, 0xCA, 0xCE, 0x8F}}
}
};
EFI_STATUS
NorFlashPlatformGetDevices (
OUT NOR_FLASH_DESCRIPTION **NorFlashDescriptions,
OUT UINT32 *Count
)
{
*NorFlashDescriptions = mNorFlashDevices;
*Count = ARRAY_SIZE (mNorFlashDevices);
return EFI_SUCCESS;
}