| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The floppy table patching was somehow messed up when converting to
GPT. The proper offset of FloppyTable at the point we patch is
[di-12] and we use offset +4 inside that field.
Reported-by: Juergen <jlborries@online.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
| |
Put a magic signature at the end of the boot sector, and a backpointer
to the code that contains the pointer to the main code extent. This
is useful for integrity-checking tools, and could help the installer
in the future.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
We can save 8 bytes in the boot sector by moving writestr_early out
and putting the real routine in sector 1.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
EDD 4 has 16-byte device path information. Make the EDD buffer big
enough to capture that. Note that the location of the device path
checksum actually depends on the device path length information field!
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Currently, disk_init() can only be called once, and edd_params get
statically initialized to zero. This will change once this function
can be called more than once, and we depend on the pre-initialization
to zero to avoid known BIOS bugs.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
| |
|
|
|
|
| |
Split to allow it to be used by debugging/diagnostic images
|
|
|
|
|
| |
This allows another program to re-use the boot sector and define
different values, once split.
|
|
|
|
| |
Additional note on where it will cost to possibly not protect anything
|
|
|
|
|
|
| |
Sometimes INT13h AH08h kills ES to return info about a "floppy" (since
an unpartitioned HDD might look like a floppy). Also, change to tabs
on previous line.
|
|
|
|
|
|
|
| |
Apparently GNU Make 3.82 mishandles pattern rules with fixed
dependencies, sigh.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
HAS_LOCALBOOT is set unconditionally in config.inc.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
| |
In particular, somehow we failed to actually test for DS:SI = 0:0!
This tests both for SI < 16 and DS:SI < 1024. The former of those
tests is a bit iffy and probably should be removed.
This should also be promoted into isohdpfx.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
ld 2.20.51 seems to want the .bss16 explicitly marked (NOLOAD). We do
that for most of the other bss sections, so we might as well.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
Actually append the domain name to the end of an unqualified DNS name
like we should have done all along.
Reported-by: Gene Cumm <gene.cumm@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\ \
| | |
| | |
| | | |
'genec/sample-make-for-hpa', 'genec/drmk-ver-for-hpa' and 'genec/pxechain-for-hpa'
|
| | |
| | |
| | |
| | |
| | | |
Now that both scenarios are clear (do/do not call timer_cleanup/
timer_init), shorten it to eliminate a needless jmp.
|
| | |
| | |
| | |
| | | |
Both of these calls will not return if successful
|
| |/
|/|
| |
| |
| | |
Certain calls to the PXE stack could potentially remove us from
memory. Revert the INT 1Ch timer to its previous state.
|
|/
|
|
| |
writechr is found in other files and this prevents a compile error.
|
| |
|
|
|
|
|
|
|
|
| |
For web downloads, sometimes a mirror site will not be fully synced.
Add an option to retry the open a specific number of times before
giving up.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
| |
The disk number is set twice in diskio.c/edd_rdwr_sectors() this patch
removes the redundant setting.
|
|
|
|
|
|
|
|
| |
The Win7 MBR doesn't provide proper handover information. Instead, it
leaves DS:SI = 0:0x7e00, so reject that information as invalid on
grounds that it is pointed into the bootloader area.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__free_tagged called by comboot_cleanup_lowmem (core/mem/free.c) doesn't
seem to work correctly. Memory allocated with lmalloc() isn't marked as free
after the allocating module exits:
boot: mem
lowmem_buf: 0x000353e0
boot: mem
lowmem_buf: 0x000553f0
boot: mem
lowmem_buf: 0x00075400
boot: mem
lowmem_buf: 0x00000000
boot:
The expected behaviour
boot: mem
lowmem_buf: 0x000353e0
boot: mem
lowmem_buf: 0x000353e0
boot: mem
lowmem_buf: 0x000353e0
can be achieved with the following patch.
|
|
|
|
|
|
|
| |
Rather than opencoding the arithmetic flag mask, define an inline to
make that happen properly.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
If we can't find a configuration file, we need to do something
slightly more friendly than hanging.
Reported-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
parse_dotquad() incorrectly returned output in host byte order.
Reported-by: Alexander Wuerstlein <arw@arw.name>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Make sure we don't overflow the shift, even though that should never
be possible.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the name for the incorrectly named "t" (track) field; it is in
fact the sectors/cylinder (secpercyl) field. Furthermore, remove the
completely unused "type" field... right now the pointer to the
rdwr_sectors field acts as a proxy, and if we need more complex stuff
in the future it is probably better handled by pointing to an ops
structure.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Use the centrally coded ilog2() function.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Expand most fields in struct disk to 32 bits -- it makes the code
smaller in general, and struct disk is not a common data element.
Add a field for the number of tracks (number of heads*sectors).
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
It really makes more sense in chs_rdwr_sectors()...
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Make sure we don't end up trying to do a CHS request for a truly
absurd value, that could possibly be misconverted.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
When we decide to go from EDD to CHS, make sure we convert from
absolute back to a partition offset. The cylinder check should still
be on the absolute value, however.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
The sector count cap on CHS is automatically given as a result of the
no-track-crossing rule.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
At least one system has been found which require fallback from EDD to
CHS, so actually make it doable.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
If we find compressed or encrypted data, print an error message
instead of returning garbage. This is suboptimal, but at least
handles the common subcase of an encrypted configuration file.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
| |
Add a timer denominated in milliseconds. This is still driven by the
18.2 Hz timer interrupt, but counts "real" milliseconds, including
handing the adjustment factor (which in reality means it advances by
55 for most timer ticks and 54 for some.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Split loadconfig.c into two files. In particular, isolinux needs
search_config() but not generic_load_config().
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Merge the config file searching code between syslinux and isolinux,
and make isolinux also recognize the generic names "syslinux" and
"syslinux.cfg". Thus, isolinux now searches for configuration files
in the following order:
/boot/isolinux/isolinux.cfg
/boot/isolinux/syslinux.cfg
/isolinux/isolinux.cfg
/isolinux/syslinux.cfg
/boot/syslinux/isolinux.cfg
/boot/syslinux/syslinux.cfg
/syslinux/isolinux.cfg
/syslinux/syslinux.cfg
/isolinux.cfg
/syslinux.cfg
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
The FAT installers may not produce a canonical pathname in the
CurrentDirName field on entry. Make sure that the core doesn't croak
when that happens, and still produces an absolute pathname for the
configuration file.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Add a new IPAPPEND option to generate a SYSUUID= option with the
in-system UUID.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
| |
As documented in the old assembly code, reset the disk controller
between retries when using EDD. We don't want to do that for CHS,
since a reset shuts down the floppy motor, and we might be suffering a
timeout.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
We want to use VKernelBuf as temporary storage, not vk_append.
vk_append is an offset into a larger buffer, and we ended up
corrupting low BIOS memory.
Reported-by: Joseph Cihula <joseph.cihula@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
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>
|