| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Skip EDD and CHS detection if we know it is a CD-ROM, because some
CD-ROMs possibly report bad information, and/or screw up the stack,
possibly permanently.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
| |
Move the dprintfs to the location that they were intended to use.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
When we print an error message to the screen, include the error
number. Furthermore, dprintf it on retries.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
DL contains the initial drive number, don't clobber it!
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
|
|
|
| |
In native El Torito mode, there is no such thing as a partition
offset. Make sure that we set Hidden to zero -- we don't use Hidden
(yet, although the ebios and cdrom code should be merged!) but we pass
it to the PM code, which will produce *really* wrong results...
Reported-by: Helmut Hullen <Hullen@t-online.de>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
| |
Add a handful of dprintf's to make it easier to debug disk I/O
failures.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
|
|
|
| |
At least the ThinkPad T22 and T23 will incorrectly report a sector
size of 512 bytes for El Torito CD-ROMs. Ignore the reported sector
size for El Torito boots.
Reported-by: Helmut Hullen <hullen@t-online.de>
Tested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Collapse multiple slashes into one (this still doesn't resolve . and
.. in the path, since that requires awareness of symlinks.)
This code also avoids a copy-over-self bug by introducing a temporary
buffer.
Reported-by: Gene Cumm <gene.cumm@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When used with the "fs" option to chain.c32, we need to know our own
filesystem offset. That means knowing if we used the MBR vs GPT
partition information, as well as if we ended up using the passed-in
information or not.
Resolve this by providing an explicit pointer to the current partition
offset. Eventually this should be replaced by some kind of statfs()
call.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
Implement getcwd() in the core; Fix COM32 getcwd() to use the new function.
This resolves the previous comment about COM32 getcwd() not working by
not using INT 22h AX=001Fh.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
STACK32_LEN is already defined in layout.inc.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
We don't actually need recursion in put_inode(), so replace recursion
with a loop.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
Fix COM32 chdir() since it's implemented in the core.
Forgot the core changes needed for this before.
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Future-proof the pmapi vector by making it include its own size.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Some filesystems, including btrfs, don't have .. directory entries.
We already handle . in the filesystem core, handle .. as well.
This means keeping chains of parent inodes for all open inodes, at
least for the duration of a path search; we might as well hang onto
them.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
Initialize the block cache at the very start. The block size for
btrfs is fixed, and so we can start by initializing the cache. That
eliminates a whole bunch of unnecessary I/O as well as extra code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
When looking for the current superblock, don't read past the end of
the disk. This more or less assumes that the superblocks are
reasonably consistent with regards to the total filesystem size.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Be a bit more explicit about the particular errors we see.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
| |
Due to double use of the variable "buf", we would end up corrupting
the length, but not the contents, of an RRQ packet if we ended up
having to re-send. Some TFTP servers ignored the extra garbage
(including tftp-hpa), others would refuse to accept the RRQ, causing
failures.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
|
| |
For somewhat unclear reasons, the PXE unload sequence took the old PXE
path (pre-2.00 API). Take the new sequence if available. Also
improve the error message.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Make it easier to read, but fix the address for the loopback network
(127, not 255).
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Enforce that the file type in open_file is a plain file.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Don't allow opendir() on a non-directory.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
All "files" on PXE are regular files (there is no official directory
mechanism) and so, at least for now, it's all DT_REG.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Fix the timeout logic for RRQ, to avoid a spew of identical RRQ
packets which at best will annoy the server.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
| |
Fix several buffer-handling bugs in DHCP parsing and in the config
file selection.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
| |
The UUID string was generated incorrectly, starting over for each
component.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
cfarcall does not take a register image on input, so we need to
explicitly preserve IF in the code flow.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
| |
We already had two MBZ fields reserved, so use one of them to expand
into a 64-bit LBA.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
|
|
| |
The top 40 bits of the LBA must be zero on CHS mode. Enforce this,
and also fix leak of the drive number into a divide instruction with
resulting overflow.
Reported-by: Gert Hulselmans <gerth@zytor.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
| |
In .bss sections use alignb, not alignz.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
Make sure the timeout actually gets processed. The right thing to do
for the receive loop is to check for timeout, then try to receive, and
loop until an acceptable packet has been received; we might as well do
that explicitly.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
| |
An intcall should always be invoked with interrupts off, but that is
not necessarily the case for a near or far call; in fact it is quite
the exception. As such, do not filter IF in our register image, and
for our own internal call16() interface, propagate the protected-mode
IF value into real mode, just as we do for the pm_call interface.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
When we have lost packets in DNS resolution, or otherwise no
response, both rotate through the known servers and advance through
the timeout table.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Properly null-terminate the output from a parsed tftp:// URL.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Correct the parsing of tftp:// URLs. DNS handling still needs to be
unbroken.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Fix reversed test for tftp URLs
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Align the Extended Patch Area.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
Merge the SYSLINUX and EXTLINUX patching code and core code, removing
EXTLINUX as a separate derivative. All the disk-based systems now use
the same code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
IP information is IPv4 for now.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
| |
Remove debugging printf added for testing.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
|
|
| |
It appears that there still are PXE stacks in the field which needs
the crutch of being pointed to the default gateway. As such, put all
the IP information into a single memory structure and allow modules to
see it.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|