| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
For sys/boot/i386 and sys/boot/pc98, separate flags to be passed
directly to the linker (LD_FLAGS) from flags passed indirectly, via the
compiler driver (LDFLAGS).
This is because several Makefiles under sys/boot/i386 and sys/boot/pc98
use ${LD} directly to link, and the normal LDFLAGS value should not be
used in these cases.
Notes:
svn path=/stable/7/; revision=260291
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When rebooting (exiting) from the BTX loader, make sure to restore the
GDT from the correct segment, otherwise a triple fault would be caused.
In some virtual environments (VMware, VirtualBox, etc) this could lead
to a unhandled error or hang in the guest emulation software.
Thanks to avg and jhb for a few hints in the right direction.
Noticed by: Jeremy Chadwick <jdc@koitsu.org> (and many others)
Notes:
svn path=/stable/7/; revision=250151
|
| |
|
|
|
|
|
|
| |
Declare some variables static in order to reduce the object size and
redo r232822 (MFC'ed to stable/7 in r232966) in a less hackish way.
Notes:
svn path=/stable/7/; revision=233470
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a bug introduced in r223938 (MFC'ed to stable/7 in r224410); on
big-endian machines coping a 32-bit quantum bytewise to the address of
a 64-bit variable results in writing to the "wrong" 32-bit half so adjust
the address accordingly. This fix is implemented in a hackish way for
two reasons:
o in order to be able to get it into 8.3 with zero impact on the little-
endian architectures where this bug has no effect and
o to avoid blowing the x86 boot2 out of the water again when compiling
it with clang, which all sane versions of this fix tested do.
This change fixes booting from UFS1 file systems on big-endian machines.
Notes:
svn path=/stable/7/; revision=232966
|
| |
|
|
|
|
|
|
| |
Fix a long standing bug. The caller expects a non-zero value for success.
Luckily keyboard probing was turned off by default from the first revision.
Notes:
svn path=/stable/7/; revision=232418
|
| |
|
|
|
|
|
|
|
| |
- Document TheDraw splash screens in the default loader.conf
Approved by: cperciva
Notes:
svn path=/stable/7/; revision=230652
|
| |
|
|
|
|
|
|
|
| |
Fix 230MB MO support.
Submitted by: Kaho Toshikazu
Notes:
svn path=/stable/7/; revision=229960
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add kern.cam.boot_delay description (with reasonable default) to
default/loader.conf
This should help people installing ${OS} to USB devices, where there are
frequently cases where kernel tries to mount root before actual umass sensing
is finished.
Reviewed by: mav
Approved by: kib
Notes:
svn path=/stable/7/; revision=225260
|
| |
|
|
|
|
|
|
|
|
|
| |
- Mark getc() as inline, this has no effect on gcc but helps clang.
- Move getc() body before xgetc() so gcc does not emit a warning about function
having no body.
Approved by: jhb
Notes:
svn path=/stable/7/; revision=224441
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some more shrinking.
o bunch of variables are turned into uint8_t
o initial setting of namep[] in lookup() is removed
as it's only overwritten a few lines down
o kname is explicitly initialized in main() as BSS
in boot2 is not zeroed
o the setting and reading of "fmt" in load() is removed
o buf in printf() is made static to save space
Reviewed by: jhb
Tested by: me and Fabian Keil <freebsd-listen fabiankeil de>
Notes:
svn path=/stable/7/; revision=224439
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch shrinks boot2 a little.
o It switches kname to be just a pointer instead of an array
thus avoiding a couple of memcpy()s.
o It changes ioctl to unsigned from uint8_t.
o It changes the second keyhit limit to 3 seconds from 5
so that constant propagation can take place.
o It changes the ticks overflow computation as suggested by bde@.
o It removes bi_basemem/bi_extmem/bi_memsizes_valid setting from
bootinfo as it is unused.
Reviewed by: jhb
Notes:
svn path=/stable/7/; revision=224436
|
| |
|
|
|
|
|
|
|
|
|
| |
In sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable
from uint16_t back to uint32_t. The actual option bitmasks (RB_* and
RBX_*) assume at least a 32 bit variable.
Submitted by: rdivacky
Notes:
svn path=/stable/7/; revision=224435
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove reading of symbols from a.out loaded files. Since we are tight
on space for clang and a.out support is only needed for /boot/loader,
they are excess bytes that serve no useful purpose other than to
support really old kernels (FreeBSD < 3.2 or so). Prefer clang
support over support for these old kernels and remove this code. We
gain about 100 bytes of space this way.
Reviewed by: rdivacky@
Notes:
svn path=/stable/7/; revision=224433
|
| |
|
|
|
|
|
|
|
|
|
| |
Avoid using memcpy() for copying 32bit chunks. This shrinks
the resulting code a little.
Approved by: rpaulo (mentor)
Reviewed by: jhb
Notes:
svn path=/stable/7/; revision=224430
|
| |
|
|
|
|
|
|
|
|
|
| |
MFi386: revisions 220389 and 220392
- Mark getc() as inline, this has no effect on gcc but helps clang.
- Move getc() body before xgetc() so gcc does not emit a warning about
function having no body.
Notes:
svn path=/stable/7/; revision=224429
|
| |
|
|
|
|
|
|
|
|
|
| |
MFi386: the part of 219452
- bunch of variables are turned into uint8_t.
- the setting and reading of "fmt" in load() is removed.
- buf in printf() is made static to save space.
Notes:
svn path=/stable/7/; revision=224426
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFi386: revision 219186
This patch shrinks boot2 a little.
o It switches kname to be just a pointer instead of an array.
o It changes ioctl to unsigned from uint8_t.
o It changes the second keyhit limit to 3 seconds from 5.
o It removes bi_basemem/bi_extmem/bi_memsizes_valid setting.
Notes:
svn path=/stable/7/; revision=224424
|
| |
|
|
|
|
|
|
|
| |
MFi386: revision 218745
Remove reading of symbols from a.out loaded files.
Notes:
svn path=/stable/7/; revision=224423
|
| |
|
|
|
|
|
|
|
|
| |
MFi386: revision 218713
Apply a few small optimizations to boot2's code, to make it shrink a
little further.
Notes:
svn path=/stable/7/; revision=224420
|
| |
|
|
|
|
|
|
|
|
| |
MFi386: revision 214210
Avoid using memcpy() for copying 32bit chunks. This shrinks
the resulting code a little.
Notes:
svn path=/stable/7/; revision=224419
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use a cleaner expression to retrieve the memory size in pc98's boot2.c,
which also avoids NULL pointer arithmetic, as suggested by jhb. The
available space goes from 11 bytes to 7.
Reviewed by: nyan
Approved by: rpaulo (mentor)
Notes:
svn path=/stable/7/; revision=224416
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since r219452 the alignment of __dmadat has changed, revealing that fsread()
bogusly casts its contents around causing alignment faults on sparc64 and
most likely also on at least powerpc. Fix this by copying the contents
bytewise instead as partly already done here. Solving this the right way
costs some space, i.e. 148 bytes with GCC and 16 bytes with clang on x86
there are still some bytes left there though, and an acceptable hack which
tricks the compiler into only using a 2-byte alignment instead of the native
one when accessing the contents turned out to even take up more space that.
Notes:
svn path=/stable/7/; revision=224410
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Apply a few small optimizations to boot2's code, to make it shrink a
little further. This gets us further on the way to be able to build it
successfully with clang. Using in-tree gcc, this shrinks boot2.bin with
60 bytes, the in-tree clang shaves off 72 bytes, and ToT clang 84 bytes.
Submitted by: rdivacky
Reviewed by: imp
Notes:
svn path=/stable/7/; revision=224405
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Replace structure assignments with explicity memcpy calls. This allows
Clang to compile this file: it was using the builtin memcpy and we want
to use the memcpy defined in gptboot.c. (Clang can't compile boot2 yet).
Submitted by: Dimitry Andric <dimitry at andric.com>
Reviewed by: jhb
Notes:
svn path=/stable/7/; revision=224404
|
| |
|
|
|
|
|
|
|
|
|
| |
Some of the boot loader code only works on a ufs file system, but it
uses the generic struct dirent, which happens to look identical to UFS's
struct direct. If BSD ever changes dirent then this will be a problem.
Submitted by: matthew dot fleming at isilon dot com
Notes:
svn path=/stable/7/; revision=224403
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- For Cheetah- and Zeus-class CPUs don't flush all unlocked entries from
the TLBs in order to get rid of the user mappings but instead traverse
them an flush only the latter like we also do for the Spitfire-class.
Also flushing the unlocked kernel entries can cause instant faults which
when called from within cpu_switch() are handled with the scheduler lock
held which in turn can cause timeouts on the acquisition of the lock by
other CPUs. This was easily seen with a 16-core V890 but occasionally
also happened with 2-way machines.
While at it, move the SPARC64-V support code entirely to zeus.c. This
causes a little bit of duplication but is less confusing than partially
using Cheetah-class bits for these.
- For SPARC64-V ensure that 4-Mbyte page entries are stored in the 1024-
entry, 2-way set associative TLB.
- In {d,i}tlb_get_data_sun4u() turn off the interrupts in order to ensure
that ASI_{D,I}TLB_DATA_ACCESS_REG actually are read twice back-to-back.
Tested by: Peter Jeremy (16-core US-IV), Michael Moll (2-way SPARC64-V)
Notes:
svn path=/stable/7/; revision=224371
|
| |
|
|
| |
Notes:
svn path=/stable/7/; revision=221758
|
| |
|
|
|
|
|
|
|
| |
Remove the now defunct kern.ipc.nmbufs tunable.
PR: kern/132497 (part)
Notes:
svn path=/stable/7/; revision=220884
|
| |
|
|
|
|
|
|
|
|
| |
Fix some "in in" typos in comments.
PR: 121490
Submitted by: Anatoly Borodin <anatoly.borodin at gmail.com>
Notes:
svn path=/stable/7/; revision=219296
|
| |
|
|
|
|
|
|
|
|
| |
Handle memory allocation failures in include().
PR: i386/85652
Submitted by: Ben Thomas <bthomas at virtualiron.com>
Notes:
svn path=/stable/7/; revision=219054
|
| |
|
|
|
|
|
|
|
|
| |
Fix typos - remove duplicate "the".
PR: bin/154928
Submitted by: Eitan Adler <lists at eitanadler.com>
Notes:
svn path=/stable/7/; revision=218993
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rr216829:
Add driver for DM&P Vortex86 RDC R6040 Fast Ethernet.
The controller is commonly found on DM&P Vortex86 x86 SoC. The
driver supports all hardware features except flow control. The
flow control was intentionally disabled due to silicon bug.
DM&P Electronics, Inc. provided all necessary information including
sample board to write driver and answered many questions I had.
Many thanks for their support of FreeBSD.
H/W donated by: DM&P Electronics, Inc.
r216833:
Remove debugging leftovers.
Notes:
svn path=/stable/7/; revision=218297
|
| |
|
|
|
|
|
|
|
|
|
| |
When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0.
This is the same change that was made in rev 1.33 of boot/i386/btx/btx.S.
PR: i386/91871
Submitted by: Bjorn Konig <bkoenig at cs.tu-berlin.de>
Notes:
svn path=/stable/7/; revision=215632
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Partially revert r203829 (MFC'ed to stable/7 in r205921); as it turns out
what the PowerPC OFW loader did was incorrect as further down the road
cons_probe() calls malloc() so the former can't be called before init_heap()
has succeed. Instead just exit to the firmware in case init_heap() fails
like OF_init() does when hitting a problem as we're then likely running in
a very broken environment where hardly anything can be trusted to work.
Notes:
svn path=/stable/7/; revision=214691
|
| |
|
|
|
|
|
|
|
|
|
| |
Merge from powerpc:
- Change putc_func_t to use a char instead of an int for the character.
- Make functions and variables not used outside of this source file static.
- Remove unused prototypes and variables.
- The OFW read and seek methods take 3 and not 4 input arguments.
Notes:
svn path=/stable/7/; revision=213026
|
| |
|
|
|
|
|
|
| |
If autoboot_delay is set to -1, boot immediately without checking for
a keypress to match the behavior of the loader.
Notes:
svn path=/stable/7/; revision=212915
|
| |
|
|
|
|
|
|
|
|
| |
Add geom_journal
PR: conf/126829
Approved by: rrs (mentor)
Notes:
svn path=/stable/7/; revision=212474
|
| |
|
|
|
|
|
|
| |
Our boot loader is capable of booting both i386 and amd64 kernels so
call it "x86" instead of "i386".
Notes:
svn path=/stable/7/; revision=212300
|
| |
|
|
|
|
|
| |
object type (amd64)
Notes:
svn path=/stable/7/; revision=211586
|
| |
|
|
|
|
|
|
|
|
|
| |
- Set 'dmadat' earlier so that we properly setup the heap if we fail to
locate a high memory area for the heap using the SMAP.
- Read the number of hard drive devices from the BIOS instead of hardcoding
a limit of 128. Some BIOSes duplicate disk devices once you get beyond
the maximum drive number.
Notes:
svn path=/stable/7/; revision=209475
|
| |
|
|
| |
Notes:
svn path=/stable/7/; revision=209415
|
| |
|
|
|
|
|
|
|
|
|
| |
- use correct size (512) while reading a gang block
- skip holes while reading child blocks
- advance buffer pointer while reading child blocks
PR: 144214
Notes:
svn path=/stable/7/; revision=208893
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for SPARC64 V (and where it already makes sense for other
HAL/Fujitsu) CPUs. For the most part this consists of fleshing out the
MMU and cache handling, it doesn't add pmap optimizations possible with
these CPU, yet, though.
With these changes FreeBSD runs stable on Fujitsu Siemens PRIMEPOWER 250
and likely also other models based on SPARC64 V like 450, 650 and 850.
Thanks go to Michael Moll for providing access to a PRIMEPOWER 250.
Notes:
svn path=/stable/7/; revision=207891
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add driver for Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet.
This driver was written by Alexander Pohoyda and greatly enhanced
by Nikolay Denev. I don't have these hardwares but this driver was
tested by Nikolay Denev and xclin.
Because SiS didn't release data sheet for this controller, programming
information came from Linux driver and OpenSolaris. Unlike other open
source driver for SiS190/191, sge(4) takes full advantage of TX/RX
checksum offloading and does not require additional copy operation in
RX handler.
The controller seems to have advanced offloading features like VLAN
hardware tag insertion/stripping, TCP segmentation offload(TSO) as
well as jumbo frame support but these features are not available
yet. Special thanks to xclin <xclin<> cs dot nctu dot edu dot tw>
who sent fix for receiving VLAN oversized frames.
Notes:
svn path=/stable/7/; revision=207228
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Some machines can not only consist of CPUs running at different speeds
but also of different types, f.e. Sun Fire V890 can be equipped with a
mix of UltraSPARC IV and IV+ CPUs, requiring different MMU initialization
and different workarounds for model specific errata. Therefore move the
CPU implementation number from a global variable to the per-CPU data.
Functions which are called before the latter is available are passed the
implementation number as a parameter now.
Notes:
svn path=/stable/7/; revision=206004
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the SUNW,{d,i}tlb-load methods for entering locked TLB entries like
OpenBSD and OpenSolaris do instead of fiddling with the MMUs ourselves.
Unlike direct access the firmware methods don't automatically use the
next free (?) TLB slot, instead the slot to be used has to be specified.
We allocate the TLB slots for the kernel top-down as OpenSolaris suggests
that the firmware will always allocate the ones for its own use bottom-up.
Besides being simpler, according to OpenBSD using the firmware methods is
required to allow booting on Sun Fire E10K with multi-systemboard domains.
Notes:
svn path=/stable/7/; revision=205923
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware
of Sun Fire V1280 doesn't round up the size itself but instead lets
claiming of non page-sized amounts of memory fail.
- Change parameters and variables related to the TLB slots to unsigned
which is more appropriate.
- Search the whole OFW device tree instead of only the children of the
root nexus device for the BSP as starting with UltraSPARC IV the 'cpu'
nodes hang off of from 'cmp' (chip multi-threading processor) or 'core'
or combinations thereof. Also in large UltraSPARC III based machines
the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which
group snooping-coherency domains together instead of directly from the
nexus.
- Add support for UltraSPARC IV and IV+ BSPs. Due to the fact that these
are multi-core each CPU has two Fireplane config registers and thus the
module/target ID has to be determined differently so the one specific
to a certain core is used. Similarly, starting with UltraSPARC IV the
individual cores use a different property in the OFW device tree to
indicate the CPU/core ID as it no longer is in coincidence with the
shared slot/socket ID.
While at it additionally distinguish between CPUs with Fireplane and
JBus interconnects as these also use slightly different sizes for the
JBus/agent/module/target IDs.
- Check the return value of init_heap(). This requires moving it after
cons_probe() so we can panic when appropriate. This should be fine as
the PowerPC OFW loader uses that order for quite some time now.
Notes:
svn path=/stable/7/; revision=205921
|
| |
|
|
|
|
|
|
|
| |
actually contains ZFS support.
Submitted by: Alexander Zagrebin alexz of visp ru
Notes:
svn path=/stable/7/; revision=205539
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add code allowing a network device to only be open and closed once
by keeping it opened after the first open and closing it via the
cleanup handler when NETIF_OPEN_CLOSE_ONCE is defined. Note that
due to the fact that the part of r177108 which reverts r60506 and
causes the open-close-dance on every file access as the remaining
problems with powerpc should be sorted out first, in stable/7 the
only difference in behavior between when NETIF_OPEN_CLOSE_ONCE is
defined and not currently is that with that macro defined the
network device is eventually closed before entering the kernel and
before rebooting.
- Define NETIF_OPEN_CLOSE_ONCE on sparc64 in order to not keep the
network device opened forever, as at least with some firmware
versions received packets are DMA'ed to stale memory otherwise.
Notes:
svn path=/stable/7/; revision=202409
|
| |
|
|
|
|
|
|
|
|
| |
Remove clause 3 and 4 from TNF licenses (this was the only 4-clause TNF
license FreeBSD had in sys/boot).
Obtained from: NetBSD
Notes:
svn path=/stable/7/; revision=202405
|