Content-Length: 909500 | pFad | http://github.com/DragonFlyBSD/DragonFlyBSD/commit/371ab44d3fd55fc8bcaecb5d9c4183ea400509f8

4B Changes requested by dillon · DragonFlyBSD/DragonFlyBSD@371ab44 · GitHub
Skip to content

Commit 371ab44

Browse files
author
Diederik de Groot
committed
Changes requested by dillon
1 parent 75c653a commit 371ab44

File tree

7 files changed

+66
-65
lines changed

7 files changed

+66
-65
lines changed

sys/boot/common/loader.8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ will probe for a console and set the
7878
.Va console
7979
variable, or set it to serial console
8080
.Pq Dq comconsole
81-
if the previous boot stage already used it. If the speed of
81+
if the previous boot stage already used it. If the speed of
8282
the serial connection was already specified in a previous boot
8383
stage it will set
8484
.Va comconsole_speed
@@ -524,7 +524,7 @@ The default is
524524
.Dq Li kernel .
525525

526526
.It Va comconsole_speed
527-
Defines the speed of the serial console. If the previous boot stage
527+
Defines the speed of the serial console. If the previous boot stage
528528
indicated that a serial console is in use then this variable is initialized
529529
to the current speed of the console serial port.
530530
Otherwise it is set to 115200 unless this was overridden using the

sys/boot/common/rbx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
static const char optstr[NOPT] = "asrdcvhCgmpqnDM";
3131
/* Also 'P':ProbeKeyboard, 'S':SetSerialSpeed */
32-
32+
3333
/* these _LOG2 values are be calculated at compile time */
3434
static const unsigned char flags[NOPT] = {
3535
_LOG2(RB_ASKNAME),

sys/boot/pc32/boot0/boot0.S

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Redistribution and use in source and binary forms, with or without
88
* modification, are permitted provided that the following conditions
99
* are met:
10-
*
10+
*
1111
* 1. Redistributions of source code must retain the above copyright
1212
* notice, this list of conditions and the following disclaimer.
1313
* 2. Redistributions in binary form must reproduce the above copyright
@@ -17,7 +17,7 @@
1717
* 3. Neither the name of The DragonFly Project nor the names of its
1818
* contributors may be used to endorse or promote products derived
1919
* from this software without specific, prior written permission.
20-
*
20+
*
2121
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2222
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2323
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -30,7 +30,7 @@
3030
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
3131
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3232
* SUCH DAMAGE.
33-
*
33+
*
3434
* Copyright (c) 2008 Luigi Rizzo (mostly documentation)
3535
* Copyright (c) 2002 Bruce M. Simpson
3636
* Copyright (c) 1998 Robert Nordier
@@ -88,7 +88,7 @@
8888
*
8989
* This code implements a Master Boot Record (MBR) for an Intel/PC disk.
9090
* It is 512 bytes long and it is normally loaded by the BIOS (or another
91-
* bootloader) at 0:0x7c00 (ie: LOAD). This code depends on
91+
* bootloader) at 0:0x7c00 (ie: LOAD). This code depends on
9292
* %cs:%ip being 0:0x7c00
9393
*
9494
* The initial chunk of instructions is used as a signature by external
@@ -123,7 +123,7 @@
123123
*
124124
* On entry, the registers contain the following values:
125125
*
126-
* %cs:%ip 0:0x7c00 (ie:LOAD)
126+
* %cs:%ip 0:0x7c00 (ie:LOAD)
127127
* %dl drive number (0x80, 0x81, ... )
128128
* %si pointer to the partition table from which we were loaded.
129129
* Some boot code (e.g. syslinux) use this info to relocate
@@ -565,7 +565,7 @@ putstr.1: callw putchr # Display char
565565
putstr: lodsb # Get byte
566566
testb $0x80,%al # End of string?
567567
jz putstr.1 # No
568-
andb $~0x80,%al # Clear MSB then print last
568+
andb $~0x80,%al # Clear MSB then print last
569569

570570
putchr:
571571
#ifndef SIO

