summaryrefslogtreecommitdiff
path: root/core/diskstart.inc
Commit message (Collapse)AuthorAgeFilesLines
* diskstart: don't let the function number clobber the LBAH. Peter Anvin2010-06-291-3/+7
| | | | | | | | | The LBA for getonesec and getlinsec is in EDX:EAX, but both DL and AX are function inputs to INT 13h (drive number and function number). We need to preserve the LBA across *both* those, otherwise retries will not function. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskstart: if no partition info is available, use bsHiddensyslinux-4.00-pre63H. Peter Anvin2010-06-261-2/+7
| | | | | | | | | | | | If we have no partition information available, use the bsHidden field (which is set by the extlinux installer in the case of non-FAT). This gives at least a hope of working correctly (for < 2 TiB disks, at least) with the stock Vista/Win7 MBR. Also, add a check for partition type != 0. This helps catch the case when DS:SI points into all-zero memory. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: move PartInfo back to the top of stackH. Peter Anvin2010-06-261-9/+8
| | | | | | | | Move PartInfo back to near the top of the stack. This makes it less likely that it ends up getting overwritten during the act of copying itself. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* diskstart: if no partition table, we need Hidden == 0syslinux-4.00-pre56H. Peter Anvin2010-06-221-5/+11
| | | | | | | If we don't have a partition table, we need to make sure Hidden gets set to zero. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskstart: fix CHS mode, reinstate cyl 1023 checksyslinux-4.00-pre55H. Peter Anvin2010-06-211-12/+11
| | | | | | | Fix loading in CHS mode; we were missing a popad. Also reinstate the check for exceeding cylinder 1023. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* diskstart: clean up GPT handlingH. Peter Anvin2010-06-211-9/+11
| | | | | | | We only need 56 bytes, not 92, and we should check for 0xED as the partition type. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: align the EPAsyslinux-4.00-pre53pathbasedH. Peter Anvin2010-06-201-0/+1
| | | | | | Align the Extended Patch Area. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Reduce sector 1 space pressure; further merge installer codesyslinux-4.00-pre52H. Peter Anvin2010-06-201-12/+24
| | | | | | | | | | Reduce sector 1 space pressure by moving objects that aren't needed by Sector 1 proper into an "extended patch area". While we're mucking with the installer code, make the syslxint and extlinux installer code even more similar. It should now be pretty straightforward to outright merge the code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Switch to 64-bit sector pointers everywhereH. Peter Anvin2010-06-151-36/+26
| | | | | | | | | | | | Switch to consistent use of 64-bit sector pointers; this should enable booting even for individual *partitions* larger than 2 TB. In order to not slow down the boot too much, switch the initial load from an enumeration to an extent map. This means the table gets larger (since we have to assume the worst case), but it simplifies the Sector 1 code (since we can push all the hard stuff into the installer), and will speed up booting in the general case. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* core: add hlt to infinite loopH. Peter Anvin2010-06-141-1/+2
| | | | | | We should never hit it, but if we do, don't burn the CPU to a crisp. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Implement !GPT protocol in Syslinux core; handle offset > 2 TBH. Peter Anvin2010-06-141-181/+286
| | | | | | | | | | | | | | | Implement the !GPT handover protocol in the Syslinux core, and handle partition offsets above 2 TB. We do not yet handle filesystem sizes above 2 TB, but that should be a reasonably straightforward extension at this time (need to switch to 8-byte block pointers). This finally meant moving getlinsec out of the boot sector, since it no longer fits. Instead have a very simple getonesec implementation in the boot sector. getlinsec still fits in Sector 1, although it doesn't leave space for very many block pointers. That's still better than adding yet another boot loader stage, however. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskstart: print CHS/EDD instead of CBIOS/EBIOSH. Peter Anvin2010-05-141-2/+2
| | | | | | The terms CHS or EDD are more well-known, so use them. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskio: make maxtransfer per-device, cap to 127, imported from headsyslinux-4.00-pre43H. Peter Anvin2010-05-121-1/+1
| | | | | | | | | | Make the maxtransfer per device, as it should be; properly imported from the head loader (in case it is patched with -s). Also enforce capping to 127 for EBIOS and 63 for CBIOS. This is structured so that once EDD4 is approved we can remove the capping for that particular subcase. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'master' into pathbasedH. Peter Anvin2010-03-301-3/+2
|\ | | | | | | | | | | | | | | | | | | Resolved Conflicts: com32/modules/Makefile core/comboot.inc core/cpuinit.inc core/idle.inc Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * Clean up the version/copyright strings reported via the comboot APIH. Peter Anvin2010-03-301-3/+2
| | | | | | | | | | | | | | Skip leading garbage in the version and copyright strings reported via the comboot API. Clean up fixes for those, and document the situation. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge branch 'master' into pathbasedsyslinux-4.00-pre20H. Peter Anvin2010-02-141-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | Resolved Conflicts: com32/Makefile com32/include/syslinux/pxe.h core/pxelinux.asm core/syslinux.ld Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * core: document the stack location, use STACK_TOP throughoutH. Peter Anvin2010-02-121-1/+1
| | | | | | | | | | | | | | | | | | The global absolute symbol STACK_TOP defined in layout.inc can be used by the linker script as well as by anything else that needs to know where the stack is. Also document why we do it differently for PXELINUX. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'fsc' into pathbasedH. Peter Anvin2010-01-211-1/+3
|\ \
| * | core/diskstart: we don't have 64-bit partition offset just yet...H. Peter Anvin2010-01-211-1/+3
| | | | | | | | | | | | | | | | | | | | | We don't actually have a way to receive a 64-bit partition offset yet, so don't pretend to (on FAT, this field contains other information.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | pathbased: clean up diskstart address numbers, 256 byte subvolsH. Peter Anvin2010-01-131-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | Clean up the uses of hard-coded addresses in diskstart.inc. Furthermore, the btrfs spec allows 255 characters for a subvolume, so we might as well allocate that much. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | pathbased:btrfs: initial subvol supportAlek Du2010-01-131-10/+11
| | | | | | | | | | | | | | | | | | Added "Subvol" name in the extlinux.sys, and then btrfs fs code will handle the subvol correctly. Also fixed the bug where CurrentDirName and SubvolName should not exist in the first sector.
* | | core: initial work on path-based cwd selectionH. Peter Anvin2010-01-061-4/+15
|/ / | | | | | | | | | | | | | | | | | | | | Work on picking the initial cwd by storing a path instead of by storing an inode number. This should be both more general (in the sense of supporting filesystems in a generic way) as well as conceptually cleaner. The code doesn't work yet, but this at least provides support for the extlinux installer to store its subpath into the installed image. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge commit 'liu/master' into fscH. Peter Anvin2009-12-281-0/+1
| | | | | | | | | | | | | | | | Resolved Conflicts: core/fs.c core/fs/ext2/ext2.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: merge cpuinit.inc into init.incH. Peter Anvin2009-09-021-2/+0
| | | | | | | | | | | | | | The separation between cpuinit.inc and init.inc has never been very clear, and it just made the code harder to read. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core/diskstart.inc: make the root filesystem a configurableH. Peter Anvin2009-08-101-19/+5
| | | | | | | | | | | | | | Instead of using conditional compilation, just set the root filesystem type in the assembly stub. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'core32' into fscH. Peter Anvin2009-08-071-1/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: core/extlinux.asm core/pxelinux.asm Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * \ Merge branch 'master' into core32H. Peter Anvin2009-06-091-1/+7
| |\ \ | | |/
| | * core: prevent buggy INT 13h from leaving IF=0syslinux-3.82-pre4H. Peter Anvin2009-06-041-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | If it can happen for CD-ROM BIOSes, it can probably happen elsewhere, too; make sure we don't leave interrupts disabled after broken INT 13h calls. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | Merge branch 'isolinux'Liu Aleaxander2009-06-231-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: core/Makefile core/diskstart.inc core/fs.c
| * | | Core:ISOLINUX: convert the isolinux.asm to CLiu Aleaxander2009-06-211-0/+1
| | | |
* | | | Core:EXTLINUX: applies the path from hpa to EXTLINUXLiu Aleaxander2009-06-201-2/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I just added it to EXTLINUX first, and I will consider if I should added it SYLSINUX and ISOLINUX and so on tomorrow (I'm not sure for now). And I added a new structure disk to store the disk specific information, so some changes happened on the vfs-like interface. Hope you will like it, hap;) the new code broken on the non-standard disk geometry, like the exttest package given by hpa.
* | | Core: make vfs do the workLiu Aleaxander2009-06-111-2/+26
| | | | | | | | | | | | it works, but it broke somewhere; it can't display the menu correctly.
* | | Core: Convert the searchdir function to CLiu Aleaxander2009-06-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | for now, almost all the stuff related to EXT have been converted to C, and fow my (limit) test, it works well. The getfssec function haven't converted to C, because it also be called from asm file, and I find it's a bit hard to convert it to C. But however, it's my next plan.
* | | extract the geting fs information code in asm to a C function fs_initLiu Aleaxander2009-06-031-0/+1
| | | | | | | | | | | | we use fs_init to initialize the fs information
* | | Convert the cache code to C and implement the core printf functionLiu Aleaxander2009-06-021-0/+1
|/ / | | | | | | | | | | | | | | | | for the cahce part, I do get the error message says that undefined reference to `getlinsec'. I'm abort to implement a C version one. for the printf function, it works somehow, but doesn't work well. With the test, it seems it can handle the format output correctly. And I haven't debugged it, so I have no idea for now.
* | prepcore: error out if the compressed image is too large to loadH. Peter Anvin2009-06-011-1/+1
| | | | | | | | | | | | | | | | Export, from each loader stage, the symbol MaxLMA which indicates to prepcore how big the image is allowed to be. Change prepcore to enforce this limit and to error out otherwise. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core/diskstart.inc: break transactions on 64K boundariesH. Peter Anvin2009-05-141-1/+3
| | | | | | | | | | | | | | getlinsec doesn't watch for 64K boundaries, so we need to do it ourselves. Break a loading run if we reach a 64K boundary. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core/diskstart: handle more than 2^16 dwordsH. Peter Anvin2009-05-141-10/+11
| | | | | | | | | | | | Handle more than 2^16 dwords in the checksumming loop. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: handle more than 32K of code for disk-based derivativesH. Peter Anvin2009-05-141-17/+39
| | | | | | | | | | | | | | | | | | | | | | | | Handle more than 32K worth of code for disk-based derivatives. We do this by allowing the sector pointers to overflow past sector 1; this is OK because we limit a run to be based on only the pointers that we have read so far. XXX: This is implemented for EXTLINUX, but breaks SYSLINUX. Need to update (and unify!) the SYSLINUX installers to cope. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: rename .text, .data and .bss to .text16, .data16, .bss16unify-pmH. Peter Anvin2009-05-131-1/+1
| | | | | | | | | | | | | | | | Rename the .text, .data and .bss sections to .text16, .data16 and .bss16, in anticipation of being linked with compiler-generated 32-bit code, which presumably would like to use the standard section names. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: zero bss and uibss; fix some section confusionsH. Peter Anvin2009-05-131-3/+4
| | | | | | | | | | | | | | | | | | | | | | Set .bss and .uibss as soon as we are fully loaded. This gives us the more familiar behavior of most normal execution environments. The .earlybss section is not zeroed; therefore, all variables that are set before we have the opportunity to zero need to go in this section. This checkin also fixes some incorrect section directives. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: move initial code to a new .init segment; unify .bss+.bss1H. Peter Anvin2009-05-131-2/+2
| | | | | | | | | | | | | | | | | | Move code used before loading is complete to a new .init segment; .text is now only the stuff that is used at any time. Move the .bss1 segment down to where .bss and .bss2 already are; it seems to fit better there now. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | New attempt at unify protected mode entry/exitH. Peter Anvin2009-05-131-1/+2
|/ | | | | | | | | Another attempt at unify protected mode entry/exit, based on the previous bcopyint branch. This should, among other things, give a "full service" PM environment including BIOS upcalls and interrupt service to the core-internal code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: merge the startup code for disk-based derivativesH. Peter Anvin2009-04-191-0/+681
Merge the startup code for disk-based derivatives (currently SYSLINUX, EXTLINUX) into a single file. There is probably still additional shared code that should be merged, but this is a good start. Signed-off-by: H. Peter Anvin <hpa@zytor.com>