aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk/mstructs.h
Commit message (Collapse)AuthorAgeFilesLines
* memdisk: Fix order of sectors/track and bytes/sectorsyslinux-4.06Kenneth J. Davis2012-10-231-2/+2
| | | | | | | | | | | | | | | | | | Swap order of sectors/track with bytes/sector to match diskette parameter table order (as pointed to by INT 1Eh). References: (additional ones available if necessary) 'System BIOS for IBM PC/XT/AT computers and compatibles' by Phoenix Technologies Ltd. copyright 1987,88,89 3rd printing 1990 ISBN: 0-201-51806-6 pages 61-62 'PC Interrupts' 2nd edition by Ralf Brown & Jim Kyle copyright 1994 1st printing 1993 ISBN: 0-201-62485-0 page 211 Note: this fixes an issue with older FreeDOS kernels that expect this structure to contain valid values. Signed-off-by: Kenneth J. Davis <jeremyd@fdos.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* memdisk: add a sector_shift field to the MDI; fix memdiskfindH. Peter Anvin2010-06-221-1/+1
| | | | | | | Add a sector_shift field to the MDI rather than assuming 512-byte sectors. Fix memdiskfind to report size in bytes, not in sectors. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* memdisk: make mstructs.h includable from LinuxH. Peter Anvin2010-06-211-8/+3
| | | | | | Make mstructs.h includable from a Linux utility. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* memdisk: Force 32-bit mBFT "safe hook" pointer fieldShao Miller2010-06-111-1/+4
| | | | | | | | | | | | | | When mstructs.h is used by MDISKCHK.COM, pointers have a 16-bit size and thus the mBFT structure sizeof() is smaller under OpenWatcom. We now union this pointer member with a uint32_t to force the field to at least 32 bits. There is another pointer in this header file which is already unioned with a uint32_t, due to that field's dual-purpose. That field is fine under OpenWatcom. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* memdisk: Move dpt_t into common structures headerShao Miller2010-06-111-0/+33
| | | | | | | This needs to be in here in order for the header file to be useful to any C file other than setup.c. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* memdisk: mBFT includes the MDIShao Miller2010-06-111-12/+13
| | | | | | | | Instead of padding the mBFT so its size is correct, we actually put the MDI struct in there, since the last commit provided it. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* memdisk: Change patch area to include the entire MDIShao Miller2010-06-111-2/+12
| | | | | | | | | | | Previously, the patch area began after the beginning of the MDI, but continued past its end. This is difficult to express with C structures, so we've simply changed the patch area to include the entire MDI. So it now includes the MDI size and MEMDISK version info, which we simply make constant to avoid modifying. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* memdisk: Use MEMDISK header to access "safe hook"Shao Miller2010-06-111-0/+9
| | | | | | | | | | | | | | | This commit moves the MEMDISK header structure into the common structures header file. It also adds the "safe hook" structure to the MEMDISK header structure, since that matches what's in the hook binaries. Thus, we access the "safe hook" via the header pointer, instead of separately. Tested against a DOS floppy image including an experimental MDISKCHK.COM and also gainst WinVBlock. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* memdisk: Use real_addr_t for SEG:OFF fieldsShao Miller2010-06-111-11/+26
| | | | | | | | | | | | We used uint32_t in a few places where it's also handy to refer to those fields' segment and offset components. Now we can do so via the real_addr_t union type. Additionally, there are a couple of places where we now have pointer fields instead of uint32_t fields, because we know what kind of struct the field is pointing to. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* memdisk: Move common structures into headersShao Miller2010-06-111-0/+112
Since MDISKCHK.COM (and possibly COM32 modules) could make use of structures found in MEMDISK's setup.c, we move these into a new header file mstructs.h. Also, since the OpenWatcom compiler uses a structure packing prefix and GCC uses a structure packing postfix, we accomodate this with preprocessor definitions around those structures needing to be packed. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>