Commit Graph

1546 Commits

Author SHA1 Message Date
roy
03db8b97a4 Fix build with clang. 2017-02-03 17:24:43 +00:00
nonaka
d13f498989 Initial commit of native amd64 EFI boot loader. 2017-01-24 11:09:14 +00:00
maxv
88aac29387 Explain how all that mess works, without actually fixing it yet. 2017-01-06 09:14:36 +00:00
maxv
d5c86237f5 Fix a wrong flag and KNF. 2016-12-03 09:20:55 +00:00
dholland
9367ee5723 Check bounds on input. From Michael Plass. 2016-09-05 21:11:11 +00:00
martin
f4a9b09e6c Initialize the marker for the data segment, in case the caller passes not
fully initialized markers to loadfile().
Pointed out by Mark Cave-Ayland.
2016-08-31 16:22:37 +00:00
dholland
030c3497b1 Remove gets() from here too. 2016-08-27 18:59:18 +00:00
dholland
e3acc29ae1 PR 51200 gets in libsa considered harmful: remove gets() from libsa. 2016-08-27 06:31:42 +00:00
christos
4c2fb15304 delete now unused function . 2016-08-21 08:27:57 +00:00
jdolecek
3c404120db extract crc16 code from utoppy driver to a separate file in libkern, for use
by ext2fs; every usage gets their own copy of the table for now, as it's
fairly small, and too rare to be used to be useful pulling into every kernel
2016-08-20 19:44:46 +00:00
scole
d3196bfdc3 PR port-ia64/51261
Use common/lib/libc/arch/ia64/string functions
2016-08-05 17:10:48 +00:00
rjs
f0f10739bd Another header change. 2016-08-04 21:39:20 +00:00
nonaka
4c81930262 Sync with sys/ufs/ext2fs/ext2fs_bswap.c. 2016-08-04 06:58:41 +00:00
nonaka
d20f5b128f pass EXT2_DINODE_SIZE(fs) as isize to e2fs_iload().
should fix build failure.
2016-08-04 03:16:00 +00:00
rjs
bbe119dec3 Adjust for change to kernel ext2fs headers. 2016-08-03 09:11:18 +00:00
msaitoh
8bc54e5be6 KNF. Remove extra spaces. No functional change. 2016-07-07 06:55:38 +00:00
isaki
82b5f6482c Fix typo. 2016-06-25 04:53:32 +00:00
dholland
bf8938557c PR 51200 gets in libsa considered harmful: use kgets 2016-06-11 06:58:42 +00:00
dholland
979b72c6a6 gets_s -> kgets.
The exact name isn't that important; but it is important not to use
"gets_s" and thereby allow anyone to falsely get the impression we're
implementing Annex K. We aren't.

ok core.
2016-06-11 06:20:11 +00:00
christos
aab1a996f7 dedup 2016-06-05 15:05:49 +00:00
maxv
6896e29d1e Remove the ALLOC_FIRST_FIT and ALLOC_TRACE options. This is a rather simple
allocator, and it does not need to be that complicated.
2016-06-05 13:44:48 +00:00
maxv
f5998d880a Use gets_s instead of gets. The x86 bootloader prompt is easy to
overflow.
2016-06-05 13:33:03 +00:00
rtr
a44831a800 provide const versions of container_of macros.
discussed with riastradh@ by email
2016-05-11 03:17:22 +00:00
christos
ee17f398d4 move scsipi_strvis -> libkern:strnvisx()
change the prototype to match userland
fix sizes of strings passed to it
2016-05-02 19:18:29 +00:00
riastradh
96b890b34c Fix relation in rngtest failure message to match reality. 2016-03-28 15:20:16 +00:00
mrg
65f5251eae remove a bunch of "@echo done" from the tail of rules. these messages
were vaguely useful back when we didn't run make -j, but now you end
up with a single line "done" every so often, with no idea what it is
for.  very few other targets claim they're done so just remove these.
2016-03-22 08:25:22 +00:00
christos
95614a30c2 PR/50952: David Binderman: Clarify expression 2016-03-11 18:38:25 +00:00
tsutsui
89a198b4f5 Add an option (LIBSA_CREAD_NOCRC) to disable gunzip CRC32 calculation.
No obvious sideeffect on booting i386 GENERIC kernels (without the option).
Closes PR/50638 (Extreme slowness on loading gzipped kernels on old CPUs).
2016-01-17 04:35:42 +00:00
mrg
091c49eab9 remove "@echo done" from 4 rules that don't need it and the random "done"
in my build logs don't help understanding.
2015-10-29 00:18:55 +00:00
uebayasi
ea72de740f Order library object build. 2015-09-07 03:44:19 +00:00
uebayasi
9068ec741b Sprinkle more done messages. 2015-09-07 03:20:18 +00:00
uebayasi
dd204a345e In kernel lib build, print message when things not only start bug also end. 2015-09-06 15:34:55 +00:00
uebayasi
f1616b9172 Set buildprefix. 2015-09-03 02:46:04 +00:00
uebayasi
593f1cf00f Use "prefix" to specify path out of $S. 2015-09-01 13:46:29 +00:00
dholland
ec175d5025 Add new accessors for the d_type and d_namlen fields of struct lfs_direct.
Napalm the old byteswap access logic for these.
2015-09-01 06:16:58 +00:00
dholland
eb2560adae The ifile's inode number is constant. (it is always 1)
Therefore, storing the value in the superblock and reading it out
again is silly and offers the opportunity for it to become corrupted.
So, don't do that (most of the code already didn't) and use the
existing constant instead. Initialize new 32-bit superblocks with
the value for the sake of old userland programs, but don't keep the
value in the 64-bit superblock at all.

