321071 |
17-Jul-2017 |
delphij |
MFC r320468:
Don't bother to set target for SEEK_END.
While there also collapase SEEK_END into default case in lseek. |
312403 |
19-Jan-2017 |
delphij |
MFC r293040,293341,293435:
Reduce libstand Makefile duplication.
PR: 216251 |
312375 |
18-Jan-2017 |
delphij |
MFC r311275: Restructure libz. |
307203 |
13-Oct-2016 |
sephe |
MFC 305588
pxeboot: Add nfs.read_size tunable.
Increase this tunable improves kernel loading speed.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: rpokala, wblock (previous version) Obtained from: DragonFlyBSD Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7756 |
301056 |
31-May-2016 |
ian |
MFC r297147, r297148, r297149, r297150, r297151:
Make both the loader and kernel use the interface-mtu option if the dhcp server provides it. Made up of these (semi-)related changes...
[kernel...] If the dhcp server provides an interface-mtu option, parse the value and set that mtu on the interface.
[libstand...]
Garbage collect the bswap routines from libstand, use sys/endian.h.
If the dhcp server delivers an interface-mtu option, parse it and store the value in a new global intf_mtu for use by the application.
[loader...]
If the dhcp server provided an interface-mtu option, transcribe the value to the boot.netif.mtu env var, which will be picked up by pre-existing code in nfs_mountroot() and used to configure the interface accordingly.
PR: 187094 |
294462 |
20-Jan-2016 |
ian |
Add strlcat and strlcpy to libstand on ia64. This is conceptually part of the MFC done in r294342, but since ia64 is gone in -current this is a direct commit to 10-stable to add the functions. |
294343 |
19-Jan-2016 |
ian |
MFC r292583:
Allow dhcp/bootp server-provided values to be overriden from environment variables in loader(8) and other libstand applications.
Sometimes a dhcp server provides incorrect information along with the IP address. It would be useful to have a way to override this with locally-supplied information, such as command line parameters passed from a prior-stage bootloader. This change allows pre-existing env vars to take precedence over values delivered by the dhcp or bootp server.
The bootp/dhcp code in libstand automatically creates environment variables from the data provided by the server (dhcp.root-path, dhcp.domain-name, etc). It also transcribes the values to some global variables such as 'rootpath' and 'hostname'.
This change does two things:
When adding dhcp.* vars to the environment, don't replace existing vars/values.
When setting the global vars rootpath and hostname, use the dhcp.root-path and dhcp.host-name env var values if they exist.
This allows the platform-specific part of loader(8) to obtain override values in some platform-specific way and store them in the environment before opening the network device. The set of values that can be overriden is currently limited to just string options. The values that are delivered as binary data are things that probably shouldn't be overridden (IP, netmask, gateway, etc).
The original patch this evolved from was submitted by martymac@
PR: 202098 Relnotes: Yes |
294342 |
19-Jan-2016 |
ian |
MFC r292234, r292527:
Add strlcat() and strlcpy() to libstand and libstand32. |
281321 |
09-Apr-2015 |
jhb |
MFC 279949: The System V ABI for amd64 allows functions to use space in a 128 byte redzone below the stack pointer for scratch space and requires interrupt and signal frames to avoid overwriting it. However, EFI uses the Windows ABI which does not support this. As a result, interrupt handlers in EFI push their interrupt frames directly on top of the stack pointer. If the compiler used the red zone in a function in the EFI loader, then a device interrupt that occurred while that function was running could trash its local variables. In practice this happens fairly reliable when using gzipfs as an interrupt during decompression can trash the local variables in the inflate_table() function resulting in corrupted output or hangs.
Fix this by disabling the redzone for amd64 EFI binaries. This requires building not only the loader but any libraries used by the loader without redzone support.
Thanks to Jilles for pointing me at the redzone once I found the stack corruption. |
281317 |
09-Apr-2015 |
jhb |
MFC 279931: Spin the twiddle in dosfs to give visual feedback for disk I/O on FAT filesystems as is done for other filesystems in the loader. |
278602 |
11-Feb-2015 |
ian |
MFC r276079, r276087:
Add a divisor parameter to twiddle() so that callers can request that output only happen on every Nth call.
Add a new loader(8) variable, twiddle_divisor, allowing control over the output frequency of the "twiddle" IO progress indicator. |
277194 |
14-Jan-2015 |
nwhitehorn |
MFC r276412:
Fix loader's ability to read the 10.1 release PowerPC ISOs. There appears to be some kind of problem with the version of makefs used for these disks. There may be a better way to handle this problem, so I've set the MFC timer for a fairly long time period. |
273664 |
26-Oct-2014 |
ian |
MFC r266878, r266879: Add support for snprintf() to libstand. |
271135 |
04-Sep-2014 |
emaste |
MFC UEFI loader
This MFC consists of the following SVN revisions: 258741 261568 261603 261668 263115 263117 263968 264078 264087 264088 264092 264095 264115 264132 264208 264261 264262 264263 264319 265028 265057 268974
Detailed commit messages:
r258741: Note that libstand is 32-bit on amd64 and powerpc64
r261568: Build libstand as a 64-bit library on amd64
The 32-bit bootloaders now link against libstand.a in sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a to be 32-bit.
r261603: Don't force efi to a 32-bit build on amd64
r261668: Build libstand as a 64-bit library on ppc64
The 32-bit bootloaders now link against libstand.a in sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a to be 32-bit.
This is equivalent to r261568 for amd64.
r263115: Add amd64 EFI headers
r263117: Connect 64-bit boot ficl to the build
It is not yet used, but this will ensure it doesn't get broken.
r263968: Use EFI types for EFI values (silences warnings).
EFI UINTN is actually a 64-bit type on 64-bit processors.
r264078: Put each source file on a separate line
This will simplify rebasing the amd64 UEFI patch set.
r264087: Build boot/ficl as 64-bit library on amd64
The 32-bit bootloaders on amd64 now use the 32-bit version in ficl32, as is done with libstand32. The native 64-bit ficl will be used by the upcoming UEFI loader.
r264088: Merge efilib changes from projects/uefi
r247216: Add the ability for a device to have an "alias" handle.
r247379: Fix network device registration.
r247380: Adjust our load device when we boot from CD under UEFI.
The process for booting from a CD under UEFI involves adding a FAT filesystem containing your loader code as an El Torito boot image. When UEFI detects this, it provides a block IO instance that points at the FAT filesystem as a child of the device that represents the CD itself. The problem being that the CD device is flagged as a "raw device" while the boot image is flagged as a "logical partition". The existing EFI partition code only looks for logical partitions and so the CD filesystem was rendered invisible.
To fix this, check the type of each block IO device. If it's found to be a CD, and thus an El Torito boot image, look up its parent device and add that instead so that the loader will then load the kernel from the CD filesystem. This is done by using the handle for the boot filesystem as an alias.
Something similar to this will be required for booting from other media as well as the loader will live in the EFI system partition, not on the partition containing the kernel.
r247381: Remove a scatalogical debug printf that crept in.
r264092: Add -fPIC for amd64
r264095: Support UEFI booting on amd64 via loader.efi
This is largely the work from the projects/uefi branch, with some additional refinements. This is derived from (and replaces) the original i386 efi implementation; i386 support will be restored later.
Specific revisions of note from projects/uefi:
r247380:
Adjust our load device when we boot from CD under UEFI.
The process for booting from a CD under UEFI involves adding a FAT filesystem containing your loader code as an El Torito boot image. When UEFI detects this, it provides a block IO instance that points at the FAT filesystem as a child of the device that represents the CD itself. The problem being that the CD device is flagged as a "raw device" while the boot image is flagged as a "logical partition". The existing EFI partition code only looks for logical partitions and so the CD filesystem was rendered invisible.
To fix this, check the type of each block IO device. If it's found to be a CD, and thus an El Torito boot image, look up its parent device and add that instead so that the loader will then load the kernel from the CD filesystem. This is done by using the handle for the boot filesystem as an alias.
Something similar to this will be required for booting from other media as well as the loader will live in the EFI system partition, not on the partition containing the kernel.
r246231:
Add necessary code to hand off from loader to an amd64 kernel.
r246335:
Grab the EFI memory map and store it as module metadata on the kernel.
This is the same approach used to provide the BIOS SMAP to the kernel.
r246336:
Pass the ACPI table metadata via hints so the kernel ACPI code can find them.
r246608:
Rework copy routines to ensure we always use memory allocated via EFI.
The previous code assumed it could copy wherever it liked. This is not the case. The approach taken by this code is pretty ham-fisted in that it simply allocates a large (32MB) buffer area and stages into that, then copies the whole area into place when it's time to execute. A more elegant solution could be used but this works for now.
r247214:
Fix a number of problems preventing proper handover to the kernel.
There were two issues at play here. Firstly, there was nothing preventing UEFI from placing the loader code above 1GB in RAM. This meant that when we switched in the page tables the kernel expects to be running on, we are suddenly unmapped and things no longer work. We solve this by making our trampoline code not dependent on being at any given position and simply copying it to a "safe" location before calling it.
Secondly, UEFI could allocate our stack wherever it wants. As it happened on my PC, that was right where I was copying the kernel to. This did not cause happiness. The solution to this was to also switch to a temporary stack in a safe location before performing the final copy of the loaded kernel.
r246231:
Add necessary code to hand off from loader to an amd64 kernel.
r246335:
Grab the EFI memory map and store it as module metadata on the kernel.
This is the same approach used to provide the BIOS SMAP to the kernel.
r246336:
Pass the ACPI table metadata via hints so the kernel ACPI code can find them.
r246608:
Rework copy routines to ensure we always use memory allocated via EFI.
The previous code assumed it could copy wherever it liked. This is not the case. The approach taken by this code is pretty ham-fisted in that it simply allocates a large (32MB) buffer area and stages into that, then copies the whole area into place when it's time to execute. A more elegant solution could be used but this works for now.
r247214:
Fix a number of problems preventing proper handover to the kernel.
There were two issues at play here. Firstly, there was nothing preventing UEFI from placing the loader code above 1GB in RAM. This meant that when we switched in the page tables the kernel expects to be running on, we are suddenly unmapped and things no longer work. We solve this by making our trampoline code not dependent on being at any given position and simply copying it to a "safe" location before calling it.
Secondly, UEFI could allocate our stack wherever it wants. As it happened on my PC, that was right where I was copying the kernel to. This did not cause happiness. The solution to this was to also switch to a temporary stack in a safe location before performing the final copy of the loaded kernel.
r247216:
Use the UEFI Graphics Output Protocol to get the parameters of the framebuffer.
r264115: Fix printf format mismatches
r264132: Connect sys/boot/amd64 to the build
r264208: Do not build the amd64 UEFI loader with GCC
The UEFI loader causes buildworld to fail when building with (in-tree) GCC, due to a typedef redefinition. As it happens the in-tree GCC cannot successfully build the UEFI loader anyhow, as it does not support __attribute__((ms_abi)). Thus, just avoid trying to build it with GCC, rather than disconnecting it from the build until the underlying issue is fixed.
r264261: Correct a variable's type for 64-bit Ficl
FICL_INT is long.
r264262: Fix printf args for 64-bit archs
r264263: Add explicit casts to quiet warnings in libefi
r264319: Fix EFI loader object tree creation on 9.x build hosts
Previously ${COMPILER_TYPE} was checked in sys/boot/amd64, and the efi subdirectory was skipped altogether for gcc (since GCC does not support a required attribute). However, during the early buildworld stages ${COMPILER_TYPE} is the existing system compiler (i.e., gcc on 9.x build hosts), not the compiler that will eventually be used. This caused "make obj" to skip the efi subdirectory. In later build stages ${COMPILER_TYPE} is "clang", and then the efi loader would attempt to build in the source directory.
r265028 (dteske): Disable the beastie menu for EFI console ...
which doesn't support ANSI codes (so things like `at-xy', `clear', and other commands don't work making it impossible to generate a living menu).
r265057 (nwhitehorn): Turn off various fancy instruction sets...
as well as deduplicate some options. This makes the EFI loader build work with CPUTYPE=native in make.conf on my Core i5.
r268974 (sbruno): Supress clang warning for FreeBSD printf %b and %D formats
Relnotes: Yes Sponsored by: The FreeBSD Foundation |
271134 |
04-Sep-2014 |
emaste |
MFC r269077 (sbruno): libstand qdivrem warning fixes
libstand's qdivrem.c assumes that sizeof(int) == sizeof(long), this is not true on amd64 I'm not quite positive this is the "correct" solution for this but it does seem to compile and shut up the spew of warnings when compiling libstand for userboot.
Add two _Static_asserts() so that in the future somebody will get a compile failure if an architecture develops that violates the assumptions of this code. (strongly suggested by jmg)
Change commetns to indicate int types instead of long. (noted by ian in phabric review)
Phabric: https://phabric.freebsd.org/D443 |
271129 |
04-Sep-2014 |
emaste |
MFC r261591 (nwhitehorn):
Make libstand setjmp work for both 64- and 32-bit ABIs. |
269101 |
25-Jul-2014 |
ian |
MFC r261530
Set the malloc alignment to 64 bytes on platforms that use the U-Boot API device drivers. Recent versions of u-boot run with the MMU enabled, and require DMA-based I/O to be aligned to cache line boundaries. |
260096 |
30-Dec-2013 |
dim |
MFC r257532 (by adrian):
Fix this build for clang.
MFC r259730:
To avoid having to explicitly test COMPILER_TYPE for setting clang-specific or gcc-specific flags, introduce the following new variables for use in Makefiles:
CFLAGS.clang CFLAGS.gcc CXXFLAGS.clang CXXFLAGS.gcc
In bsd.sys.mk, these get appended to the regular CFLAGS or CXXFLAGS for the right compiler.
MFC r259913:
For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc.
MFC r259927:
Fix pc98 build, by also forcing COMPILER_TYPE in sys/boot/pc98/boot2's Makefile.
Pointy hat to: dim |
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
256244 |
09-Oct-2013 |
kan |
Unbreak zfsloader with LOADER_TFTP_SUPPORT on
Only accept 'net' and 'pxe' devices as underlying transport in tftp.c on x86. Prior to this change tftp code would attempt to send packets over any boot device, including zfs one with predictably sad results.
Approved by: re (gjb) MFC After: 1 month
|
252468 |
01-Jul-2013 |
mav |
Move pos++ out of the complicated equation, introduced at r240780. There is an oppinion that result of that equation is compiler-specific.
Submitted by: dt71@gmx.com, kientzle Reviewed by: rmacklem MFC after: 3 days
|
251561 |
09-Jun-2013 |
pfg |
libstand: Reset the seek pointer in ext2fs as done in UFS.
Based on r134760:
Reset the seek pointer to 0 when a file is successfully opened, since otherwise the initial seek offset will contain the directory offset of the filesystem block that contained its directory entry. This bug was mostly harmless because typically the directory is less than one filesystem block in size so the offset would be zero. It did however generally break loading a kernel from the (large) kernel compile directory.
Also reset the seek pointer when a new inode is opened in read_inode(), though this is not actually necessary now because all callers set it afterwards.
PR: 177328 Submitted by: Eric van Gyzen Reviewed by: iedowse MFC after: 5 days
|
251508 |
07-Jun-2013 |
andrew |
Remove an extra copy of _setjmp from libstand. We have used the libc version of this function since r183876.
|
250023 |
28-Apr-2013 |
rwatson |
Enable building string functions as part of libstand on mips; the Makefile is a bit obfuscated here, as ia64 adds string source files elsewhere, so simply exclude it here.
Reviewed by: imp MFC after: 3 days Sponsored by: DARPA, AFRL
|
250020 |
28-Apr-2013 |
rwatson |
Merge @228176 from Perforce to fix a bug introduced in r249553:
Trim two now-unneeded (and likely harmful) lines from the libstand setjmp/longjmp for MIPS.
Spotted by: jmallett
MFC after: 3 days Sponsored by: DARPA, AFRL
|
249554 |
16-Apr-2013 |
rwatson |
Use a suitable code generation when building libstand for MIPS.
Reviewed by: imp Sponsored by: DARPA, AFRL MFC after: 3 days
|
249553 |
16-Apr-2013 |
rwatson |
Adapt libstand's setjmp/longjmp MIPS support to be portable across 32-bit and 64-bit MIPS. Don't use the floating-point coprocessor in the libstand context for MIPS.
Reviewed by: imp MFC after: 3 days Sponsored by: DARPA, AFRL
|
247912 |
07-Mar-2013 |
andrew |
Add __clzsi2 and ctzsi2. They are required on ARMv4 and ARMv5 to implement a number of builtin functions.
|
247613 |
02-Mar-2013 |
marcel |
Make this WARNS=9 clean on i386 w/ clang.
|
247612 |
02-Mar-2013 |
marcel |
Fix warnings (control reaches end of non-void function).
|
247611 |
02-Mar-2013 |
marcel |
Fix nandfs support by providing the same crc32 function as is used in newfs_nandfs. In libstand we get crc32 from libz. The polynomial is not the same as used for nandfs, which is the crc32 used in the kernel.
|
247001 |
19-Feb-2013 |
kientzle |
Fix includes for use in libstand.
|
246931 |
18-Feb-2013 |
kientzle |
Add strtoul() to libstand by copying from libc and clipping out locale code.
|
246369 |
05-Feb-2013 |
andrew |
* Add the integer div & mod functions and ARM EABI support functions to libstand. * Stop linking the ARM U-Boot loader against libgcc now libstand has the required symbols.
|
246094 |
29-Jan-2013 |
glebius |
Remove unused file.
|
244537 |
21-Dec-2012 |
rpaulo |
Move the 64-bit _setjmp to lib/libstand.
|
241157 |
03-Oct-2012 |
gber |
Correct detection of a superblock.
Obtained from: Smartcom Bulgaria AD
|
240881 |
24-Sep-2012 |
kevlo |
Revert r240850 and remove redundant NULL check before free(3). free(3) handles NULL parameter fine.
Reviewed by: kib, Garrett Cooper
|
240850 |
23-Sep-2012 |
kevlo |
Avoid NULL dereference
|
240780 |
21-Sep-2012 |
mav |
Make nfs_readdir() more careful about using response data, cached in global buffer. For now it fixes bug when following `ls` command will return data from previous one aborted by pager. Also it should allow to read several directories same time, for example, for recursive tracerse.
|
240774 |
21-Sep-2012 |
mav |
Don't use global nfs_root_node variable as per-file storage. There are fields that should be file-specific.
|
237410 |
21-Jun-2012 |
delphij |
MFV: Update zlib to 1.2.7.
(x86 assembler optimization disabled for now because it requires the new .cfi_* directives that is not supported by base system binutils).
MFC after: 1 week
|
235939 |
24-May-2012 |
obrien |
Consitently use "__LP64__". [there are 33 __LP64__'s in the kernel (minus cddl/ and contrib/), and 11 _LP64's]
|
235537 |
17-May-2012 |
gber |
Import work done under project/nand (@235533) into head.
The NAND Flash environment consists of several distinct components: - NAND framework (drivers harness for NAND controllers and NAND chips) - NAND simulator (NANDsim) - NAND file system (NAND FS) - Companion tools and utilities - Documentation (manual pages)
This work is still experimental. Please use with caution.
Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks
|
229403 |
03-Jan-2012 |
ed |
Replace index() and rindex() calls with strchr() and strrchr().
The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard.
This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls.
|
229368 |
03-Jan-2012 |
ed |
Merge index() and strchr() together.
As I looked through the C library, I noticed the FreeBSD MIPS port has a hand-written version of index(). This is nice, if it weren't for the fact that most applications call strchr() instead.
Also, on the other architectures index() and strchr() are identical, meaning we have two identical pieces of code in the C library and statically linked applications.
Solve this by naming the actual file strchr.[cS] and let it use __strong_reference()/STRONG_ALIAS() to provide the index() routine. Do the same for rindex()/strrchr().
This seems to make the C libraries and static binaries slightly smaller, but this reduction in size seems negligible.
|
228798 |
22-Dec-2011 |
ed |
Add placeholder code for prepending pathnames to tftp.
At work we have a single tftp server that provides installation data for a variety of operating systems. I'd rather place our FreeBSD-related files in a subdirectory, instead of the root.
It would be nice if this setting could be run-time configurable, but at least in our specific case, this is not possible, as pxeboot is chainloaded through pxelinux.
Sponsored by: Kumina bv
|
223905 |
10-Jul-2011 |
avatar |
- Removing some unneeded definitions of NULL(cruft related to 1970's C). In C90, NULL is guaranteed to be declared in <stddef.h> and also in <string.h>. Though the correct way to define NULL in FreeBSD is to include <sys/_null.h>, other parts of libstand still require <string.h> to build; therefore, we keep <string.h> in stand.h and add a note about this; - Removing no longer used 'Prototype' definition. Quote from bde@:
'Cruft related to getting incomplete struct declarations within prototypes forward-declared before the structs. It doesn't mean "prototype" but only part of a prototype-related hack. No longer used.'
- Replacing iaddr_t with uintptr_t; - Removing use of long double to determine alignment. Use a fixed 16 byte alignment instead;
Reviewed by: bde Obtained from: DragonFlyBSD (partially) MFC after: 1 month
|
223904 |
10-Jul-2011 |
kevlo |
style(9) cleanup
|
223854 |
08-Jul-2011 |
avatar |
Fixing building bustage on 32 bits platforms when WARNS >= 2. Note that this fix only applies to zalloc.c, the other part of libstand such like qdivrem.c still gives compilation warnings on sparc64 tinderbox builds; therefore, WARNS level isn't changed for now.
Submitted by: Garrett Cooper <yanegomi@gmail.com> Reviewed by: bde
|
223488 |
24-Jun-2011 |
rodrigc |
Fixes to newer tftp code in libstand: (1) Coding style changes. (2) If the server does not acknowledge any blocksize option, revert to the default blocksize of 512 bytes. (3) Send ACK if the first packet happens to be the last packet. (4) Do not accept blocksize greater than what was requested. (5) Drop any unwanted OACK received if a tftp transfer is already in progress. (6) Terminate incomplete transfers with a special no-error ERROR packet. Otherwise we rely on the tftp server to time out, which it does eventually, after re-sending the last packet several times and spamming the system log about it every time. This idea is borrowed from the PXE client, which does exactly that.
Submitted by: Alexander Kabaev <kan@FreeBSD.org> Reviewed and Tested by: Santhanakrishnan Balraj <sbalraj at juniper dot net>
|
223156 |
16-Jun-2011 |
imp |
Setting warnings without make universe considered harmful. Revert to WARNS=0 until such time that the warnings at =2 are fixed for all platforms.
|
223151 |
16-Jun-2011 |
avatar |
Using the correct format string(%zu) for size_t type. This should fix 64 bits builds.
Submitted by: Garrett Cooper <yanegomi@gmail.com>
|
223139 |
16-Jun-2011 |
avatar |
Unbreaking build on sparc64.
Submitted by: Garrett Cooper <yanegomi@gmail.com>
|
223128 |
15-Jun-2011 |
rodrigc |
Bring back following change which was undone in previous commit:
------------------------------------------------------------------------ r172854 | marius | 2007-10-21 10:03:18 -0700 (Sun, 21 Oct 2007) | 16 lines Changed paths: M /head/lib/libstand/tftp.c
- Given that we tell the compiler that struct ip is packed and 32-bit aligned, GCC 4.2.1 also generates code for sendudp() that assumes this alignment. GCC 4.2.1 however doesn't 32-bit align wbuf, causing the loader to crash due to an unaligned access of wbuf in sendudp() when netbooting sparc64. Solve this by specifying wbuf as packed and 32-bit aligned, too. As for lastdata and readudp() this currently is no issue when compiled with GCC 4.2.1, though give lastdata the same treatment as wbuf for consistency and possibility of being affected in the future. [1] - Sprinkle const on a lookup table. ------------------------------------------------------------------------
|
223125 |
15-Jun-2011 |
rodrigc |
Increase WARNS level to 2.
|
223124 |
15-Jun-2011 |
rodrigc |
(1) When sending the TFTP RRQ packet to read a file, send along the "blksize" option specified in RFC2348, and the "tsize" option specified in RFC2349.
Add code to parse the TFTP Option Acknowledgement (OACK) packet as specified in RFC2347.
For TFTP servers which support the "blksize" option, we can specify a TFTP Data block size larger than the default 512 bytes specified in RFC1350. This offers greater read performance when downloading files.
We request an initial size of 1428 bytes, which is less than the Ethernet MTU of 1500 bytes. If the TFTP server sends back an OACK packet, then use the block size specified in the OACK packet. Most times it is usually the same value as what we request. If the TFTP server supports RFC2348, we will see performance improvements by transferring files over TFTP with larger block sizes.
If we do not get back an OACK packet, then we most likely we are interoperating with a legacy TFTP server that does not support TFTP extension options, so default to the block size of 512 bytes.
(2) If the "tftp.blksize" environment variable is set, then take that value and use it when sending the TFTP RRQ packet, instead of 1428. This allows us to set different values of "tftp.blksize" in the loader, so that we can test out different TFTP block sizes at run time.
Obtained from: Juniper Networks Fixed by: rodrigc
|
223123 |
15-Jun-2011 |
rodrigc |
Currently tftp code in the loader retransmits the previous packet if it receives any unwanted packet(non-tftp). Change this to retransmit the packet(request or ack) only after a timeout.
Obtained from: Juniper Networks Fixed by: Santhanakrishnan Balraj <sbalraj at juniper dot net>
|
223122 |
15-Jun-2011 |
rodrigc |
Added sendrecv_tftp function instead of sendrecv for use by tftp. In sendrecv_tftp: * Upon receving an unexpected block of data or error, resend the ACK immediately instead of waiting till the expiry of receive data timeout to resend the ACK. * change the receive timeout value between retries to be 2xMINTMO.
Obtained from: Juniper Networks Fixed by: Santhanakrishnan Balraj <sbalraj at juniper dot net>
|
223121 |
15-Jun-2011 |
rodrigc |
In sendrecv function, change the receive timeout value between retries to increase in steps of MINTMO, instead of doubling the timeout for every retry.
Obtained from: Juniper Networks Fixed by: Santhanakrishnan Balraj <sbalraj at juniper dot net>
|
222908 |
10-Jun-2011 |
rodrigc |
Obtain bswap64() function implementation from version 1.3 of src/common/lib/libc/gen/bswap64.c in NetBSD.
Obtained from: NetBSD
|
221366 |
03-May-2011 |
rodrigc |
Rename DEBUG macro to TFTP_DEBUG, to be more consistent with debug macros in other files.
|
221365 |
03-May-2011 |
rodrigc |
- Comment out unused variable. - Add parentheses around expression to eliminate compiler warning.
|
221364 |
03-May-2011 |
rodrigc |
Add #include <netinet/in_pcb.h> for missing forward declation of struct inpcb.
|
221358 |
03-May-2011 |
rodrigc |
Switch to ANSI function prototypes in a few places. Get rid of some unused parameter warnings.
|
218909 |
21-Feb-2011 |
brucec |
Fix typos - remove duplicate "the".
PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
|
217033 |
05-Jan-2011 |
dim |
On i386 and amd64, consistently use the following options whenever we want to avoid using any "advanced" CPU features:
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
|
217029 |
05-Jan-2011 |
dim |
In lib/libstand, sys/boot/ficl and sys/boot/zfs, -mno-sse3 should also be used for amd64, not just for i386.
|
213573 |
08-Oct-2010 |
uqs |
mdoc: drop redundant .Pp and .LP calls
They have no effect when coming in pairs, or before .Bl/.Bd
|
213235 |
28-Sep-2010 |
emaste |
Increase maximum network timeout from 20s to 120s. Given that an ETIMEDOUT return from sendrecv probably means a failure to boot we might as well be generous in the timeout period.
|
212125 |
02-Sep-2010 |
rmacklem |
Modify lib/libstand/nfs.c to use NFSv3 instead of NFSv2. This allows the nfs_getrootfh() function to return the correct file handle size to pxe.c for pxeboot. It also results in NFSv2 no longer being used by default anywhere in FreeBSD. If built with OLD_NFSV2 defined, the old code that predated this patch will be built and NFSv2 will be used.
Tested by: danny at cs.huji.ac.il MFC after: 2 weeks
|
211725 |
23-Aug-2010 |
imp |
MFtbemd:
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform.
|
209949 |
12-Jul-2010 |
jkim |
Use type-specific inline function imax() instead of deprecated macro MAX().
Prodded by: bde
|
209882 |
10-Jul-2010 |
nwhitehorn |
Teach libstand what to do for powerpc64: the same thing as powerpc. Like amd64, libstand apps for powerpc64 systems are 32-bit, due to 32-bit Open Firmware implementations.
|
209842 |
09-Jul-2010 |
jkim |
Fix build by defining MAX() macro here.
|
209837 |
08-Jul-2010 |
jkim |
Sync. printf() of libstand(3) with sys/kern/subr_prf.c.
CVS r1.94 jhb: Cast the integer read as the first argument for %b to an unsigned integer so it's value is not sign extended when assigned to the uintmax_t variable used internally by printf. For example, if bit 31 is set in the cpuid feature word, then %b would print out the initial value as a 16 character hexadecimal value. Now it only prints out an 8 character value.
CVS r1.109 njl: Add support for 'h' and 'hh' modifiers for printf(9).
CVS r1.117 phk: If we ignore an unknown % sequence, we must stop interpreting the remaining % arguments because the varargs are now out of sync and there is a risk that we might for instance dereference an integer in a %s argument.
SVN r209836 jkim: Implement optional 'precision' for numbers. Previously, it was parsed but ignored. Some third-party modules (e.g., APCICA) prefer this format over zero padding flag '0'.
|
205900 |
30-Mar-2010 |
jhb |
Use panic() (which the environment is required to provide to libstand) to implement assert() instead of relying on a non-required exit(). The exit() invocation also did not match the semantics of the exit() routine that current boot environments happen to require.
PR: kern/144749 Discussed with: bde MFC after: 1 week
|
205273 |
18-Mar-2010 |
delphij |
Remove two pieces of code (one disabled in revision 39665 and another derived from the first one) that is not used for the last 12 years.
|
202585 |
18-Jan-2010 |
avg |
fix a comment typo
MFC after: 3 days
|
201937 |
09-Jan-2010 |
marcel |
Implement the fo_readdir method. This does not support long file names.
Obtained from: Juniper Networks, Inc. MFC after: 1 week
|
201381 |
02-Jan-2010 |
ed |
Build lib/ with WARNS=6 by default.
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and lower it when needed.
I'm setting WARNS?=0 for secure/. It seems secure/ includes the Makefile.inc provided by lib/. I'm not going to touch that directory. Most of the code there is contributed anyway.
|
200919 |
23-Dec-2009 |
jhb |
Fix a bug in gzipfs that prevented lseek() from working and add lseek() support to bzip2fs. This fixes problems with loading compressed amd64 kernel modules containing debug symbols.
Submitted by: David Naylor naylor.b.david (gmail) MFC after: 1 week
|
198941 |
05-Nov-2009 |
marcel |
IP_TTL is an IP socket option, not a TTL value. Use IPDEFTTL instead.
|
198542 |
28-Oct-2009 |
brueffer |
Initialize f_rabuf in the raw device case. A subsequent close() later on would try to free it, leading to a crash.
PR: 93998 Submitted by: neel MFC after: 1 week
|
197178 |
13-Sep-2009 |
emaste |
ANSIfy, whitespace and comment adjustments, to simplify comparing these files with NetBSD / OpenBSD versions.
|
193189 |
31-May-2009 |
ed |
Fix minor issues in libstand.
- Don't call tftp_makereq() with too many arguments. - Don't forget to close one of the comments.
Submitted by: Pawel Worach
|
193145 |
31-May-2009 |
marcel |
Use GCC's __SOFTFP__ to test whether we're being compiled with softfloat or not. Now -msoft-float can be overridden more easily.
|
193109 |
30-May-2009 |
marcel |
Print the returned port number when RPC_DEBUG is defined. This improves debugging.
|
192760 |
25-May-2009 |
attilio |
Use, in uncovered part, the END() macro in order to improve debugging. In this specific case, Valgrind won't get confused when analyzing such functions.
Sponsored by: Sandvine Incorporated Tested by: emaste MFC: 3 days
|
192679 |
24-May-2009 |
dfr |
Increase the number of available file descriptors to 64. This fixes the reported zfsboot problems for systems where more than seven drives are part of ZFS pools.
|
190593 |
31-Mar-2009 |
jhb |
Fix an off-by-one buffer overflow in ngets().
Submitted by: Bruce Can MFC after: 1 month
|
188895 |
21-Feb-2009 |
ru |
Fix build when WITH_SSP is set explicitly.
Submitted by: Jeremie Le Hen
|
186799 |
05-Jan-2009 |
luigi |
put a prefix on dhcp options to avoid clobbering, even by mistake, existing environment variables.
MFC after: 2 weeks
|
186119 |
15-Dec-2008 |
qingli |
This main goals of this project are: 1. separating L2 tables (ARP, NDP) from the L3 routing tables 2. removing as much locking dependencies among these layers as possible to allow for some parallelism in the search operations 3. simplify the logic in the routing code,
The most notable end result is the obsolescent of the route cloning (RTF_CLONING) concept, which translated into code reduction in both IPv4 ARP and IPv6 NDP related modules, and size reduction in struct rtentry{}. The change in design obsoletes the semantics of RTF_CLONING, RTF_WASCLONE and RTF_LLINFO routing flags. The userland applications such as "arp" and "ndp" have been modified to reflect those changes. The output from "netstat -r" shows only the routing entries.
Quite a few developers have contributed to this project in the past: Glebius Smirnoff, Luigi Rizzo, Alessandro Cerri, and Andre Oppermann. And most recently:
- Kip Macy revised the locking code completely, thus completing the last piece of the puzzle, Kip has also been conducting active functional testing - Sam Leffler has helped me improving/refactoring the code, and provided valuable reviews - Julian Elischer setup the perforce tree for me and has helped me maintaining that branch before the svn conversion
|
185643 |
05-Dec-2008 |
luigi |
Some libstand/bootp.c extension (written by Danny Braniss, slightly revised/modified by me) to store dhcp options into kenv variables, so the information is available to the boot loader and can be used to customize the boot process.
The change is totally unintrusive, essentially made of a single function to be called while parsing a dhcp response, and a couple of tables to classify options. The values extracted from dhcp options are stored in the kenv environment in one of these forms:
+ options whose name and type is known are saved as dhcp.name = value (string, or number/ip addresses lists)
+ unknown options are assumed to be strings and saved as dhcp.option-NNN = "value"
+ options listed as '__INDIR' and sent on the wire as e.g. option unknown-252 "some.name=the actual value" are saved as some.name = "the actual value"
+ options listed as '__ILIST' and sent on the wire as e.g. option unknown-249 "a.b=foo bar; c.d= 123; e.f=done" are saved as multiple values a.b="foo bar" c.d="123" e.f="done"
As you can see there is quite a bit of flexibility on what can be passed to the loader or the kernel.
For the time being the vendor-specific table is mostly disabled, because there is no standard set of options for FreeBSD, and I don't know all the pxe-specific vendor options.
Also, applications using libstand may live in memory-constrained environments, so it makes sense to keep these tables as small as possible, especially considering that one can generate arbitrary name=value pairs using site-specific options of type __INDIR or __ILIST (there are 4 __ILIST and 5 __INDIR in the table, numbered 246..249 and 250..254).
Actually, considering that probably 75% of the standard dhcp options are totally useless, it might make sense to remove them as well.
Submitted by: Danny Braniss MFC after: 4 weeks
|
185155 |
21-Nov-2008 |
luigi |
use the correct variable in a debug message.
|
185037 |
18-Nov-2008 |
delphij |
Obey signedness flag in %z case.
MFC after: 2 months
|
184732 |
06-Nov-2008 |
raj |
Eliminate dead declarations in libstand.
|
183876 |
14-Oct-2008 |
raj |
Let libstand(3) build on ARM.
This is a pre-requisite for loader(8) + U-Boot support library on this arch.
|
182748 |
04-Sep-2008 |
raj |
Eliminate __alpha__ leftover from libstand.
|
182290 |
27-Aug-2008 |
obrien |
Add the needed _setjmp.S for MIPS.
Obtained from: Juniper Networks
|
180012 |
25-Jun-2008 |
ru |
Enable GCC stack protection (aka Propolice) for userland: - It is opt-out for now so as to give it maximum testing, but it may be turned opt-in for stable branches depending on the consensus. You can turn it off with WITHOUT_SSP. - WITHOUT_SSP was previously used to disable the build of GNU libssp. It is harmless to steal the knob as SSP symbols have been provided by libc for a long time, GNU libssp should not have been much used. - SSP is disabled in a few corners such as system bootstrap programs (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves. - It should be safe to use -fstack-protector-all to build world, however libc will be automatically downgraded to -fstack-protector because it breaks rtld otherwise. - This option is unavailable on ia64.
Enable GCC stack protection (aka Propolice) for kernel: - It is opt-out for now so as to give it maximum testing. - Do not compile your kernel with -fstack-protector-all, it won't work.
Submitted by: Jeremie Le Hen <jeremie@le-hen.org>
|
178664 |
29-Apr-2008 |
ru |
_setjmp.o was missing a dependency on "machine".
|
178663 |
29-Apr-2008 |
ru |
Don't forget to clean the "machine" symlink on amd64, otherwise bad things may happen.
Reported by: phk MFC after: 3 days
|
177935 |
05-Apr-2008 |
dfr |
On i386, don't try to do network-type stuff if the device name is'nt pxeN.
|
174741 |
18-Dec-2007 |
sobomax |
Fix logical bug in the bzip2 reading code, which results in bogus EIO returned on a perfectly valid bzip2 stream whose decompressed size is multiple of read-ahead buffer size. Reproduce the problem is easy: create some power-of-two sized file (truncate -s 1m file will do), bzip2 it and try to load it as md_image from loader. See how it fails.
The bug doesn't affect gzip code (which most of bzip2-reading code was copied from) probably due to the fact that libgzip doesn't report Z_STREAM_END with the last block, but requires extra call to inflate() to retrieve it and has some extra data in the input stream at that time. However, apply similar fix to gzipfs.c just in the case the API will change in the future to do what bzip2 code does.
Add some ifdef'ed code to enable testing bzipfs.c from witin normal FreeBSD environment as opposed to the restricted loader one, so that one can use gdb and whatnot.
Sponsored by: Sippy Software, Inc., http://www.sippysoft.com/ MFC in: 7 days
|
172940 |
24-Oct-2007 |
jhb |
First cut at support for booting a GPT labeled disk via the BIOS bootstrap on i386 and amd64 machines. The overall process is that /boot/pmbr lives in the PMBR (similar to /boot/mbr for MBR disks) and is responsible for locating and loading /boot/gptboot. /boot/gptboot is similar to /boot/boot except that it groks GPT rather than MBR + bsdlabel. Unlike /boot/boot, /boot/gptboot lives in its own dedicated GPT partition with a new "FreeBSD boot" type. This partition does not have a fixed size in that /boot/pmbr will load the entire partition into the lower 640k. However, it is limited in that it can only be 545k. That's still a lot better than the current 7.5k limit for boot2 on MBR. gptboot mostly acts just like boot2 in that it reads /boot.config and loads up /boot/loader. Some more details: - Include uuid_equal() and uuid_is_nil() in libstand. - Add a new 'boot' command to gpt(8) which makes a GPT disk bootable using /boot/pmbr and /boot/gptboot. Note that the disk must have some free space for the boot partition. - This required exposing the backend of the 'add' function as a gpt_add_part() function to the rest of gpt(8). 'boot' uses this to create a boot partition if needed. - Don't cripple cgbase() in the UFS boot code for /boot/gptboot so that it can handle a filesystem > 1.5 TB. - /boot/gptboot has a simple loader (gptldr) that doesn't do any I/O unlike boot1 since /boot/pmbr loads all of gptboot up front. The C portion of gptboot (gptboot.c) has been repocopied from boot2.c. The primary changes are to parse the GPT to find a root filesystem and to use 64-bit disk addresses. Currently gptboot assumes that the first UFS partition on the disk is the / filesystem, but this algorithm will likely be improved in the future. - Teach the biosdisk driver in /boot/loader to understand GPT tables. GPT partitions are identified as 'disk0pX:' (e.g. disk0p2:) which is similar to the /dev names the kernel uses (e.g. /dev/ad0p2). - Add a new "freebsd-boot" alias to g_part() for the new boot UUID.
MFC after: 1 month Discussed with: marcel (some things might still change, but am committing what I have so far)
|
172854 |
21-Oct-2007 |
marius |
- Given that we tell the compiler that struct ip is packed and 32-bit aligned, GCC 4.2.1 also generates code for sendudp() that assumes this alignment. GCC 4.2.1 however doesn't 32-bit align wbuf, causing the loader to crash due to an unaligned access of wbuf in sendudp() when netbooting sparc64. Solve this by specifying wbuf as packed and 32-bit aligned, too. As for lastdata and readudp() this currently is no issue when compiled with GCC 4.2.1, though give lastdata the same treatment as wbuf for consistency and possibility of being affected in the future. [1] - Sprinkle const on a lookup table.
Reported by: marcel [1] Submitted by: yongari [1] Reviewed by: marcel [1] MFC after: 5 days
|
172664 |
15-Oct-2007 |
nyan |
Optimize for size on pc98. It enables to boot a kernel again.
I don't know what's wrong (loader, boot2 or others), but this change is effective.
Tested by: NAKAJI Hiroyuki MFC after: 3 days
|
168348 |
04-Apr-2007 |
kan |
Cast away const qualifier to squash GCC warning.
|
165906 |
09-Jan-2007 |
imp |
Remove California Regent's clause 3, per letter
|
164053 |
06-Nov-2006 |
cognet |
Instead of re-implementing hton[ls] and friends for each arch, add a new MI file, net/ntoh.c, which just implement them using the inline functions from <sys/endian.h>.
Suggested by: bde
|
161526 |
22-Aug-2006 |
ru |
Remove alpha left-overs.
|
156518 |
09-Mar-2006 |
jkim |
Implement printf 'X' conversion for both libstand and kernel.
|
152762 |
24-Nov-2005 |
ru |
Fix prototypes.
|
151447 |
18-Oct-2005 |
des |
Implement the full range of ISO9660 number conversion routines in iso.h.
MFC after: 2 weeks
|
148047 |
15-Jul-2005 |
ache |
Add -mno-sse3 for prescott/nocona
|
146917 |
03-Jun-2005 |
obrien |
Match sys/boot in ensure GCC does not use x86 FP registers in integer code.
Submitted by: Pawel Worach <pawel.worach@gmail.com>
|
146839 |
31-May-2005 |
obrien |
Back out revision 1.51, it is wrong. We don't litter -I's within lib Makefiles to get headers from /usr/src vs. the standard include paths.
|
146835 |
31-May-2005 |
jhb |
Use %z to print size_t values.
|
146834 |
31-May-2005 |
jhb |
Just use uintptr_t and intptr_t rather than requiring each arch to provide explicit int/long typedefs.
|
146788 |
29-May-2005 |
sobomax |
Make bzip2 support working again after bzip2 upgrade. This time commit BZ_NO_COMPRESS support to the bzip2 sources directly (yes, this takes file off the vendor branch, but looks like bzip2 maintainer doesn't care), so that it will not be removed when the next upgrade is performed. Also, add a short note on how to test bzip2 support.
Pointy hat to: obrien
Correct comment (libz -> libbz2) and remove useless full path to zutil.h while I am here.
|
146784 |
29-May-2005 |
sobomax |
Add missed ${.CURDIR}/../../contrib/bzip2 into include search path, otherwise old version of bzlib.h can be picked up from the /usr/include.
|
146443 |
20-May-2005 |
charnier |
Remove unused variable. Shorten the path to WARNS=6 compliance.
|
146425 |
20-May-2005 |
peter |
Fix libstand on amd64. Rev 1.46 (obrien) removed the -I. that the bzip2 support provided, and amd64 depended on. Amd64 has a custom ${.OBJDIR}/machine symlink in it and the -I. picked this up. Without it, the libstand code was being compiled in 32 bit mode, but with 64 bit machine headers.
|
146328 |
17-May-2005 |
obrien |
Clean up an additional file.
|
146327 |
17-May-2005 |
obrien |
Don't use a patch w/in /usr/src. Programmatically change files when needed.
|
146324 |
17-May-2005 |
obrien |
Re-enable support for bzip2'ed compressed filesystems.
|
146308 |
17-May-2005 |
obrien |
Temporarily disable support for bzip2'ed compressed filesystems, until a maintainable why of handling them is created.
|
140505 |
20-Jan-2005 |
ru |
Sort sections.
|
139389 |
29-Dec-2004 |
trhodes |
Various markup and spelling fixes.
PR: 75574 Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp> (original version)
|
139106 |
21-Dec-2004 |
ru |
NODOCCOMPRESS -> NO_DOCCOMPRESS NOINFO -> NO_INFO NOINFOCOMPRESS -> NO_INFOCOMPRESS NOLINT -> NO_LINT NOPIC -> NO_PIC NOPROFILE -> NO_PROFILE
|
136910 |
24-Oct-2004 |
ru |
For variables that are only checked with defined(), don't provide any fake value.
|
136093 |
03-Oct-2004 |
stefanf |
Don't add integers to void pointers.
|
135576 |
22-Sep-2004 |
stefanf |
Prefer C99's __func__ over GCC's __FUNCTION__.
|
134760 |
04-Sep-2004 |
iedowse |
Reset the seek pointer to 0 when a file is successfully opened, since otherwise the initial seek offset will contain the directory offset of the filesystem block that contained its directory entry. This bug was mostly harmless because typically the directory is less than one filesystem block in size so the offset would be zero. It did however generally break loading a kernel from the (large) kernel compile directory.
Also reset the seek pointer when a new inode is opened in read_inode(), though this is not actually necessary now because all callers set it afterwards.
|
133218 |
06-Aug-2004 |
roam |
Bump the document date, since the content changed today.
Discussed with: ru
|
133207 |
06-Aug-2004 |
roam |
Fix a printf("%b", ..) example.
PR: 68849 Submitted by: Michel Lavondes <fox@vader.aacc.cc.md.us> MFC after: 1 week
|
131539 |
03-Jul-2004 |
ru |
Eliminate double whitespace.
|
131504 |
02-Jul-2004 |
ru |
Mechanically kill hard sentence breaks.
|
131383 |
01-Jul-2004 |
tjr |
Update libstand makefile for zlib 1.2.1.
|
129216 |
14-May-2004 |
cognet |
Define iaddr_t and saddr_t for arm.
|
129208 |
14-May-2004 |
cognet |
Import _setjmp.S for arm in libstand.
|
126207 |
25-Feb-2004 |
grehan |
No reason to disable this test on powerpc.
|
126206 |
25-Feb-2004 |
grehan |
Use signed char cast to avoid out-of-range error on PowerPC (which has unsigned char by default). This is a no-op on all other current arches.
Tested by: md5 sum before/after same on i386
|
124811 |
21-Jan-2004 |
jhb |
Clean up error handling in libstand filesystem code to be more consistent: - bzipfs and gzipfs now properly return errno values directly from their read routines rather than returning -1. - missing errno values on error returns for the seek routines on almost all filesystems were added. - fstat() now returns -1 if an error occurs rather than ignoring it. - nfs's readdir() routine now reports valid errno values if an error or EOF occurs rather than EPERM (It was just returning 0 for success and 1 for failure). - nullfs used the wrong semantics for every function besides close() and seek(). Getting it right for close() appears to be an accident at that. - read() for buffered files no longer returns 0 (EOF) if an error occurs, but returns -1 instead.
|
124572 |
15-Jan-2004 |
jhb |
- Move the code to try to open a single chunk file and prompt for the associated floppy if needed into a static split_openfile() function. - Use this function in splitfs_open() to open the first chunk rather than using open() directly. This allows the first chunk to be located on a different disk than the actual foo.split file.
|
124571 |
15-Jan-2004 |
jhb |
Whitespace tweaks to make indentation consistent within this file and even within a single function.
|
124570 |
15-Jan-2004 |
jhb |
- Print out line number in a panic message using %d rather than %p. Line numbers aren't pointers. - Add a __printflike() attribute to libstand's panic() prototype to catch such bogons in the future.
|
124380 |
11-Jan-2004 |
ru |
Removed duplicate SRCS.
|
123392 |
10-Dec-2003 |
green |
Implement seeking to earlier offsets in gzipfs. This allows my loader to e.g. correctly load all .ko.gz's I've tried, as opposed to messing up trying to read section headers on some of them.
|
123382 |
10-Dec-2003 |
grehan |
PowerPC-conditional changes: - include ashldi3.c/ashrdi3.c from libc for UFS 64-bit arith - pull in syncicache.c from libc, and define _STANDALONE for loader usage
|
121532 |
26-Oct-2003 |
peter |
Preserve the constness of the value argument passed to env_setenv() as it gets passed through the filter functions.
|
119964 |
10-Sep-2003 |
ru |
mdoc(7): Properly mark C headers.
|
117081 |
30-Jun-2003 |
ru |
bsd.lib.mk,v 1.143 no longer uses ld(1) directly to strip symbols from intermediate object files, so these hacks to get AMD64 compile are no longer needed.
Tested on: sledge.FreeBSD.org
|
116861 |
26-Jun-2003 |
peter |
Add amd64 build glue
|
114004 |
25-Apr-2003 |
ru |
Restore bzip2(1) support in loader(8) after Peter's renames of malloc() to Malloc(), and free() to Free(), in zalloc_malloc.c.
|
113388 |
12-Apr-2003 |
robert |
Trust the code more than the comment(s) and correct some false statements about pointer data type sizes, which spread probably by copy-and-paste.
|
113159 |
06-Apr-2003 |
peter |
Sync up with kern/subr_prf.c. This adds %ll, %j, %q, %z, etc.
|
112538 |
24-Mar-2003 |
charnier |
The .Fn function The .Nm library
|
111776 |
03-Mar-2003 |
marcel |
Fix a machine check abort caused by the EFI loader trying to open a file in the NFS file system when the underlying device is not a network device. A Sparc64 specific hack for this exact problem was already present (nfs.c:1.9, tftp.c:1.10), but the problem is not specific to Sparc64. The hack has been promoted to a non-i386 test because on non-i386 architectures it's either impossible to have non-network devices coexist in the same loader with the NFS FS, or network and non-network device coexist and NFS filesystems can only be used on top of network devices. I believe i386 pxeboot is where this does not hold.
The root cause of this problem is in open.c where each file system is tried until no more file systems exist or a file system returns success. There's no notion of a list of valid file systems given the underlying device and the non-existence of a file can cause the invalid combination to be tried.
|
108108 |
19-Dec-2002 |
dillon |
The zalloc pool's size calculation breaks if sbrk() does not return contiguous chunks of memory. It happens to do so in the bootstrap code, but not necessarily in other places. MFC after: 7 days
|
108100 |
19-Dec-2002 |
jake |
Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c.
|
107788 |
12-Dec-2002 |
ru |
Uniformly refer to a file system as "file system".
Approved by: re
|
107631 |
05-Dec-2002 |
ru |
Capitalize ASCII code names.
Approved by: re
|
107555 |
03-Dec-2002 |
jake |
Update the second copy of libstand to deal with the new ufs2 superblock format. The one in sys/boot/libstand is not connected to the build.
Approved by: re
|
105430 |
19-Oct-2002 |
marcel |
Add the libz derived files, added in the previous commit, to CLEANFILES. We were not cleaning up after ourselves.
|
103949 |
25-Sep-2002 |
mike |
Use the standardized CHAR_BIT constant instead of NBBY in userland.
|
102227 |
21-Aug-2002 |
mike |
o Merge <machine/ansi.h> and <machine/types.h> into a new header called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif
Concept by: bde Reviewed by: jake, obrien
|
102216 |
21-Aug-2002 |
scottl |
Fix a typo in #if 0 code
|
101112 |
31-Jul-2002 |
jake |
Stash various networking paramters in the environment for the kernel to pick up, ala pxe.
|
100394 |
20-Jul-2002 |
peter |
Reimplement malloc/free debugging that includes the offending file:line info. This turned out to be rather useful on ia64 for tracking down malloc/free problems. Detect duplicate free()'s - otherwise these show up as a guard1 failure and it looks like corruption instead of something simple like a second free() where there shouldn't be. Deal with libz using libc headers and not seeing the malloc/free stuff that we provide in libstand. Do similar nastiness to what is done for bzlib.
Tested on: i386, ia64 (compile, run)
|
100392 |
20-Jul-2002 |
peter |
Add __printflike() to printf() and sprintf() prototypes. -ffreestanding turns off gcc's builtin attributes for these functions and as a result -Wformat does no checking. (argh)
|
99558 |
07-Jul-2002 |
jake |
Add a hack (kludge?) to avoid trying to access files backed by disk devices as though they were backed by network devices.
|
99536 |
07-Jul-2002 |
jake |
Ficl wants _setjmp and _longjmp. No need for weak symbols either.
|
99031 |
29-Jun-2002 |
peter |
To avoid anybody else getting caught out, these two files are really in /sys/boot/common and are actually used there.
|
99029 |
29-Jun-2002 |
peter |
Update from NetBSD 1.3 -> 1.6. Most notable, rev 1.6: "Make in_cksum work on little endian machines"
This would explain a few things. :-)
|
98542 |
21-Jun-2002 |
mckusick |
This commit adds basic support for the UFS2 filesystem. The UFS2 filesystem expands the inode to 256 bytes to make space for 64-bit block pointers. It also adds a file-creation time field, an ability to use jumbo blocks per inode to allow extent like pointer density, and space for extended attributes (up to twice the filesystem block size worth of attributes, e.g., on a 16K filesystem, there is space for 32K of attributes). UFS2 fully supports and runs existing UFS1 filesystems. New filesystems built using newfs can be built in either UFS1 or UFS2 format using the -O option. In this commit UFS1 is the default format, so if you want to build UFS2 format filesystems, you must specify -O 2. This default will be changed to UFS2 when UFS2 proves itself to be stable. In this commit the boot code for reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c) as there is insufficient space in the boot block. Once the size of the boot block is increased, this code can be defined.
Things to note: the definition of SBSIZE has changed to SBLOCKSIZE. The header file <ufs/ufs/dinode.h> must be included before <ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and ufs_lbn_t.
Still TODO: Verify that the first level bootstraps work for all the architectures. Convert the utility ffsinfo to understand UFS2 and test growfs. Add support for the extended attribute storage. Update soft updates to ensure integrity of extended attribute storage. Switch the current extended attribute interfaces to use the extended attribute storage. Add the extent like functionality (framework is there, but is currently never used).
Sponsored by: DARPA & NAI Labs. Reviewed by: Poul-Henning Kamp <phk@freebsd.org>
|
97776 |
03-Jun-2002 |
sobomax |
Correct bswap64() prototype.
Submitted by: glewis MFC after: 1 day (assuming that there is re's approval)
|
97733 |
02-Jun-2002 |
schweikh |
Remove a URL from the middle of the BSD copyright (a clicko? a pasto?). Fix typos: s/evironment/environment s/cont/const s/_lonjmp/_longjmp
MFC after: 3 weeks
|
96941 |
19-May-2002 |
iedowse |
Use an explicitly-sized type instead of daddr_t for on-disk block numbers.
|
96842 |
18-May-2002 |
phk |
UFS indirect blocks are size u_int32_t, not daddr_t
|
96525 |
13-May-2002 |
phk |
Add __divdi3() and __moddi3() to libstand. We will need them for UFS2.
Sponsored by: DARPA & NAI Labs.
|
96477 |
12-May-2002 |
phk |
#include <sys/disklabel.h> to get BBSIZE.
|
96462 |
12-May-2002 |
ru |
Added new bsd.incs.mk which handles installing of header files via INCS. Implemented INCSLINKS (equivalent to SYMLINKS) to handle symlinking include files. Allow for multiple groups of include files to be installed, with the powerful INCSGROUPS knob. Documentation to follow.
Added standard `includes' and `incsinstall' targets, use them in Makefile.inc1. Headers from the following makefiles were not installed before (during `includes' in Makefile.inc1):
kerberos5/lib/libtelnet/Makefile lib/libbz2/Makefile lib/libdevinfo/Makefile lib/libform/Makefile lib/libisc/Makefile lib/libmenu/Makefile lib/libmilter/Makefile lib/libpanel/Makefile
Replaced all `beforeinstall' targets for installing includes with the INCS stuff.
Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS, and for compatibility with NetBSD. Similarly for INCOWN, INCGRP, and INCMODE.
Consistently use INCLUDEDIR instead of /usr/include.
gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes were only lightly tested due to the missing contrib/libstdc++-v3. I fully tested the pre-WIP_GCC31 version of this patch with the contrib/libstdc++.295 stuff.
These changes have been tested on i386 with the -DNO_WERROR "make world" and "make release".
|
94614 |
13-Apr-2002 |
obrien |
libstand needs _setjmp/_longjmp for FICL.
Submitted by: jake
|
94310 |
09-Apr-2002 |
obrien |
Use -ffreestanding. It is REQUIRED by GCC 3.1 on all architectures. I don't like putting this very-GCC centric option here; but no one as given a better idea of handling it.
Reviewed by: jhb
|
94264 |
09-Apr-2002 |
obrien |
Break the sparc64 build. I expect those that complained about this commit to fix the sparc64 case to their liking.
|
94236 |
08-Apr-2002 |
obrien |
sparc64 grew _setjmp/_longjmp.
|
94235 |
08-Apr-2002 |
obrien |
Use -ffreestanding.
|
92917 |
21-Mar-2002 |
obrien |
Remove __P() usage.
|
92913 |
21-Mar-2002 |
obrien |
Remove 'register' keyword.
|
92863 |
21-Mar-2002 |
sobomax |
Kill debugging printf() slipped into my last commit.
Noticed by: jhb Hall of shame entry: sobomax
|
92693 |
19-Mar-2002 |
peter |
Add -ffreestanding to CFLAGS for ia64. This should probably be global like on the kernel.
|
92494 |
17-Mar-2002 |
sobomax |
Add splitfs vfs layer into libstand, which allows loading big kernels and modules split across several physical medias. Following is how it works:
The splitfs code, when asked to open "foo" looks for a file "foo.split" which is a text file containing a list of filenames and media names, e.g.
foo.aa "Kernel floppy 1" foo.ab "Kernel floppy 2" foo.ac "Kernel and modules floppy"
For each file segment, the process is:
- try to open the file - prompt "Insert the disk labelled <whatever> and press any key..." - try to open the file - return error if file could not be located
RE team is free to use this feature in the upcoming 5.0-DP1.
Reviewed by: msmith, dcs
|
91959 |
09-Mar-2002 |
mike |
o Don't require long long support in bswap64() functions. o In i386's <machine/endian.h>, macros have some advantages over inlines, so change some inlines to macros. o In i386's <machine/endian.h>, ungarbage collect word_swap_int() (previously __uint16_swap_uint32), it has some uses on i386's with PDP endianness.
Submitted by: bde
o Move a comment up in <machine/endian.h> that was accidentially moved down a few revisions ago. o Reenable userland's use of optimized inline-asm versions of byteorder(3) functions. o Fix ordering of prototypes vs. redefinition of byteorder(3) functions, so that the non-GCC (libc asm) case has proper prototypes. o Add proper prototypes for byteorder(3) functions in <sys/param.h>. o Prevent redundant duplicate prototypes by making use of the _BYTEORDER_PROTOTYPED define. o Move the bswap16(), bswap32(), bswap64() C functions into MD space for platforms in which asm versions don't exist. This significantly reduces the complexity of some things at the cost of duplicate code.
Reviewed by: bde
|
91394 |
27-Feb-2002 |
tmm |
Add the following functions/macros to support byte order conversions and device drivers for bus system with other endinesses than the CPU (using interfaces compatible to NetBSD):
- bwap16() and bswap32(). These have optimized implementations on some architectures; for those that don't, there exist generic implementations. - macros to convert from a certain byte order to host byte order and vice versa, using a naming scheme like le16toh(), htole16(). These are implemented using the bswap functions. - stream bus space access functions, which do not perform a byte order conversion (while the normal access functions would if the bus endianess differs from the CPU endianess).
htons(), htonl(), ntohs() and ntohl() are implemented using the new functions above for kernel usage. None of the above interfaces is currently exported to user land.
Make use of the new functions in a few places where local implementations of the same functionality existed.
Reviewed by: mike, bde Tested on alpha by: mike
|
90868 |
18-Feb-2002 |
mike |
o Move NTOHL() and associated macros into <sys/param.h>. These are deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland.
Tested on: alpha, i386 Reviewed by: bde, jake, tmm
|
90097 |
02-Feb-2002 |
bde |
Fixed world breakage in previous commit. The generated headers are in the current directory which is rarely ${.CURDIR}.
|
90070 |
01-Feb-2002 |
sobomax |
Complete bzip2-1.0.2 import.
MFC in: 14 days
|
87632 |
11-Dec-2001 |
jhb |
We support writing to at least one filesystem now.
PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc.
|
87631 |
11-Dec-2001 |
jhb |
Add support for overwriting the existing contents of a file to the UFS driver in libstand. This specifically does not expand or truncate files since the filesystem may be dirty or inconsistent.
PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc.
|
87114 |
30-Nov-2001 |
alfred |
Back out my 'fix', resid is different for strategy than for write
|
87112 |
30-Nov-2001 |
alfred |
Make the same fix for writes to RAW objects.
|
87111 |
30-Nov-2001 |
alfred |
write should return the number of bytes written, not 0 on success.
Submitted by: Jonathan Mini <mini@haikugeek.com> PR: kern/32350
|
86158 |
06-Nov-2001 |
jhb |
- Change the f_isdir field of struct file to be a flags field and two new flags: F_ROOTDIR and F_RR (Rock Ridge present). - Cache the SUSP LEN_SKP parameter in struct file as well. - If we open() '/', then force a read of the directory's contents so we can examine the directory record of '.' to see if Rock Ridge is present. - If Rock Ridge extensions are present, lookup Rock Ridge names in readdir().
|
86142 |
06-Nov-2001 |
jhb |
- Add a simple SUSP parser. - Use the SUSP parser to detect Rock Ridge (RRIP) extensions and to look up alternate names when opening files.
|
86137 |
06-Nov-2001 |
jhb |
Switch to using ANSI function declarations and add missing function prototypes. I'm tired of getting stupid bugs from changing function parameters and not getting warnings from the compiler when I goof it up.
|
85671 |
29-Oct-2001 |
mike |
Make the output from assert() look more like the example in the C99 standard.
Requested by: bde
|
85607 |
27-Oct-2001 |
mike |
Only provide function information in compile environments that support the C99 variable __func__ and never for C++. Provide a more meaningful example in the assert(3) manual.
Reviewed by: asmodai, bde
|
85568 |
26-Oct-2001 |
peter |
Remove the -I../libc/${MACHINE_ARCH} that was there solely for the #include "DEFS.h" that was only used on i386 (which has been fixed).
|
85451 |
25-Oct-2001 |
peter |
Change #include "DEFS.h" to <machine/asm.h>.
|
85423 |
24-Oct-2001 |
asmodai |
Add __FBSDID. Change __assert() function to print failing function name. This makes us C99 conforming.
|
84995 |
15-Oct-2001 |
robert |
Make this Makefile suitable for sparc64.
|
84993 |
15-Oct-2001 |
robert |
Define the types iaddr_t and saddr_t for sparc64.
|
84768 |
10-Oct-2001 |
bde |
Compensate for "Compensate for header dethreading" by backing it out.
|
84306 |
01-Oct-2001 |
ru |
mdoc(7) police: Use the new .In macro for #include statements.
|
84282 |
01-Oct-2001 |
ru |
mdoc(7) police: markup nits.
|
84221 |
30-Sep-2001 |
dillon |
Add __FBSDID()s to libstand
|
83610 |
18-Sep-2001 |
sobomax |
Add support for loading bzip2-compressed filesystems. Among other things this would allow to load bzip2-compressed kernels/modules from the loader(8) (support for that will be committer separately).
MFC after: 1 month
|
82869 |
03-Sep-2001 |
dfr |
Remove bogus implementation of _setjmp/_longjmp
|
82852 |
03-Sep-2001 |
kris |
Check for malloc failure in a couple of cases
MFC after: 2 weeks
|
82526 |
29-Aug-2001 |
jdp |
Fix a bug in lseek which caused the loader to fail on some gzipped kernels. The error message was "elf_loadexec: cannot seek".
Libstand maintains a read-ahead buffer for each open file, so that it can read in chunks of 512 bytes for greater efficiency. When the loader tries to lseek forward in a file by a small amount, it sometimes happens that the target file offset is already in the read-ahead buffer. But the lseek code simply discarded the contents of that buffer and performed a seek directly on the underlying file. This resulted in an attempt to seek backwards in the file, since some of the data has already been read into the read-ahead buffer. Gzipped data streams cannot seek backwards, so an error was returned.
This commit adds code which checks to see if the desired file offset is already in the read-ahead buffer. If it is, the code simply adjusts the buffer pointer and length, thereby avoiding a reverse seek on the gzipped data stream.
I incorporated a suggestion from Matt Dillon which saved a little bit of code in this fix.
Reviewed by: dillon, gallatin, jhb
|
82208 |
23-Aug-2001 |
gallatin |
Bail if we go beyond the directory size, not just if we hit it. Certain ISO fs's (like the one for 4.4-RC1 disc1 on alpha) trigger this, and we end up opening a null file name. This causes us to get a false match for "kernel.ko" when it does not exist.
|
81622 |
14-Aug-2001 |
ru |
mdoc(7) police: s/BSD/.Bx/ where appropriate.
|
81588 |
13-Aug-2001 |
ru |
Spell "FreeBSD" with "F" and "BSD" in uppercase.
|
81586 |
13-Aug-2001 |
ru |
Removed duplicate VCS ID tags, as per style(9).
|
80736 |
31-Jul-2001 |
mp |
Make include file consistent with the rest of libstand.
|
79754 |
15-Jul-2001 |
dd |
Remove whitespace at EOL.
|
79531 |
10-Jul-2001 |
ru |
mdoc(7) police: removed HISTORY info from the .Os call.
|
79454 |
09-Jul-2001 |
dd |
mdoc(7) police: remove extraneous .Pp before and/or after .Sh.
|
79034 |
30-Jun-2001 |
mikeh |
Reset errno so that subsequent TFTP requests don't fail after the first failure.
PR: misc/25502 MFC after: 2 weeks
|
77370 |
28-May-2001 |
msmith |
Correct the returned UDP datagram length. See the PR for a more comprehensive description of the fix.
PR: misc/25503 Submitted by: Jim Browne <jbrowne@jbrowne.com> MFC after: 1 week
|
77369 |
28-May-2001 |
msmith |
The shortest valid TFTP packet is 4 bytes, not 8.
PR: misc/25503 Submitted by: Jim Browne <jbrowne@jbrowne.com> MFC after: 1 week
|
76579 |
14-May-2001 |
dcs |
Replace functional bugs of ctypish functions in libstand with style bugs.
reviewed by: bde MFC after: 1 week
|
76180 |
01-May-2001 |
markm |
Compensate for header dethreading.
|
76136 |
29-Apr-2001 |
msmith |
Unbreak world by defining isalnum() for libstand consumers.
|
75298 |
07-Apr-2001 |
gallatin |
fix cd9660 to work on files larger than ISO_DEFAULT_BLOCK_SIZE and unbreak cdboot on alphas (which has been broken since just after 4.0-RELEASE)
submitted by: jlemon
|
74870 |
27-Mar-2001 |
ru |
MAN[1-9] -> MAN.
|
73887 |
06-Mar-2001 |
dfr |
A quick and dirty port of libstand to ia64.
|
72889 |
22-Feb-2001 |
ru |
Prepare for mdoc(7)NG.
|
72873 |
22-Feb-2001 |
dcs |
Correct the prototype for pager_output().
|
72621 |
18-Feb-2001 |
kris |
Silence -Wnon-const-format
|
72093 |
06-Feb-2001 |
asmodai |
Fix typo: compatability -> compatibility.
Compatability is not an existing english word.
|
71895 |
01-Feb-2001 |
ru |
mdoc(7) police: split punctuation characters + misc fixes.
|
71263 |
19-Jan-2001 |
ru |
mdoc(7) police: removed leading whitespaces that are not inside Bd/Ed; these hardly degrade the quality of the produced output.
|
70481 |
29-Dec-2000 |
ru |
Prepare for mdoc(7)NG.
|
70015 |
14-Dec-2000 |
ru |
mdoc(7) police: removed history info from the .Os FreeBSD call.
|
69739 |
08-Dec-2000 |
ps |
When TFTP tries to open a file, it is expecting struct open_file member f_devdata to be a pointer to a socket number. When currdev is "pxe", that assumption is correct. When currdev is "disk*", that assumption is incorrect.
Submitted by: Jim Browne <jbrowne@jbrowne.com>
|
68545 |
10-Nov-2000 |
benno |
Disable the end guard for now.
The test for failing the end guard was always triggering (and was reported as such in compiler warnings). This is a temporary band-aid until I can work out what's really going on.
Reviewed by: obrien
|
68544 |
10-Nov-2000 |
benno |
Make setjmp work our way, as opposed to NetBSD's.
This file needs commenting still.
Submitted by: luoqi Reviewed by: obrien
|
68543 |
10-Nov-2000 |
benno |
Don't always enable debugging for the network device code.
Reviewed by: obrien
|
68362 |
05-Nov-2000 |
ps |
Honor the ip address given in the root-path dhcp option.
PR: 21743 Submitted by: Brian Candler <B.Candler@pobox.com>
|
66929 |
10-Oct-2000 |
obrien |
Inital PowerPC loader build support.
Submitted by: Benno Rice <benno@jeamland.net>
|
66928 |
10-Oct-2000 |
obrien |
Fix the embeded VCS ID for FreeBSD vs. NetBSD.
|
66926 |
10-Oct-2000 |
obrien |
Architecture-specific setjump()/longjmp() bits for the PowerPC needed by the loader.
Submitted by: Benno Rice <benno@jeamland.net> Obtained from: NetBSD (Wolfgang Solfrank <ws@@tools.de>)
|
66134 |
20-Sep-2000 |
ps |
IN_CLASS*() macros assume host order and s_addr is network byte order, so we must convert them to host order.
|
65921 |
16-Sep-2000 |
phk |
Turn dkcksum() into an __inline function.
Change its type to u_int_16_t.
|
65655 |
10-Sep-2000 |
ps |
Backout last commit. It was wrong.. *sigh*
|
65654 |
10-Sep-2000 |
ps |
include string.h to silence a warning.
|
65496 |
05-Sep-2000 |
msmith |
Expose the NFS root node, so that an evil consumer can use it to get the NFS filehandle for the root mount.
|
65470 |
05-Sep-2000 |
msmith |
Implement readahead buffering for non-raw files. This drastically improves the efficiency of byte-by-byte read operations on filesystems not already supported by the block cache (especially NFS).
This should be a welcome change for users booting via PXE, as the loader now reads its startup files almost instantly, instead of taking tens of seconds.
|
65400 |
03-Sep-2000 |
peter |
Make libstand compile
|
64549 |
11-Aug-2000 |
peter |
Add the -mpreferred-stack-boundary=2 option to reduce code bloat. We compile the kernel with this.
|
64527 |
11-Aug-2000 |
ps |
Add support to send the string 'PXEClient' as the Vendor class identifier to the DHCP server. Now you can check for this string in your dhcp configuration to decide whether you will hand out a lease to the client or not.
|
64185 |
03-Aug-2000 |
jhb |
Cleanup warnings by adding missint prototypes, removing unneeded duplicate prototypes, and adding in several 'const's. Also, add some missing $FreeBSD$'s.
Found by: BDECFLAGS
|
60938 |
26-May-2000 |
jake |
Back out the previous change to the queue(3) interface. It was not discussed and should probably not happen.
Requested by: msmith and others
|
60833 |
23-May-2000 |
jake |
Change the way that the queue(3) structures are declared; don't assume that the type argument to *_HEAD and *_ENTRY is a struct.
Suggested by: phk Reviewed by: phk Approved by: mdodd
|
60481 |
12-May-2000 |
peter |
Fix the real problem that broke the Alpha loader this last week. It was not the fault of the module code, nor FICL. The malloc code requires sbrk() to return addresses that were at least 16 byte aligned. If the Alpha loader happened to be 8 byte but not 16 byte aligned in length, then you would get a zfree() panic at startup.
Incidently, this affected the i386 loader as well, and explains why the static heap changed things and why jlemon had trouble when the bss was not ending at a multiple of 8 bytes.
My fix is to 16 byte align it on all arches, even though the x86 version only required 8 byte alignment (struct MemNode is smaller there). We could page align it if we wanted to be paranoid, but it isn't presently necessary.
|
60479 |
12-May-2000 |
peter |
We compile expressly on the alpha with -mno-fp-regs - so do not use them explicitly here. This was the original cause of instruction faults on the Alpha in loader. (not this code, but the same problem in libficl.a)
|
60071 |
06-May-2000 |
ps |
Fix comment.
|
59853 |
01-May-2000 |
ps |
Add readdir support to the NFS filesystem in libstand.
|
59824 |
01-May-2000 |
ps |
Do not attempt to free a nfs node if it is the root node. The root node is statically allocated and is not guarded, so free will panic in nfs_close.
|
59766 |
29-Apr-2000 |
jlemon |
Add a readdir function to the loader fsops vector, and implement the functionality for some of the filesystesms.
|
59765 |
29-Apr-2000 |
jlemon |
Add ext2fs support to the loader.
|
59408 |
20-Apr-2000 |
ps |
Add a cleanup function. This is needed for PXE where you should shutdown the UNDI and unload the stack.
|
59086 |
08-Apr-2000 |
ps |
Break out sendudp and readudp from net.c. This is for PXE, so it can use its own UDP interface.
|
57686 |
02-Mar-2000 |
sheldonh |
Remove single-space hard sentence breaks. These degrade the quality of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
|
56223 |
18-Jan-2000 |
obrien |
trailing white space removal.
|
56222 |
18-Jan-2000 |
obrien |
Add two new functions cd9660_readfile() & cd9660_readdir(), which cd9660_read() now uses to read CDROMs. With these changes FreeBSD/Alpha can now boot from a bootable CDROM.
Submitted by: dfr
|
55206 |
29-Dec-1999 |
peter |
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
|
55181 |
28-Dec-1999 |
peter |
Use the ctype.h version of isascii() - it doesn't loose precision and think that 0x100 (int) is an ascii character.
Submitted by: bde
|
55137 |
27-Dec-1999 |
peter |
Tidy up some loose ends. nullfs_read/write were returning the wrong value. Fix some ctype problems - isascii() caused a warning if fed an unsigned char - it's always > 0 and libstand is compiled with -Wall. Missing prototype/include in printf.c
|
53667 |
24-Nov-1999 |
peter |
longjumperror() and abort() don't exist in libstand.. Don't test for a condition we can't handle (like the x86 longjmp). This was highlighted by attempting to build FICL into the alpha loader.
|
51169 |
11-Sep-1999 |
dfr |
Change toupper/tolower so that they don't give a bogus answer if the argument is already upper/lower.
|
50476 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
46079 |
25-Apr-1999 |
imp |
More egcs warning fixes: o use braces to avoid potentially ambiguous else o don't default to type int (and also remove a useless register modifier). o Use parens around assignment values used as truth values. o Remove unused function.
Reviewed by: obrien and chuckr
|
45939 |
22-Apr-1999 |
jdp |
Don't build with -g. The a.out egcs can't handle it at the moment. This seems to have snuck back into the Makefile in an unrelated commit (rev. 1.8).
|
43933 |
12-Feb-1999 |
dcs |
Remove float-point dependency from i386's version of setjmp()/longjmp().
|
43932 |
12-Feb-1999 |
dcs |
Copy _setjmp.S from libc in preparation for loader-specific version.
|
43494 |
01-Feb-1999 |
jkh |
Oops. Missed this in the last commit.
Submitted by: Daniel C. Sobral <dcs@newsguy.com>
|
42511 |
11-Jan-1999 |
msmith |
POSIX introduced optreset to deal with multiple invocations of getopt (as in, multiple input lines :). This is documented in the man page and is used in the code, but unistd.h and stand.h do not declare it. Incidentally, it prevents me fixing a bug in loader's code... :-)
PR: misc/9373 Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>
|
40903 |
04-Nov-1998 |
peter |
Remove stray .endif from previous commit (I hope this is right)
|
40892 |
04-Nov-1998 |
msmith |
Don't need this one anymore.
|
40891 |
04-Nov-1998 |
msmith |
Well I never. Seems like _setjmp()/_longjmp() are just what the doctor ordered. This brings the Alpha back to parity, and should bring us BootForth on both platforms.
Submitted by: John Birrell (jb@freebsd.org)
|
40889 |
04-Nov-1998 |
msmith |
Improve the quality of isspace() to match expectations. This should make the Ficl interpreter read its softwords array OK.
|
40878 |
04-Nov-1998 |
msmith |
Don't try to build (nonexistent) Alpha setjmp until we have one.
|
40874 |
04-Nov-1998 |
msmith |
Move setjmp/longjmp implementations here from libc; no signal handling in libstand, only for i386 until I locate an alpha setjmp/longjmp.
Minimal 64-bit gcc integer support for i386. This is kinda nasty, and should be revisited once we decide whether the bootblocks need quad arithmetic.
|
40805 |
01-Nov-1998 |
msmith |
Add: assert() setjmp()/longjmp() vsprintf()
|
40774 |
31-Oct-1998 |
msmith |
Add a new field to the devsw structure; dv_print, to print all valid units etc. associated with the device entry. Consider EOF an 'error' for fgetstr if we haven't read anything yet.
You *MUST* recompile and reinstall libstand before rebuilding the bootstrap.
|
40520 |
19-Oct-1998 |
dfr |
Implement a hook to allow us to reclaim the memory used by the first stage of the bootstrap (the bit which loads /boot/loader).
|
40499 |
17-Oct-1998 |
obrien |
To clarify last commit, msmith says: The reason the Alpha has less room than the i386 is because the bootstrap is given a 256K mapping by the firmware; to add more requires extra work.
|
40458 |
16-Oct-1998 |
msmith |
Reduce the sbrk() increment from 64K to 4K. There's not much room on the Alpha, and wasting potentially 64K-4 bytes of RAM just isn't an option.
|
40036 |
07-Oct-1998 |
msmith |
Add strcasecmp source file required for dosfs operation.
|
40005 |
06-Oct-1998 |
msmith |
Enable the DOS filesystem. This allows reading from various DOS filesystems (FAT12/16/32, VFAT).
Make a private copy of strcasecmp, as the "real" one uses the system ctype header, which introduces locale poisoning.
|
39942 |
04-Oct-1998 |
msmith |
Don't build with -g.
|
39863 |
01-Oct-1998 |
msmith |
Prune unused zalloc components as recommended by Matt Dillon. Extra debugging code is still enabled (it's not very expensive).
|
39672 |
26-Sep-1998 |
dfr |
* Enable old UFS compatibility code for booting from Digital Unix formatted disks. * Fix a whole raft of warnings, printf and otherwise. * Make zalloc work for alpha (just a case of using the right typedef). * Add some (disabled) malloc debug printing to stand.h.
|
39666 |
26-Sep-1998 |
dillon |
Fixed setting of mp_End in zextendPool(). A case was missing and mp_Size no longer reflects the mp_End - mp_Base equivalent.
|
39665 |
26-Sep-1998 |
msmith |
Replace the old and extremely icky Mach/NetBSD allocator with a similarly compact and much better one donated by Matt Dillon. Implement a simple sbrk() which uses the existing setheap() api.
Remove the custom allocator from the UFS code. It wasn't working quite right, and it shouldn't be needed with the new allocator.
Fix a serious problem with changing the value of already-existent environment variables. Don't attempt to modify the supposedly-const argument to putenv()
Fix an off-by-one sizing error in the zipfs code detected by the new allocator.
Submitted by: zmalloc from Matt Dillon <dillon@backplane.com>
|
39607 |
23-Sep-1998 |
dfr |
Use unsigned chars instead of signed chars when extracting bits of the inet address.
|
39536 |
21-Sep-1998 |
jkh |
Include "stand.h", not <stand.h>.
|
39529 |
20-Sep-1998 |
dfr |
Allocate disk buffers using a custom allocator. The standard allocator fragments extremely badly if disk buffers are freed back into the main heap and the alpha bootstrap has a restricted address space which just ran out :-(.
|
39528 |
20-Sep-1998 |
dfr |
Use a simple version of inet_ntoa(). The libc one uses inet_ntop which is too complicated.
|
39469 |
18-Sep-1998 |
msmith |
Nuke prototype for strerror, consumers get it from <string.h> Fix overlooked nullopen() implementation.
|
39468 |
18-Sep-1998 |
msmith |
Path arguments to *_open functions should be const, but we were mangling them.
Submitted by: write-protected text segment in BTX
|
39203 |
15-Sep-1998 |
msmith |
Remove (wrong) OBJFORMAT setting.
|
38582 |
27-Aug-1998 |
rnordier |
Add support for reading directories as files. Sort out fs_ops, alloc/free.
|
38506 |
24-Aug-1998 |
bde |
Fixed syntax errors (__dead should have gone away years ago, and __attribute__(()) is a gccism - we use __dead2).
|
38453 |
20-Aug-1998 |
msmith |
Install libstand header <stand.h> and manpage (libstand.3)
|
38452 |
20-Aug-1998 |
msmith |
This commit was generated by cvs2svn to compensate for changes in r38451, which included commits to RCS files with non-trunk default branches.
|
38451 |
20-Aug-1998 |
msmith |
This is libstand; a support library for standalone executables (eg. bootstrap modules). Obtained from: NetBSD, with some architectural changes and many additions.
|