Hi!

26-Мар-2004 23:54 [EMAIL PROTECTED] (Bart Oldeman) wrote to
[EMAIL PROTECTED]:

>> AVB> ; the HMA area is filled with 1eh+3(=sizeof VDISK) = 33 byte dummy data,
>> AVB> ; so nothing will ever be below 0xffff:0031
>> AVB> begin_hma:
>> AVB>                 times 10h db 0   ; filler [ffff:0..ffff:10]
>> AVB>                 times 20h db 0
>> AVB>                 db 0
>>      BTW, strange arithmetics: sayed about 33 bytes, but allocated 49 bytes.

     Sorry, forget that FFFF:0 is not yet above first meg. But why not
comment this explicitly:

        times 10h db 0  ; filler [ffff:0..ffff:10]
        times 21h db 0  ; VDISK header after first meg

>> Also, where documented VDISK header (where I may read about this)?
BO> It's in the VCPI spec. Available at many places including here:
BO> www.dose.se/docs/osdoc/unsorted/ProtectedMode/VCPI.txt

     No, there sayed only about signature and showed how to copy word value
from offset 0x1E. :( Other fields are unexplained.

BO> 49=33+16. The first 16 are still in the ROM BIOS. The header is at
BO> ffff:0010

     Yes, I see now, sorry for this silly forgiveness (though, there are not
enough comments anyway).

     But why HMAOFFSET in inithma.c is 0x20, not 0x10 or 0x30? Also, what
about moving VDISK header from inithma.c:InstallVDISK() to kernel.asm? This
allows to remove InstallVDISK(). Also, for this HMAOFFSET in inithma.c
should be defined as 0x10 and MoveKernel() should (unconditionally) adjust
by this value src, dst and len:

#define HMAOFFSET 0x10
  HMASource =
      MK_FP(CurrentKernelSegment, (FP_OFF(_HMATextStart) & -16) + HMAOFFSET);
----------------------------------------------------------------^^^^^^^^^^^
  HMADest = MK_FP(NewKernelSegment, HMAOFFSET);
------------------------------------^^^^^^^^^
  len = ((FP_OFF(_HMATextEnd) - (FP_OFF(_HMATextStart) & 0xfff0))
                                + HMAOFFSET + 15) & -16;

Also, as I say previously, most of reserved are (0x30 bytes) may be reused
when kernel finally moved to low memory, by shifting segment of copied code
by 0x30/0x10=3. (Of course, in this case MoveKernel() should adjust also
offsets not by 0x10, but by 0x30; value of offset may be second argument of
MoveKernel()). IF YOU WISH, I MAY DO (AND TEST) THIS MYSELF. What you think
about this?




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to