(approved by Margo Seltzer)
2015-09-01 06:12:04 +00:00
uebayasi
e7a049ec66 Include opt_diagnostic.h. 2015-08-30 07:55:45 +00:00
dholland
b1828e0ba3 Hack up dinode usage to be 64 vs. 32 as needed. Part 1.
(This part changes the native lfs code; the ufs-derived code already
has 64 vs. 32 logic, but as aspects of it are unsafe, and don't
entirely interoperate cleanly with the lfs 64/32 stuff, pass 2 will be
rehashing that.)
2015-08-12 18:28:00 +00:00
dholland
32577c4f1c Add IFILE32 and IFILE64 structures for the on-disk ifile entries.
Add and use accessors. There are also a bunch of places that cast and
I hope I've found them all...
2015-08-12 18:25:51 +00:00
dholland
9e5184b86b Add a (draft) 64-bit superblock. Make things build again.
Add pieces of support for using both superblock types where
convenient, and specifically to the superblock accessors, but don't
actually enable it anywhere.

First substantive step on PR 50000.
2015-08-02 18:18:09 +00:00
tsutsui
f2142f537b Revert untested and unnecessary change in previous rev 1.36.
Our autobuild doesn't always reflect the latest fixes.
2015-07-30 15:29:52 +00:00
christos
7c7a7b43d2 add mulsi3, needed by inet_addr.o 2015-07-30 07:44:40 +00:00
dholland
62d11b422e Move struct salfs back inside libsa now that lfs_accessors.h is separate. 2015-07-28 05:13:14 +00:00
dholland
34f0d74c9e Add a new lfs header file: lfs_accessors.h.
This contains all the accessor functions and macros out of lfs.h.
Add an include of lfs_accessors.h after all uses of lfs.h... except
for code that wants to define its own struct lfs-alike that the
accessors are supposed to play along with. For these, set STRUCT_LFS
and include lfs_accessors.h after the necessary structure has been
defined, so that lfs_accessors.h can emit functions in terms of it.
2015-07-28 05:09:34 +00:00
isaki
b0705370de white space -> tab. 2015-07-25 07:06:11 +00:00
dholland
f59b8f4b3a Switch to accessor functions for elements of the LFS on-disk
superblock. This will allow switching between 32/64 bit forms on the
fly; it will also allow handling LFS_EI reasonably tidily. (That
currently doesn't work on the superblock.)

It also gets rid of cpp abuse in the form of fake structure member
macros.

Also, instead of doing sleep/wakeup on &lfs_avail and &lfs_nextseg
inside the on-disk superblock, add extra elements to the in-memory
struct lfs for this. (XXX: these should be changed to condvars, but
not right now)

XXX: this migrates a structure needed by the lfs code in libsa (struct
salfs) into lfs.h, where it doesn't belong, but for the time being
this is necessary in order to allow the accessors (and the various
lfs macros and other goop that relies on them) to compile.
2015-07-24 06:56:41 +00:00
dholland
656ac806f0 Rearrange the structures in the lfs bootbollocks slightly.
This generates the same output (at least on amd64) but will be more
robust until we're ready to deploy lfs64 bootblocks too.

XXX: I don't think these actually work right now, and the logic for
picking between v1 and v2 lfs formats (which is not related to ffsv1
vs. ffsv2) is definitely broken. But I haven't made it any worse.
2015-07-24 06:53:24 +00:00
matt
c98065b9f6 If the platform support popcount as a __builtin, use that in preference
to the libc versions.
2015-05-29 19:38:59 +00:00
matt
71577e7b2d Use ARM_ENTRY since these aren't thumb compatible. 2015-05-25 18:41:08 +00:00
christos
925d349b50 tricks with sizeof() make coverity complain. 2015-05-09 18:49:36 +00:00