1. Use Mde library for Debug Port Module

2. Minimum changed for Debug Support Module.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7153 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2008-12-30 07:10:46 +00:00
parent 2d4117c049
commit cfcbb8bc54
3 changed files with 31 additions and 22 deletions

View File

@ -246,7 +246,7 @@ DebugPortSupported (
Status = EFI_UNSUPPORTED; Status = EFI_UNSUPPORTED;
} }
if (Status == EFI_SUCCESS && CompareMem (&gEfiDebugPortDevicePathGuid, Dp2 + 1, sizeof (EFI_GUID))) { if (Status == EFI_SUCCESS && !CompareGuid (&gEfiDebugPortDevicePathGuid, (GUID *) (Dp2 + 1))) {
Status = EFI_UNSUPPORTED; Status = EFI_UNSUPPORTED;
} }
@ -365,7 +365,7 @@ DebugPortStart (
DebugPortDP.Header.Type = MESSAGING_DEVICE_PATH; DebugPortDP.Header.Type = MESSAGING_DEVICE_PATH;
DebugPortDP.Header.SubType = MSG_VENDOR_DP; DebugPortDP.Header.SubType = MSG_VENDOR_DP;
SetDevicePathNodeLength (&(DebugPortDP.Header), sizeof (DebugPortDP)); SetDevicePathNodeLength (&(DebugPortDP.Header), sizeof (DebugPortDP));
CopyMem (&DebugPortDP.Guid, &gEfiDebugPortDevicePathGuid, sizeof (EFI_GUID)); CopyGuid (&DebugPortDP.Guid, &gEfiDebugPortDevicePathGuid);
Dp1 = DevicePathFromHandle (ControllerHandle); Dp1 = DevicePathFromHandle (ControllerHandle);
if (Dp1 == NULL) { if (Dp1 == NULL) {

View File

@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#include "DebugSupport.h" #include "PlDebugSupport.h"
IA32_IDT_GATE_DESCRIPTOR NullDesc = {{0}}; IA32_IDT_GATE_DESCRIPTOR NullDesc = {{0}};
@ -31,6 +31,10 @@ GetInterruptHandleFromIdt (
{ {
UINTN InterruptHandle; UINTN InterruptHandle;
//
// InterruptHandle 0-15 : OffsetLow
// InterruptHandle 16-31 : OffsetHigh
//
((UINT16 *) &InterruptHandle)[0] = (UINT16) IdtGateDescriptor->Bits.OffsetLow; ((UINT16 *) &InterruptHandle)[0] = (UINT16) IdtGateDescriptor->Bits.OffsetLow;
((UINT16 *) &InterruptHandle)[1] = (UINT16) IdtGateDescriptor->Bits.OffsetHigh; ((UINT16 *) &InterruptHandle)[1] = (UINT16) IdtGateDescriptor->Bits.OffsetHigh;

View File

@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#include "DebugSupport.h" #include "PlDebugSupport.h"
IA32_IDT_GATE_DESCRIPTOR NullDesc = {{0,0}}; IA32_IDT_GATE_DESCRIPTOR NullDesc = {{0,0}};
@ -31,6 +31,11 @@ GetInterruptHandleFromIdt (
{ {
UINTN InterruptHandle; UINTN InterruptHandle;
//
// InterruptHandle 0-15 : OffsetLow
// InterruptHandle 16-31 : OffsetHigh
// InterruptHandle 32-63 : OffsetUpper
//
((UINT16 *) &InterruptHandle)[0] = (UINT16) IdtGateDecriptor->Bits.OffsetLow; ((UINT16 *) &InterruptHandle)[0] = (UINT16) IdtGateDecriptor->Bits.OffsetLow;
((UINT16 *) &InterruptHandle)[1] = (UINT16) IdtGateDecriptor->Bits.OffsetHigh; ((UINT16 *) &InterruptHandle)[1] = (UINT16) IdtGateDecriptor->Bits.OffsetHigh;
((UINT32 *) &InterruptHandle)[1] = (UINT32) IdtGateDecriptor->Bits.OffsetUpper; ((UINT32 *) &InterruptHandle)[1] = (UINT32) IdtGateDecriptor->Bits.OffsetUpper;