sys/boot/pc32/boot2/boot2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ printf(const char *fmt,...)
662662
continue;
663663
#ifdef HAMMER2FS
664664
case 'q':
665-
case 'x':
665+
case 'x':
666666
if (c=='q') { /* save space */
667667
++fmt; /* skip the 'x' */
668668
q = va_arg(ap, uint64_t);

sys/boot/pc32/libi386/comconsole.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
#include <ns16550.h>
3434
#include "libi386.h"
3535

36-
#define COMC_FMT 0x3 /* 8N1 */
37-
#define COMC_TXWAIT 0x40000 /* transmit timeout */
38-
#define COMC_BPS(x) (115200 / (x)) /* speed to DLAB divisor */
39-
#define COMC_DIV2BPS(x) (115200 / (x)) /* DLAB divisor to speed */
36+
#define COMC_FMT 0x3 /* 8N1 */
37+
#define COMC_TXWAIT 0x40000 /* transmit timeout */
38+
#define COMC_BPS(x) (x ? (115200 / (x)) : 1) /* speed to DLAB divisor */
39+
#define COMC_DIV2BPS(x) (x ? (115200 / (x)) : 1) /* DLAB divisor to speed */
4040

4141
#ifndef COMPORT
4242
#define COMPORT 0x3f8
@@ -94,7 +94,7 @@ comc_probe(struct console *cp)
9494
uint32_t locator;
9595
#endif
9696
if (comc_curspeed == 0) {
97-
comc_curspeed = 0;
97+
comc_curspeed = COMSPEED;
9898
/*
9999
* Assume that the speed was set by an earlier boot loader if
100100
* comconsole is already the preferred console.
@@ -377,7 +377,7 @@ comc_setup(int speed, int port)
377377
outb(comc_port + com_dlbh, COMC_BPS(speed) >> 8);
378378
outb(comc_port + com_cfcr, COMC_FMT);
379379
outb(comc_port + com_mcr, MCR_RTS | MCR_DTR);
380-
outb(port + com_fifo, FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST | FIFO_DMA_MODE);
380+
outb(comc_port + com_fifo, FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST | FIFO_DMA_MODE);
381381

382382
tries = 0;
383383
do

sys/boot/pc32/loader/main.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*
22
* Copyright (c) 2003,2004 The DragonFly Project. All rights reserved.
3-
*
3+
*
44
* This code is derived from software contributed to The DragonFly Project
55
* by Matthew Dillon <dillon@backplane.com>
6-
*
6+
*
77
* Redistribution and use in source and binary forms, with or without
88
* modification, are permitted provided that the following conditions
99
* are met:
@@ -17,7 +17,7 @@
1717
* 3. Neither the name of The DragonFly Project nor the names of its
1818
* contributors may be used to endorse or promote products derived
1919
* from this software without specific, prior written permission.
20-
*
20+
*
2121
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2222
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2323
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -30,7 +30,7 @@
3030
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
3131
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3232
* SUCH DAMAGE.
33-
*
33+
*
3434
* Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
3535
* All rights reserved.
3636
*
@@ -79,7 +79,7 @@
7979

8080
#define COMCONSOLE_DEBUG 1
8181
/* Arguments passed in from the boot1/boot2 loader */
82-
static struct
82+
static struct
8383
{
8484
u_int32_t howto;
8585
u_int32_t bootdev;
@@ -173,9 +173,9 @@ main(void)
173173
bzero(&v86, sizeof(v86));
174174
v86.efl = PSL_RESERVED_DEFAULT | PSL_I;
175175

176-
/*
176+
/*
177177
* Initialize the heap as early as possible. Once this is done,
178-
* malloc() is usable.
178+
* malloc() is usable.
179179
*
180180
* Don't include our stack in the heap. If the stack is in low
181181
* user memory use {end,bios_basemem}. If the stack is in high
@@ -184,7 +184,7 @@ main(void)
184184
* the heap to bios_basemem.
185185
*
186186
* Be sure to use the virtual bios_basemem address rather then
187-
* the physical bios_basemem address or we may overwrite BIOS
187+
* the physical bios_basemem address or we may overwrite BIOS
188188
* data.
189189
*/
190190
bios_getmem();
@@ -209,8 +209,8 @@ main(void)
209209
#endif
210210
setheap((void *)heapbase, (void *)memtop);
211211

212-
/*
213-
* XXX Chicken-and-egg problem; we want to have console output early,
212+
/*
213+
* XXX Chicken-and-egg problem; we want to have console output early,
214214
* but some console attributes may depend on reading from eg. the boot
215215
* device, which we can't do yet.
216216
*
@@ -262,7 +262,7 @@ main(void)
262262
(devsw[i]->dv_init)();
263263
/*WDEBUG('M' + i);*/
264264
}
265-
printf("BIOS %dkB/%dkB available memory\n",
265+
printf("BIOS %dkB/%dkB available memory\n",
266266
bios_basemem / 1024, bios_extmem / 1024);
267267
if (initial_bootinfo != NULL) {
268268
initial_bootinfo->bi_basemem = bios_basemem / 1024;
@@ -286,7 +286,7 @@ main(void)
286286
printf("(%s, %s)\n", bootprog_maker, bootprog_date);
287287

288288
#if COMCONSOLE_DEBUG
289-
printf("args at %p initial_howto = %08x bootdev = %08x bootinfo = %p\n",
289+
printf("args at %p initial_howto = %08x bootdev = %08x bootinfo = %p\n",
290290
kargs, initial_howto, initial_bootdev, initial_bootinfo);
291291
if (initial_howto & RB_SERIAL) {
292292
printf("Serial at Speed:%s on Port:%s\n", getenv("comconsole_speed"), getenv("comconsole_port"));
@@ -296,7 +296,7 @@ main(void)
296296

297297
extract_currdev(); /* set $currdev and $loaddev */
298298
setenv("LINES", "24", 1); /* optional */
299-
299+
300300
bios_getsmap();
301301

302302
archsw.arch_autoload = i386_autoload;
@@ -314,7 +314,7 @@ main(void)
314314
}
315315

316316
/*
317-
* Set the 'current device' by (if possible) recovering the boot device as
317+
* Set the 'current device' by (if possible) recovering the boot device as
318318
* supplied by the initial bootstrap.
319319
*
320320
* XXX should be extended for netbooting.
@@ -357,14 +357,14 @@ extract_currdev(void)
357357
/*
358358
* If we are booted by an old bootstrap, we have to guess at the BIOS
359359
* unit number. We will loose if there is more than one disk type
360-
* and we are not booting from the lowest-numbered disk type
360+
* and we are not booting from the lowest-numbered disk type
361361
* (ie. SCSI when IDE also exists).
362362
*/
363363
if ((biosdev == 0) && (B_TYPE(initial_bootdev) != 2)) /* biosdev doesn't match major */
364364
biosdev = 0x80 + B_UNIT(initial_bootdev); /* assume harddisk */
365365
}
366366
new_currdev.d_type = new_currdev.d_dev->dv_type;
367-
367+
368368
/*
369369
* If we are booting off of a BIOS disk and we didn't succeed in determining
370370
* which one we booted off of, just use disk0: as a reasonable default.

sys/sys/reboot.h

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -42,42 +42,43 @@
4242
*/
4343
#define RB_AUTOBOOT 0 /* flags for system auto-booting itself */
4444

45-
#define RB_ASKNAME 1 << 0 /* ask for file name to reboot from (-a) */
46-
#define RB_SINGLE 1 << 1 /* reboot to single user only (-s) */
47-
#define RB_NOSYNC 1 << 2 /* dont sync before reboot (unused) */
48-
#define RB_HALT 1 << 3 /* don't reboot, just halt */
49-
#define RB_INITNAME 1 << 4 /* name given for /etc/init (unused) */
50-
#define RB_DFLTROOT 1 << 5 /* use compiled-in rootdev (-r) */
51-
#define RB_KDB 1 << 6 /* give control to kernel debugger (-d) */
52-
#define RB_RDONLY 1 << 7 /* mount root fs read-only (unused) */
53-
#define RB_DUMP 1 << 8 /* dump kernel memory before reboot (unused) */
54-
#define RB_MINIROOT 1 << 9 /* mini-root present in memory at boot time (unused) */
55-
#define RB_CONFIG 1 << 10 /* was: invoke user configuration routing (-c) */
56-
#define RB_VERBOSE 1 << 11 /* print all potentially useful info (-v) */
57-
#define RB_SERIAL 1 << 12 /* user serial port as console (-h) */
58-
#define RB_CDROM 1 << 13 /* use cdrom as root (-C) */
59-
#define RB_POWEROFF 1 << 14 /* if you can, turn the power off (unused) */
60-
#define RB_GDB 1 << 15 /* use GDB remote debugger instead of DDB (-g) */
61-
#define RB_MUTE 1 << 16 /* Come up with the console muted (-m) */
62-
#define RB_SELFTEST 1 << 17 /* don't boot to normal operation, do selftest (unused) */
63-
#define RB_RESERVED01 1 << 18 /* reserved for internal use of boot blocks */
64-
#define RB_RESERVED02 1 << 19 /* reserved for internal use of boot blocks */
65-
#define RB_PAUSE 1 << 20 /* pause after each output line during probe (-p) */
66-
#define RB_QUIET 1 << 21 /* Don't generate output during boot1/boot2 (-q) */
67-
//#define RB_REROOT 1 << 21 /* unmount the rootfs and mount it again (fbsd)*/
68-
//#define RB_POWERCYCLE 1 << 22 /* Power cycle if possible (fbsd) */
69-
//#define RB_UNUSED03 1 << 23
70-
//#define RB_UNUSED04 1 << 24
71-
//#define RB_UNUSED05 1 << 25
72-
#define RB_NOINTR 1 << 26 /* Non Interruptable come up (-n) */
73-
#define RB_DUAL 1 << 27 /* use comconsole and vidconsole (-D) */
74-
//#define RB_PROBE 1 << 28 /* Probe multiple consoles (fbsd) */
45+
#define RB_ASKNAME 0x00000001 /* ask for file name to reboot from (-a) */
46+
#define RB_SINGLE 0x00000002 /* reboot to single user only (-s) */
47+
#define RB_NOSYNC 0x00000004 /* dont sync before reboot (unused) */
48+
#define RB_HALT 0x00000008 /* don't reboot, just halt */
49+
#define RB_INITNAME 0x00000010 /* name given for /etc/init (unused) */
50+
#define RB_DFLTROOT 0x00000020 /* use compiled-in rootdev (-r) */
51+
#define RB_KDB 0x00000040 /* give control to kernel debugger (-d) */
52+
#define RB_RDONLY 0x00000080 /* mount root fs read-only (unused) */
53+
#define RB_DUMP 0x00000100 /* dump kernel memory before reboot (unused) */
54+
#define RB_MINIROOT 0x00000200 /* mini-root present in memory at boot time (unused) */
55+
#define RB_CONFIG 0x00000400 /* was: invoke user configuration routing (-c) */
56+
#define RB_VERBOSE 0x00000800 /* print all potentially useful info (-v) */
57+
#define RB_SERIAL 0x00001000 /* user serial port as console (-h) */
58+
#define RB_CDROM 0x00002000 /* use cdrom as root (-C) */
59+
#define RB_POWEROFF 0x00004000 /* if you can, turn the power off (unused) */
60+
#define RB_GDB 0x00008000 /* use GDB remote debugger instead of DDB (-g) */
61+
#define RB_MUTE 0x00010000 /* Come up with the console muted (-m) */
62+
#define RB_SELFTEST 0x00020000 /* don't boot to normal operation, do selftest (unused) */
63+
#define RB_RESERVED01 0x00040000 /* reserved for internal use of boot blocks */
64+
#define RB_RESERVED02 0x00080000 /* reserved for internal use of boot blocks */
65+
#define RB_PAUSE 0x00100000 /* pause after each output line during probe (-p) */
66+
//#define RB_REROOT 0x00200000 /* freebsd */
67+
#define RB_QUIET 0x00200000 /* Don't generate output during boot1/boot2 (-q) */
68+
//#define RB_REROOT 0x00400000 /* unmount the rootfs and mount it again (fbsd)*/
69+
//#define RB_POWERCYCLE 0x00800000 /* Power cycle if possible (fbsd) */
70+
//#define RB_UNUSED03 0x01000000
71+
//#define RB_UNUSED04 0x02000000
72+
//#define RB_UNUSED05 0x04000000
73+
#define RB_NOINTR 0x08000000 /* Non Interruptable come up (-n) */
74+
#define RB_DUAL 0x10000000 /* use comconsole and vidconsole (-D) */
75+
//#define RB_PROBE 0x20000000 /* Probe multiple consoles (fbsd) */
7576

7677
/* temp fixup */
77-
#define RB_VIDEO 1 << 29 /* use video console */
78-
#define RB_MULTIPLE 1 << 29 /* use multiple consoles (-D) */
78+
#define RB_VIDEO 0x40000000 /* use video console */
79+
#define RB_MULTIPLE 0x40000000 /* use multiple consoles (-D) */
7980
/* end temp */
8081

81-
#define RB_BOOTINFO 1 << 31 /* have `struct bootinfo *' arg */
82+
#define RB_BOOTINFO 0x8000000 /* have `struct bootinfo *' arg */
8283

8384
#endif

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/DragonFlyBSD/DragonFlyBSD/commit/371ab44d3fd55fc8bcaecb5d9c4183ea400509f8

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy