EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBda.c

Go to the documentation of this file.
00001 
00019 #include "LegacyBiosInterface.h"
00020 
00029 EFI_STATUS
00030 LegacyBiosInitBda (
00031   IN  LEGACY_BIOS_INSTANCE    *Private
00032   )
00033 {
00034   BDA_STRUC *Bda;
00035   UINT8     *Ebda;
00036 
00037   Bda   = (BDA_STRUC *) ((UINTN) 0x400);
00038   Ebda  = (UINT8 *) ((UINTN) 0x9fc00);
00039 
00040   ZeroMem (Bda, 0x100);
00041   ZeroMem (Ebda, 0x400);
00042   //
00043   // 640k-1k for EBDA
00044   //
00045   Bda->MemSize        = 0x27f;
00046   Bda->KeyHead        = 0x1e;
00047   Bda->KeyTail        = 0x1e;
00048   Bda->FloppyData     = 0x00;
00049   Bda->FloppyTimeout  = 0xff;
00050 
00051   Bda->KeyStart       = 0x001E;
00052   Bda->KeyEnd         = 0x003E;
00053   Bda->KeyboardStatus = 0x10;
00054   Bda->Ebda           = 0x9fc0;
00055 
00056   //
00057   // Move LPT time out here and zero out LPT4 since some SCSI OPROMS
00058   // use this as scratch pad (LPT4 is Reserved)
00059   //
00060   Bda->Lpt1_2Timeout  = 0x1414;
00061   Bda->Lpt3_4Timeout  = 0x1400;
00062 
00063   *Ebda               = 0x01;
00064 
00065   return EFI_SUCCESS;
00066 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines