EBDA corrections by Lucho

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@680 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2003-09-09 17:30:10 +00:00
parent 6cd84b06d1
commit 59484b2fc9
2 changed files with 10 additions and 6 deletions

View File

@ -307,10 +307,14 @@ void PreConfig2(void)
base_seg = LoL->first_mcb = FP_SEG(AlignParagraph((BYTE FAR *) DynLast() + 0x0f));
ebda_size = ebdasize();
if (ebda_size > Config.ebda2move)
ebda_size = Config.ebda2move;
ram_top += ebda_size / 1024;
ebda_size = 0;
if (Config.ebda2move)
{
ebda_size = ebdasize();
ram_top += ebda_size / 1024;
if (ebda_size > Config.ebda2move)
ebda_size = Config.ebda2move;
}
/* We expect ram_top as Kbytes, so convert to paragraphs */
mcb_init(base_seg, ram_top * 64 - LoL->first_mcb - 1, MCB_LAST);
@ -1013,7 +1017,7 @@ STATIC VOID CfgSwitches(BYTE * pLine)
break;
}
pLine = p - 1; /* p points past number */
/* allowed values: [0..1024] bytes, multiples of 16
/* allowed values: [48..1024] bytes, multiples of 16
* e.g. AwardBIOS: 48, AMIBIOS: 1024
* (Phoenix, MRBIOS, Unicore = ????)
*/

View File

@ -142,7 +142,7 @@ VOID FAR * HMAalloc(COUNT bytesToAllocate);
/* initoem.c */
unsigned init_oem(void);
void movebda(int bytes, unsigned new_seg);
void movebda(size_t bytes, unsigned new_seg);
unsigned ebdasize(void);
/* intr.asm */