summaryrefslogtreecommitdiff
path: root/memdisk
Commit message (Collapse)AuthorAgeFilesLines
* memdisk: make sure the disk type is actually setH. Peter Anvin2011-03-161-2/+6
| | | | | | Make sure we actually set the disk CMOS type. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdisk/setup: Rename int15maxres to setmaxmemGene Cumm2011-02-081-5/+5
| | | | | | | The old name was intended as a test to prevent collision. New name seems more logical and appropriate. By reusing the mem= parameter and adjusting all of the memory calls that MEMDISK replaces through the use of insertrange(), there's nothing better that we can do.
* memdisk: Fix CSRC in MakefileGene Cumm2011-02-081-2/+1
|
* memdisk & libcom32: Fix minor errors in previous commitGene Cumm2011-02-082-2/+2
|
* memdisk: Undo addition of vpath and removal of tiny filesGene Cumm2011-02-086-2/+5
|
* memdisk: remove unnecessary files; add vpath instead; add files to CSRCGene Cumm2011-02-086-6/+5
| | | | | | This removes the need to have these tiny files around. This also changes it to be relative to $(topdir), allowing for memdisk to be moved if needed in the future.
* memdisk/setup: Allow suffix processing on mem= parameterGene Cumm2011-02-073-4/+13
|
* memdisk: Add strtoull from libcom32 by #includeGene Cumm2011-02-075-0/+5
|
* memdisk/setup: remove unneeded code associated with int15maxresGene Cumm2011-02-061-13/+0
|
* memdisk/setup: int15maxres: Use 1 const; comment out printf()Gene Cumm2011-02-061-4/+5
|
* memdisk/setup: Change int15maxres to parse memory range linesGene Cumm2011-02-061-7/+12
| | | | Only touch the ranges that are type 1 (available)
* memdisk/setup: change option to memGene Cumm2011-02-061-1/+1
|
* memdisk/setup: Move duplicate code in int15maxres to new functionGene Cumm2011-02-061-15/+13
|
* memdisk: New parameter (int15maxres) for specifying maximum RAMGene Cumm2011-02-051-0/+38
| | | | | | Add a new parameter, int15maxres, for specifying (in decimal bytes) the maximum amount of free RAM that different calls will return. The RAM is tagged in INT15h AXe820h as reserved in order to satisfy this.
* memdisk: Fix INT 0x13, AH==0x15 disk drive probeShao Miller2011-01-251-1/+1
| | | | | | | | The function might return CF==0 ("success"), but could include AH==0 ("no such drive"). This is the case on at least a number of Dell models. Now we check AH, too. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* memdisk: Enhance disk-probe debugging outputShao Miller2011-01-251-20/+77
| | | | | | | | | | In an effort to trouble-shoot a problem report on some Dell models (including an Optiplex GX260), we add further debugging output to try to find out at which point things go wrong. The problem units are apparently probing as "drive present" for all drives, which obviously isn't right. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* memdisk: Make debug-mode a tad prettierShao Miller2011-01-241-12/+22
| | | | | | By removing the use of #ifdef-#endif blocks. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* memdisk: use char array for external symbolsH. Peter Anvin2010-11-141-3/+3
| | | | | | | Use "extern const char foo[];" for an external symbol rather than "extern void" (gcc 4.5 fix.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdisk: add a sector_shift field to the MDI; fix memdiskfindH. Peter Anvin2010-06-222-11/+12
| | | | | | | 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-216-23/+23
| | | | | | Make mstructs.h includable from a Linux utility. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* memdisk: Correct El Torito termination responseShao Miller2010-06-151-1/+6
| | | | | | | | | | | | Two changes to the INT 0x13, AH=0x7B El Torito function: 1. Support the DL=0x7F "terminate all" parameter 2. Only respond to DL=0x7F or DL=our particular emulated drive number This prevents tools like Bart Lagerweij's El Torito tools from receiving false positives when probing all drive numbers. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* Merge remote branch 'sha0/mdiskchk_enh2' into pathbasedH. Peter Anvin2010-06-176-180/+245
|\
| * memdisk: Force 32-bit mBFT "safe hook" pointer fieldShao Miller2010-06-112-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-112-33/+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-113-21/+33
| | | | | | | | | | | | | | | | | | | | | | 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-112-23/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-112-28/+41
| | | | | | | | | | | | | | | | | | | | | | | | 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-115-104/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit 'syslinux-3.86' into pathbasedsyslinux-4.00-pre38H. Peter Anvin2010-04-011-14/+15
|\ \ | |/ | | | | | | | | | | Resolved Conflicts: core/cpuinit.inc Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * memdisk: Calculate mBFT checksum laterShao Miller2010-03-301-14/+15
| | | | | | | | | | | | | | We were calculating the mBFT checksum too early; dpt_ptr could change after checksumming, so we now do it after that possibility. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* | Merge branch 'master' into pathbasedH. Peter Anvin2010-03-301-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | Resolved Conflicts: com32/modules/Makefile core/comboot.inc core/cpuinit.inc core/idle.inc Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * memdisk: MBR not recognized correctlyBodo Stroesser2010-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a small inaccuracy in memdisk: get_disk_image_geometry() does not use MBR data to detect disk geometry, since it checks MBR signature at wrong offset. This normally does not cause problems, because memdisk guesses a reasonable value, if no MBR is found. Signed-off-by: Bodo Stroesser <bstroesser at ts.fujitsu.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | memdisk: drop DEBUG from unzip.cH. Peter Anvin2010-02-281-0/+2
|/ | | | | | DEBUG doesn't work in unzip.c/inflate.c, so always #undef it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdisk: make "nopass" type-specific, add "nopassany"H. Peter Anvin2010-02-081-4/+11
| | | | | | | Make "nopass" specific to the current drive type. Add new option "nopassany", which also clobbers the drive counts of both types. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdisk: fix non-prototype function declarationH. Peter Anvin2010-01-101-1/+1
| | | | | | () is not a prototype, use (void) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Makefile: replace -W -Wall with centralized $(GCCWARN)H. Peter Anvin2010-01-101-1/+1
| | | | | | | | | Replace -W -Wall hardcoded into a bunch of Makefiles with $(GCCWARN), a centralized variable defined in the root MCONFIG. Add -Wstrict-prototypes to the list of global warnings: we should never have non-prototyped declarations. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdisk: Fix "might be used uninitialized" warningShao Miller2009-12-111-2/+2
| | | | | | | Impact: Initializing variables The checksum_buf function was providing an incorrect checksum on at least one build.
* memdisk: Fix mBFT alignmentShao Miller2009-12-111-1/+1
| | | | | | | Impact: Fixing mBFT alignment It was previously possible that the mBFT might not be 16-byte aligned because the .data section was not.
* memdisk: slight cleanup of the "safe hook" structureH. Peter Anvin2009-12-071-2/+1
| | | | | | Make the "safe hook" structure code a bit more readable. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdisk: "safe hook" and mBFTShao Miller2009-12-073-4/+136
| | | | | | | | | | | | | | | | | | | | Two additions to MEMDISK to support OS drivers. The "safe hook" structure ("Safe Master Boot Record INT 13h Hook Routines") is a means for an OS driver to follow a chain of INT 13h hooks, examining the hooks' vendors and assuming responsibility for hook functionality along the way. For MEMDISK, we guarantee an additional field which holds the physical address for the mBFT. The mBFT is an ACPI table which an OS driver can scan for. The mBFT contains the official MEMDISK Info structure (MDI) which itself includes parameters the OS will want to know about. The mBFT points back at the "safe hook" structure's physical address so that an OS supporting both "safe hook" chain-walking as well as mBFT-scanning can know that both refer to the same MEMDISK instance. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdisk: pptr->cd_pkt.sect_count is in virtual sectorsH. Peter Anvin2009-11-191-1/+1
| | | | | | | Per the El Torito spec, pptr->cd_pkt.sect_count are in virtual sectors, i.e. 512-byte sectors. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdisk: Use boot_lba logic for booting an offset within the disk imageShao Miller2009-11-191-8/+9
| | | | | | | | | We have two fundamental quantities: the offset of the disk image itself and the LBA from which we boot. Keep them straight. This should make at least some no-emulation isos work correctly. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* memdisk: Restore DL for INT 13h, AH=15h, DL=floppysyslinux-3.84-pre4Shao Miller2009-11-191-1/+3
| | | | | | | | | | At least PC-DOS requires this to avoid an infinite loop; the DL we restore is not the same DL that we call the underlying BIOS with, but rather the original one (before the decrement.) PC-DOS loops over all the floppies and relies on the call preserving DL in order to advance the loop. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'memdisk-iso-SAFE' into memdisk-isoShao Miller2009-11-1614-102/+624
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: memdisk/memdisk_chs.asm memdisk/memdisk_edd.asm memdisk/setup.c Resolved: Deleted memdisk/memdisk_chs.asm Deleted memdisk/memdisk_edd.asm Modified memdisk/setup.c
| * [memdisk] Add El Torito emulation for .ISO imagesShao Miller2009-08-039-18/+347
| | | | | | | | | | With this patch, users can now boot El Torito-bootable .ISO (CD/DVD) images. The user should specify "iso" on the kernel command-line.
| * [memdisk] Add installable INT 13h hooks for ISO-booting scenariosShao Miller2009-08-034-2/+18
| | | | | | | | | | | | | | As of this commit, these hooks do nothing special and are unused. They are intended to support the El Torito "No Emulation" (2048-byte sector size) and "Floppy Emulation"/"HDD Emulation" (512-byte sector size) modes for bootable optical disc drive media (CD/DVD).
| * [memdisk] Move sector size choice into each individual hookShao Miller2009-08-033-1/+2
| |
| * [memdisk] Rename CHS and EDD hooks to describe their sector sizeShao Miller2009-08-034-12/+12
| | | | | | | | Suffixed with _512 to indicate a sector size of 512 bytes.
| * [memdisk] Add disk probing code to support a drive shifting limitShao Miller2009-08-034-2/+145
| | | | | | | | | | | | | | Our INT 13h hook will now only shift BIOS drive numbers up to a limit. This limit is found by probing for a contiguous range of BIOS drives. Anything above this range of contiguous drive numbers is not shifted, and will thus be available to callers at the same drive number.