1. In dependency.c, DXE Dispatcher doesn't check the dependency expression boundary correctly. 2. In page.c, a misspelling code in DXE core memory service code, duplicate code. 3. In gcd.c, according to DXE CIS 0-91 spec, When GcdAllocateType is EfiGcdAllocateMaxAddressSearchBottomUp or EfiGcdAllocateMaxAddressSearchTopDown, then the GCD memory space map is searched from the lowest address up to BaseAddress (or from BaseAddress down to the lowest address) looking for unallocated memory ranges of Length bytes. Here, BaseAddress itself is inclusive, that is, any range in [0, BaseAddress] is allowable. But current code BaseAddress to be exclusive. 4. In Ebcinit.c, EbcDebugRegisterPeriodicCallback() not check whether it is already registered. 5. In Ebcinit.c, EbcDebugRegisterExceptionCallback() not check whether it is already registered. 6. In Ebcinit.c, EbcDebugSignalException() does not assign value to EbcContext.ControlFlags. 7. In Ebcinit.c, EBC: StatusCodeValue should use EFI_SOFTWARE_EBC_EXCEPTION. 8. In Ebcinit.c, EbcDebugRegisterExceptionCallback() does not check ExceptionType 9. In ElTorito.c, BlockIo and DiskIo failed in SCT when there is CD in CD-ROM. 10. In Mbr.c, MBR code can't handle some situations. That is when there are 3 partitions in HD, if delete the first partition, it will not be able to recognize the other two partitions, and if delete the second partition, it will not be able to recognize the third partition. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1749 6f19259b-4bc3-4df7-8a09-765794883524
70 lines
1.9 KiB
C
70 lines
1.9 KiB
C
/*++
|
|
|
|
Copyright (c) 2006, Intel Corporation
|
|
All rights reserved. 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.
|
|
|
|
Module Name:
|
|
|
|
Mbr.h
|
|
|
|
Abstract:
|
|
|
|
Data Structures required for detecting MBR Partitions
|
|
|
|
Revision History
|
|
|
|
--*/
|
|
|
|
#ifndef _MBR_H_
|
|
#define _MBR_H_
|
|
|
|
#pragma pack(1)
|
|
|
|
#define MBR_SIGNATURE 0xaa55
|
|
#define MIN_MBR_DEVICE_SIZE 0x80000
|
|
#define MBR_ERRATA_PAD 0x40000 // 128 MB
|
|
#define EXTENDED_DOS_PARTITION 0x05
|
|
#define EXTENDED_WINDOWS_PARTITION 0x0F
|
|
#define MAX_MBR_PARTITIONS 4
|
|
|
|
#define PMBR_GPT_PARTITION 0xEE
|
|
#define EFI_PARTITION 0xEF
|
|
#define MBR_SIZE 512
|
|
|
|
//
|
|
// MBR Partition Entry
|
|
//
|
|
typedef struct {
|
|
UINT8 BootIndicator;
|
|
UINT8 StartHead;
|
|
UINT8 StartSector;
|
|
UINT8 StartTrack;
|
|
UINT8 OSIndicator;
|
|
UINT8 EndHead;
|
|
UINT8 EndSector;
|
|
UINT8 EndTrack;
|
|
UINT8 StartingLBA[4];
|
|
UINT8 SizeInLBA[4];
|
|
} MBR_PARTITION_RECORD;
|
|
|
|
//
|
|
// MBR Partition table
|
|
//
|
|
typedef struct {
|
|
UINT8 BootStrapCode[440];
|
|
UINT8 UniqueMbrSignature[4];
|
|
UINT8 Unknown[2];
|
|
MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS];
|
|
UINT16 Signature;
|
|
} MASTER_BOOT_RECORD;
|
|
|
|
#pragma pack()
|
|
|
|
#endif
|