NT32 has two ranges of memory, each 64MB. The first range is tested but the second range is not tested. Platform BDS should have code to use MemoryTest protocol to test the memory so that the second range of untested memory can be added to the system memory pool. Without the code SCT MemoryAllocation test case may fail. Because it firstly use GetMemoryMap to find the biggest free memory descriptor and then requests to allocate one page more than that biggest free memory. It expects the allocation fails but actually the DXE core automatically converts the second range of untested memory to tested and allocate the memory from the second range. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18172 6f19259b-4bc3-4df7-8a09-765794883524
80 lines
2.5 KiB
C
80 lines
2.5 KiB
C
/**@file
|
|
Head file for BDS Platform specific code
|
|
|
|
Copyright (c) 2015, Intel Corporation. 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.
|
|
**/
|
|
|
|
#ifndef _PLATFORM_BOOT_MANAGER_H
|
|
#define _PLATFORM_BOOT_MANAGER_H
|
|
|
|
#include <PiDxe.h>
|
|
|
|
#include <Guid/WinNtSystemConfig.h>
|
|
#include <Protocol/GenericMemoryTest.h>
|
|
#include <Protocol/WinNtThunk.h>
|
|
#include <Protocol/WinNtIo.h>
|
|
#include <Protocol/LoadedImage.h>
|
|
|
|
#include <Library/DebugLib.h>
|
|
#include <Library/BaseMemoryLib.h>
|
|
#include <Library/UefiBootServicesTableLib.h>
|
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
|
#include <Library/MemoryAllocationLib.h>
|
|
#include <Library/BaseLib.h>
|
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
|
#include <Library/UefiLib.h>
|
|
#include <Library/UefiBootManagerLib.h>
|
|
#include <Library/PcdLib.h>
|
|
#include <Library/DevicePathLib.h>
|
|
|
|
|
|
typedef struct {
|
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
|
UINTN ConnectType;
|
|
} PLATFORM_CONSOLE_CONNECT_ENTRY;
|
|
|
|
extern PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole[];
|
|
|
|
#define gEndEntire \
|
|
{ \
|
|
END_DEVICE_PATH_TYPE,\
|
|
END_ENTIRE_DEVICE_PATH_SUBTYPE,\
|
|
END_DEVICE_PATH_LENGTH,\
|
|
0\
|
|
}
|
|
|
|
#define CONSOLE_OUT BIT0
|
|
#define CONSOLE_IN BIT1
|
|
#define STD_ERROR BIT2
|
|
|
|
typedef struct {
|
|
VENDOR_DEVICE_PATH VendorDevicePath;
|
|
UINT32 Instance;
|
|
} WIN_NT_VENDOR_DEVICE_PATH_NODE;
|
|
|
|
//
|
|
// Below is the platform console device path
|
|
//
|
|
typedef struct {
|
|
VENDOR_DEVICE_PATH NtBus;
|
|
WIN_NT_VENDOR_DEVICE_PATH_NODE SerialDevice;
|
|
UART_DEVICE_PATH Uart;
|
|
VENDOR_DEVICE_PATH TerminalType;
|
|
EFI_DEVICE_PATH_PROTOCOL End;
|
|
} NT_ISA_SERIAL_DEVICE_PATH;
|
|
|
|
typedef struct {
|
|
VENDOR_DEVICE_PATH NtBus;
|
|
WIN_NT_VENDOR_DEVICE_PATH_NODE NtGopDevice;
|
|
EFI_DEVICE_PATH_PROTOCOL End;
|
|
} NT_PLATFORM_GOP_DEVICE_PATH;
|
|
|
|
#endif // _PLATFORM_BOOT_MANAGER_H
|