alignb 4, db 0
MemDisk_Info equ $ ; Pointed to by installation check
-MDI_Bytes dw 26 ; Total bytes in MDI structure
+MDI_Bytes dw 27 ; Total bytes in MDI structure
MDI_Version db VER_MINOR, VER_MAJOR ; MEMDISK version
PatchArea equ $ ; This gets filled in by the installer
OldInt15 dd 0 ; INT 15h in chain
OldDosMem dw 0 ; Old position of DOS mem end
+BootLoaderID db 0 ; Boot loader ID from header
; ---- MDI structure ends here ---
+ db 0, 0, 0 ; pad
+
MemInt1588 dw 0 ; 1MB-65MB memory amount (1K)
Cylinders dw 0 ; Cylinder count
The MEMDISK info structure currently contains:
- [ES:DI] word Total size of structure (currently 26 bytes)
+ [ES:DI] word Total size of structure (currently 27 bytes)
[ES:DI+2] byte MEMDISK minor version
[ES:DI+3] byte MEMDISK major version
[ES:DI+4] dword Pointer to MEMDISK data in high memory
[ES:DI+16] 16:16 Old INT 13h pointer
[ES:DI+20] 16:16 Old INT 15h pointer
[ES:DI+24] word Amount of DOS memory before MEMDISK loaded
+ [ES:DI+26] byte Boot loader ID
+
+MEMDISK 3.00 and higher has the size of this structure as 27; earlier
+versions had size 26 and did not include the boot loader ID.
In addition, the following fields are available at [ES:0]:
uint32_t oldint15;
uint16_t olddosmem;
+ uint8_t bootloaderid;
+
+ uint8_t _pad[3];
uint16_t memint1588;
uint16_t cylinders;
uint16_t statusptr;
dpt_t dpt;
-};
+} __attribute__((packed));
/* This is the header in the boot sector/setup area */
struct setup_header {
uint16_t pad1;
uint32_t cmd_line_ptr;
uint32_t initrd_addr_max;
-};
+} __attribute__((packed));
const struct setup_header * const shdr = (struct setup_header *)(LOW_SEG << 4);
pptr->disksize = geometry->sectors;
pptr->diskbuf = ramdisk_image + geometry->offset;
pptr->statusptr = (geometry->driveno & 0x80) ? 0x474 : 0x441;
- pptr->configflags = 0;
+ pptr->bootloaderid = shdr->type_of_loader;
+
+ pptr->configflags = 0;
/* Set config flags */
if ( getcmditem("ro") != CMD_NOTFOUND ) {
puts("Marking disk readonly\n");