summaryrefslogtreecommitdiff
path: root/DuetPkg
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-03-03 14:43:49 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-03-03 14:43:49 +0000
commitd0c94e59542161493842b2074d99ea659228815e (patch)
tree7f6bd2dd116df38eb418b1f964d65df6fc78fca9 /DuetPkg
parent2f78ec7a7a72daa2596bebed803a7750eca99441 (diff)
downloadedk2-platforms-d0c94e59542161493842b2074d99ea659228815e.tar.xz
The IA32 register definition is quit different between edk and edk2 code base, so should not use EFI_IA32_REGISTER_SET to prepare thunk call based on edk2's BaseLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7786 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg')
-rw-r--r--DuetPkg/BiosVideoThunkDxe/BiosVideo.c16
-rw-r--r--DuetPkg/BiosVideoThunkDxe/BiosVideo.h6
-rw-r--r--DuetPkg/BiosVideoThunkDxe/LegacyBiosThunk.c6
3 files changed, 15 insertions, 13 deletions
diff --git a/DuetPkg/BiosVideoThunkDxe/BiosVideo.c b/DuetPkg/BiosVideoThunkDxe/BiosVideo.c
index 770f3d080d..2a3c41aefb 100644
--- a/DuetPkg/BiosVideoThunkDxe/BiosVideo.c
+++ b/DuetPkg/BiosVideoThunkDxe/BiosVideo.c
@@ -599,7 +599,7 @@ BiosVideoChildHandleUninstall (
)
{
EFI_STATUS Status;
- EFI_IA32_REGISTER_SET Regs;
+ IA32_REGISTER_SET Regs;
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
EFI_VGA_MINI_PORT_PROTOCOL *VgaMiniPort;
BIOS_VIDEO_DEV *BiosVideoPrivate;
@@ -1031,7 +1031,7 @@ BiosVideoCheckForVbe (
)
{
EFI_STATUS Status;
- EFI_IA32_REGISTER_SET Regs;
+ IA32_REGISTER_SET Regs;
UINT16 *ModeNumberPtr;
BOOLEAN ModeFound;
BOOLEAN EdidFound;
@@ -1092,7 +1092,7 @@ BiosVideoCheckForVbe (
Regs.X.AX = VESA_BIOS_EXTENSIONS_RETURN_CONTROLLER_INFORMATION;
gBS->SetMem (BiosVideoPrivate->VbeInformationBlock, sizeof (VESA_BIOS_EXTENSIONS_INFORMATION_BLOCK), 0);
BiosVideoPrivate->VbeInformationBlock->VESASignature = VESA_BIOS_EXTENSIONS_VBE2_SIGNATURE;
- Regs.X.ES = EFI_SEGMENT ((UINTN) BiosVideoPrivate->VbeInformationBlock);
+ Regs.E.ES = EFI_SEGMENT ((UINTN) BiosVideoPrivate->VbeInformationBlock);
Regs.X.DI = EFI_OFFSET ((UINTN) BiosVideoPrivate->VbeInformationBlock);
LegacyBiosInt86 (BiosVideoPrivate, 0x10, &Regs);
@@ -1126,7 +1126,7 @@ BiosVideoCheckForVbe (
Regs.X.BX = 1;
Regs.X.CX = 0;
Regs.X.DX = 0;
- Regs.X.ES = EFI_SEGMENT ((UINTN) BiosVideoPrivate->VbeEdidDataBlock);
+ Regs.E.ES = EFI_SEGMENT ((UINTN) BiosVideoPrivate->VbeEdidDataBlock);
Regs.X.DI = EFI_OFFSET ((UINTN) BiosVideoPrivate->VbeEdidDataBlock);
LegacyBiosInt86 (BiosVideoPrivate, 0x10, &Regs);
@@ -1206,7 +1206,7 @@ BiosVideoCheckForVbe (
Regs.X.AX = VESA_BIOS_EXTENSIONS_RETURN_MODE_INFORMATION;
Regs.X.CX = *ModeNumberPtr;
gBS->SetMem (BiosVideoPrivate->VbeModeInformationBlock, sizeof (VESA_BIOS_EXTENSIONS_MODE_INFORMATION_BLOCK), 0);
- Regs.X.ES = EFI_SEGMENT ((UINTN) BiosVideoPrivate->VbeModeInformationBlock);
+ Regs.E.ES = EFI_SEGMENT ((UINTN) BiosVideoPrivate->VbeModeInformationBlock);
Regs.X.DI = EFI_OFFSET ((UINTN) BiosVideoPrivate->VbeModeInformationBlock);
LegacyBiosInt86 (BiosVideoPrivate, 0x10, &Regs);
@@ -1622,7 +1622,7 @@ BiosVideoGraphicsOutputSetMode (
{
EFI_STATUS Status;
BIOS_VIDEO_DEV *BiosVideoPrivate;
- EFI_IA32_REGISTER_SET Regs;
+ IA32_REGISTER_SET Regs;
BIOS_VIDEO_MODE_DATA *ModeData;
BiosVideoPrivate = BIOS_VIDEO_DEV_FROM_GRAPHICS_OUTPUT_THIS (This);
@@ -1705,7 +1705,7 @@ BiosVideoGraphicsOutputSetMode (
Regs.X.AX = VESA_BIOS_EXTENSIONS_SET_MODE;
Regs.X.BX = (UINT16) (ModeData->VbeModeNumber | VESA_BIOS_EXTENSIONS_MODE_NUMBER_LINEAR_FRAME_BUFFER);
gBS->SetMem (BiosVideoPrivate->VbeCrtcInformationBlock, sizeof (VESA_BIOS_EXTENSIONS_CRTC_INFORMATION_BLOCK), 0);
- Regs.X.ES = EFI_SEGMENT ((UINTN) BiosVideoPrivate->VbeCrtcInformationBlock);
+ Regs.E.ES = EFI_SEGMENT ((UINTN) BiosVideoPrivate->VbeCrtcInformationBlock);
Regs.X.DI = EFI_OFFSET ((UINTN) BiosVideoPrivate->VbeCrtcInformationBlock);
LegacyBiosInt86 (BiosVideoPrivate, 0x10, &Regs);
@@ -2729,7 +2729,7 @@ BiosVideoVgaMiniPortSetMode (
)
{
BIOS_VIDEO_DEV *BiosVideoPrivate;
- EFI_IA32_REGISTER_SET Regs;
+ IA32_REGISTER_SET Regs;
if (This == NULL) {
return EFI_INVALID_PARAMETER;
diff --git a/DuetPkg/BiosVideoThunkDxe/BiosVideo.h b/DuetPkg/BiosVideoThunkDxe/BiosVideo.h
index 08053478f8..406bb53143 100644
--- a/DuetPkg/BiosVideoThunkDxe/BiosVideo.h
+++ b/DuetPkg/BiosVideoThunkDxe/BiosVideo.h
@@ -30,7 +30,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/EdidActive.h>
#include <Protocol/EdidDiscovered.h>
#include <Protocol/DevicePath.h>
-#include <Protocol/LegacyBios.h>
#include <Library/UefiLib.h>
#include <Library/DebugLib.h>
@@ -133,6 +132,9 @@ typedef struct {
#define GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER 0xffff
+#define EFI_SEGMENT(_Adr) (UINT16) ((UINT16) (((UINTN) (_Adr)) >> 4) & 0xf000)
+#define EFI_OFFSET(_Adr) (UINT16) (((UINT16) ((UINTN) (_Adr))) & 0xffff)
+
//
// Global Variables
//
@@ -494,7 +496,7 @@ EFIAPI
LegacyBiosInt86 (
IN BIOS_VIDEO_DEV *BiosDev,
IN UINT8 BiosInt,
- IN EFI_IA32_REGISTER_SET *Regs
+ IN IA32_REGISTER_SET *Regs
);
#endif
diff --git a/DuetPkg/BiosVideoThunkDxe/LegacyBiosThunk.c b/DuetPkg/BiosVideoThunkDxe/LegacyBiosThunk.c
index 08ed35c1f4..e21ab362ef 100644
--- a/DuetPkg/BiosVideoThunkDxe/LegacyBiosThunk.c
+++ b/DuetPkg/BiosVideoThunkDxe/LegacyBiosThunk.c
@@ -137,7 +137,7 @@ EFIAPI
LegacyBiosInt86 (
IN BIOS_VIDEO_DEV *BiosDev,
IN UINT8 BiosInt,
- IN EFI_IA32_REGISTER_SET *Regs
+ IN IA32_REGISTER_SET *Regs
)
{
UINTN Status;
@@ -216,9 +216,9 @@ LegacyBiosInt86 (
Regs->E.DS = ThunkRegSet.E.DS;
Regs->E.ES = ThunkRegSet.E.ES;
- CopyMem (&(Regs->E.EFlags), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
+ CopyMem (&(Regs->E.EFLAGS), &(ThunkRegSet.E.EFLAGS), sizeof (UINT32));
- Ret = (BOOLEAN) (Regs->E.EFlags.CF == 1);
+ Ret = (BOOLEAN) (Regs->E.EFLAGS.Bits.CF == 1);
return Ret;
}