PERFORCE change 98945 for review
Warner Losh
imp at FreeBSD.org
Sat Jun 10 23:48:01 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=98945
Change 98945 by imp at imp_lighthouse on 2006/06/10 23:45:12
IFC @98944
Affected files ...
.. //depot/projects/arm/src/sys/dev/sdhc/sdhc_pci.c#9 edit
.. //depot/user/imp/arm/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#25 integrate
.. //depot/user/imp/arm/sbin/ggate/ggatec/ggatec.8#4 integrate
.. //depot/user/imp/arm/share/man/man4/acpi.4#4 integrate
.. //depot/user/imp/arm/share/man/man4/bge.4#8 integrate
.. //depot/user/imp/arm/sys/dev/acpica/acpi.c#11 integrate
.. //depot/user/imp/arm/sys/dev/acpica/acpi_battery.c#9 integrate
.. //depot/user/imp/arm/sys/dev/acpica/acpi_thermal.c#7 integrate
.. //depot/user/imp/arm/sys/dev/ipw/if_ipw.c#10 integrate
.. //depot/user/imp/arm/sys/dev/ipw/if_ipwvar.h#3 integrate
.. //depot/user/imp/arm/sys/i386/acpica/acpi_machdep.c#4 integrate
.. //depot/user/imp/arm/sys/i386/acpica/acpi_wakecode.S#3 integrate
.. //depot/user/imp/arm/sys/i386/acpica/acpi_wakeup.c#5 integrate
.. //depot/user/imp/arm/sys/kern/kern_mbuf.c#13 integrate
.. //depot/user/imp/arm/sys/kern/subr_firmware.c#2 integrate
.. //depot/user/imp/arm/sys/kern/sys_pipe.c#4 integrate
.. //depot/user/imp/arm/sys/kern/sysv_msg.c#2 integrate
.. //depot/user/imp/arm/sys/kern/sysv_sem.c#2 integrate
.. //depot/user/imp/arm/sys/kern/sysv_shm.c#5 integrate
.. //depot/user/imp/arm/sys/kern/uipc_mbuf.c#12 integrate
.. //depot/user/imp/arm/sys/kern/uipc_socket.c#17 integrate
.. //depot/user/imp/arm/sys/kern/uipc_socket2.c#10 integrate
.. //depot/user/imp/arm/sys/kern/uipc_syscalls.c#9 integrate
.. //depot/user/imp/arm/sys/sys/firmware.h#2 integrate
.. //depot/user/imp/arm/sys/sys/socketvar.h#7 integrate
.. //depot/user/imp/arm/sys/sys/sysctl.h#5 integrate
.. //depot/user/imp/newcard/gnu/fs/xfs/FreeBSD/xfs_mountops.c#6 integrate
.. //depot/user/imp/newcard/gnu/fs/xfs/FreeBSD/xfs_super.c#4 integrate
.. //depot/user/imp/newcard/gnu/fs/xfs/FreeBSD/xfs_vnops.c#3 integrate
.. //depot/user/imp/newcard/sys/firmware.h#3 integrate
Differences ...
==== //depot/projects/arm/src/sys/dev/sdhc/sdhc_pci.c#9 (text+ko) ====
==== //depot/user/imp/arm/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#25 (text+ko) ====
@@ -3,7 +3,7 @@
<corpauthor>The &os; Project</corpauthor>
- <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.938 2006/05/31 23:49:51 bmah Exp $</pubdate>
+ <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.939 2006/06/10 14:49:44 bmah Exp $</pubdate>
<copyright>
<year>2000</year>
@@ -359,6 +359,12 @@
<para arch="pc98">A bootable CDROM loader has been implemented
for the pc98 platform.</para>
+
+ <para arch="i386">A bug in the i386 boot loader, which could
+ cause filesystem corruption if
+ a <filename>nextboot.conf</filename> file was used and landed
+ after cylinder 1023, has been fixed.</para>
+
</sect3>
<sect3 id="proc">
@@ -557,6 +563,8 @@
<para>The &man.my.4; driver is now MPSAFE. &merged;</para>
+ <para>The &man.my.4; driver now supports &man.altq.4;</para>
+
<para arch="i386,amd64">The &man.myri10ge.4; driver,
which supports Myricom Myri10GE 10 Gigabit Ethernet
adapters, has been added. For more details, see
@@ -880,6 +888,13 @@
geli_da1s3a_keyfile0_type="da1s3a:geli_keyfile0"
geli_da1s3a_keyfile0_name="/boot/keys/da1s3a.key"</programlisting>
+ <para>&man.geli.8; is now able to perform data integrity
+ verification (data authentication) of encrypted data stored on
+ disk. Note that the encryption algorithm is now specified to
+ the &man.geli.8; control program using the <option>-e</option>
+ option; the <option>-a</option> option is now used to specify
+ the authentication algorithm</para>
+
<para>The &man.umass.4; driver now supports
<literal>PLAY_MSF</literal>,
<literal>PLAY_TRACK</literal>,
@@ -915,7 +930,7 @@
been updated to a snapshot from DRI CVS as of 20051202. &merged;</para>
<para>TrustedBSD <application>OpenBSM</application>,
- version 1.0 alpha 5, an implementation of the documented Sun Basic
+ version 1.0 alpha 6, an implementation of the documented Sun Basic
Security Module (BSM) Audit API and file format, as well as local
extensions to support the Mac OS X and FreeBSD operating systems
has been added. This also includes command line tools for audit
@@ -984,7 +999,7 @@
<para>The &man.du.1; program now supports a <option>-n</option>
flag, which causes it to ignore files and directories with
- the <literal>nodump</literal> flag set.</para>
+ the <literal>nodump</literal> flag set. &merged;</para>
<para>The &man.find.1; program now supports <option>-Btime</option>
and other related primaries, which can be used to create expressions
@@ -1006,7 +1021,7 @@
<para>The &man.getent.1; utility has been imported from NetBSD.
It retrieves and displays information from an administrative
database (such as <filename>hosts</filename>) using the lookup
- order specified in &man.nsswitch.conf.5;.</para>
+ order specified in &man.nsswitch.conf.5;. &merged;</para>
<para>The &man.gpt.8; utility now supports setting GPT partition labels.</para>
@@ -1571,7 +1586,8 @@
<para>Documentation of existing functionality has been improved by
the addition of the following manual pages:
- &man.acpi.sony.4;, &man.ext2fs.5;,
+ &man.acpi.sony.4;, &man.device.get.sysctl.9;,
+ &man.ext2fs.5;,
&man.mca.8;,
&man.snd.mss.4;, &man.snd.t4dwave.4;,
&man.sysctl.9;.</para>
==== //depot/user/imp/arm/sbin/ggate/ggatec/ggatec.8#4 (text+ko) ====
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/sbin/ggate/ggatec/ggatec.8,v 1.7 2005/11/18 10:32:10 ru Exp $
+.\" $FreeBSD: src/sbin/ggate/ggatec/ggatec.8,v 1.8 2006/06/10 09:45:26 trhodes Exp $
.\"
.Dd April 26, 2004
.Dt GGATEC 8
@@ -159,12 +159,12 @@
.Fl v
option.
.Sh EXAMPLES
-Made use of CD-ROM device from remote host.
+Make use of CD-ROM device from remote host.
.Bd -literal -offset indent
server# cat /etc/gg.exports
client RO /dev/acd0
server# ggated
-
+.Pp
client# ggatec create -o ro server /dev/acd0
ggate0
client# mount_cd9660 /dev/ggate0 /cdrom
==== //depot/user/imp/arm/share/man/man4/acpi.4#4 (text+ko) ====
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.55 2006/05/01 11:56:18 brueffer Exp $
+.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.56 2006/06/10 08:06:16 njl Exp $
.\"
.Dd May 1, 2006
.Dt ACPI 4
@@ -93,6 +93,9 @@
.Xr loader 8
prompt before booting the kernel or stored in
.Pa /boot/loader.conf .
+Many of these tunables also have a matching
+.Xr sysctl 8
+entry for access after boot.
.Bl -tag -width indent
.It Va acpi_dsdt_load
Enables loading of a custom ACPI DSDT.
@@ -107,6 +110,10 @@
The default value is 3.
.It Va debug.acpi.quirks
Override any automatic quirks completely.
+.It Va debug.acpi.resume_beep
+Beep the PC speaker on resume.
+This can help diagnose suspend/resume problems.
+Default is 0 (disabled).
.It Va hint.acpi.0.disabled
Set this to 1 to disable all of ACPI.
If ACPI has been disabled on your system due to a blacklist entry for your
@@ -119,8 +126,9 @@
Override the assumed memory starting address for PCI host bridges.
.It Va hw.acpi.reset_video
Enables calling the VESA reset BIOS vector on the resume path.
-Some graphic chips have problems such as LCD white-out after resume.
-Try setting this to 0 if this causes problems for you.
+This can fix some graphics cards that have problems such as LCD white-out
+after resume.
+Default is 0 (disabled).
.It Va hw.acpi.serialize_methods
Allow override of whether methods execute in parallel or not.
Enable this for serial behavior, which fixes
==== //depot/user/imp/arm/share/man/man4/bge.4#8 (text+ko) ====
@@ -29,7 +29,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
.\" THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/bge.4,v 1.26 2006/04/25 16:52:54 mr Exp $
+.\" $FreeBSD: src/share/man/man4/bge.4,v 1.27 2006/06/10 15:14:12 brueffer Exp $
.\"
.Dd November 15, 2005
.Dt BGE 4
@@ -88,7 +88,8 @@
which support autonegotiation of 10, 100 and 1000Mbps modes in
full or half duplex.
.Pp
-The BCM570x also supports jumbo frames, which can be configured
+The BCM5700, BCM5701, BCM5703, BCM5704, BCM5714 and BCM5780 also support
+jumbo frames, which can be configured
via the interface MTU setting.
Selecting an MTU larger than 1500 bytes with the
.Xr ifconfig 8
==== //depot/user/imp/arm/sys/dev/acpica/acpi.c#11 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.224 2006/05/16 14:36:22 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.225 2006/06/10 08:04:38 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -218,7 +218,7 @@
static const char* sleep_state_names[] = {
"S0", "S1", "S2", "S3", "S4", "S5", "NONE"};
-SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RW, NULL, "ACPI debugging");
+SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RD, NULL, "ACPI debugging");
static char acpi_ca_version[12];
SYSCTL_STRING(_debug_acpi, OID_AUTO, acpi_ca_version, CTLFLAG_RD,
acpi_ca_version, 0, "Version of Intel ACPI-CA");
@@ -516,14 +516,12 @@
OID_AUTO, "suspend_state", CTLTYPE_STRING | CTLFLAG_RW,
&sc->acpi_suspend_sx, 0, acpi_sleep_state_sysctl, "A", "");
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
- OID_AUTO, "sleep_delay", CTLFLAG_RD | CTLFLAG_RW,
- &sc->acpi_sleep_delay, 0, "sleep delay");
+ OID_AUTO, "sleep_delay", CTLFLAG_RW, &sc->acpi_sleep_delay, 0,
+ "sleep delay");
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
- OID_AUTO, "s4bios", CTLFLAG_RD | CTLFLAG_RW,
- &sc->acpi_s4bios, 0, "S4BIOS mode");
+ OID_AUTO, "s4bios", CTLFLAG_RW, &sc->acpi_s4bios, 0, "S4BIOS mode");
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
- OID_AUTO, "verbose", CTLFLAG_RD | CTLFLAG_RW,
- &sc->acpi_verbose, 0, "verbose mode");
+ OID_AUTO, "verbose", CTLFLAG_RW, &sc->acpi_verbose, 0, "verbose mode");
/*
* Default to 1 second before sleeping to give some machines time to
==== //depot/user/imp/arm/sys/dev/acpica/acpi_battery.c#9 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_battery.c,v 1.22 2005/11/23 00:53:01 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_battery.c,v 1.23 2006/06/10 08:04:38 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -482,7 +482,7 @@
NULL, 0, acpi_battery_units_sysctl, "I", "number of batteries");
SYSCTL_ADD_INT(&acpi_battery_sysctl_ctx,
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
- OID_AUTO, "info_expire", CTLFLAG_RD | CTLFLAG_RW,
+ OID_AUTO, "info_expire", CTLFLAG_RW,
&acpi_battery_info_expire, 0,
"time in seconds until info is refreshed");
==== //depot/user/imp/arm/sys/dev/acpica/acpi_thermal.c#7 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.60 2005/09/11 18:39:01 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.61 2006/06/10 08:04:38 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -242,12 +242,12 @@
OID_AUTO, "thermal", CTLFLAG_RD, 0, "");
SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
- OID_AUTO, "min_runtime", CTLFLAG_RD | CTLFLAG_RW,
+ OID_AUTO, "min_runtime", CTLFLAG_RW,
&acpi_tz_min_runtime, 0,
"minimum cooling run time in sec");
SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
- OID_AUTO, "polling_rate", CTLFLAG_RD | CTLFLAG_RW,
+ OID_AUTO, "polling_rate", CTLFLAG_RW,
&acpi_tz_polling_rate, 0, "monitor polling rate");
}
sysctl_ctx_init(&sc->tz_sysctl_ctx);
==== //depot/user/imp/arm/sys/dev/ipw/if_ipw.c#10 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.21 2006/06/02 23:14:39 sam Exp $ */
+/* $FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.22 2006/06/10 17:29:40 iedowse Exp $ */
/*-
* Copyright (c) 2004-2006
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.21 2006/06/02 23:14:39 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.22 2006/06/10 17:29:40 iedowse Exp $");
/*-
* Intel(R) PRO/Wireless 2100 MiniPCI driver
@@ -390,6 +390,11 @@
if (ifp != NULL)
if_free(ifp);
+ if (sc->sc_firmware != NULL) {
+ firmware_put(sc->sc_firmware, FIRMWARE_UNLOAD);
+ sc->sc_firmware = NULL;
+ }
+
mtx_destroy(&sc->sc_mtx);
return 0;
@@ -2002,16 +2007,22 @@
* Load firmware image using the firmware(9) subsystem. We need to
* release the driver's lock first.
*/
- mtx_unlock(&sc->sc_mtx);
- fp = firmware_get(imagename);
- mtx_lock(&sc->sc_mtx);
+ if (sc->sc_firmware == NULL || strcmp(sc->sc_firmware->name,
+ imagename) != 0) {
+ mtx_unlock(&sc->sc_mtx);
+ if (sc->sc_firmware != NULL)
+ firmware_put(sc->sc_firmware, FIRMWARE_UNLOAD);
+ sc->sc_firmware = firmware_get(imagename);
+ mtx_lock(&sc->sc_mtx);
+ }
- if (fp == NULL) {
+ if (sc->sc_firmware == NULL) {
device_printf(sc->sc_dev,
"could not load firmware image '%s'\n", imagename);
goto fail1;
}
+ fp = sc->sc_firmware;
if (fp->datasize < sizeof *hdr) {
device_printf(sc->sc_dev,
"firmware image too short %zu\n", fp->datasize);
@@ -2061,7 +2072,6 @@
goto fail2;
}
- firmware_put(fp, FIRMWARE_UNLOAD);
sc->flags |= IPW_FLAG_FW_INITED;
/* retrieve information tables base addresses */
@@ -2086,6 +2096,7 @@
return;
fail2: firmware_put(fp, FIRMWARE_UNLOAD);
+ sc->sc_firmware = NULL;
fail1: ifp->if_flags &= ~IFF_UP;
ipw_stop(sc);
sc->flags &=~ IPW_FLAG_INIT_LOCKED;
==== //depot/user/imp/arm/sys/dev/ipw/if_ipwvar.h#3 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/ipw/if_ipwvar.h,v 1.4 2006/03/12 19:01:00 damien Exp $ */
+/* $FreeBSD: src/sys/dev/ipw/if_ipwvar.h,v 1.5 2006/06/10 17:29:40 iedowse Exp $ */
/*-
* Copyright (c) 2004-2006
@@ -99,6 +99,7 @@
bus_space_tag_t sc_st;
bus_space_handle_t sc_sh;
void *sc_ih;
+ struct firmware *sc_firmware;
int sc_tx_timer;
==== //depot/user/imp/arm/sys/i386/acpica/acpi_machdep.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_machdep.c,v 1.31 2006/06/08 17:54:10 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_machdep.c,v 1.32 2006/06/10 08:06:16 njl Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -52,8 +52,12 @@
#include <i386/bios/apm.h>
+SYSCTL_DECL(_debug_acpi);
+
uint32_t acpi_resume_beep;
-TUNABLE_INT("hw.acpi.resume_beep", &acpi_resume_beep);
+TUNABLE_INT("debug.acpi.resume_beep", &acpi_resume_beep);
+SYSCTL_UINT(_debug_acpi, OID_AUTO, resume_beep, CTLFLAG_RW, &acpi_resume_beep,
+ 0, "Beep the PC speaker when resuming");
uint32_t acpi_reset_video;
TUNABLE_INT("hw.acpi.reset_video", &acpi_reset_video);
@@ -322,11 +326,7 @@
SYSCTL_ADD_UINT(&sc->acpi_sysctl_ctx,
SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO,
- "resume_beep", CTLFLAG_RD | CTLFLAG_RW, &acpi_resume_beep, 0,
- "Beep the PC speaker when resuming");
- SYSCTL_ADD_UINT(&sc->acpi_sysctl_ctx,
- SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO,
- "reset_video", CTLFLAG_RD | CTLFLAG_RW, &acpi_reset_video, 0,
+ "reset_video", CTLFLAG_RW, &acpi_reset_video, 0,
"Call the VESA reset BIOS vector on the resume path");
return (0);
==== //depot/user/imp/arm/sys/i386/acpica/acpi_wakecode.S#3 (text+ko) ====
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/i386/acpica/acpi_wakecode.S,v 1.11 2006/06/08 17:54:10 njl Exp $
+ * $FreeBSD: src/sys/i386/acpica/acpi_wakecode.S,v 1.13 2006/06/10 08:20:03 njl Exp $
*/
#define LOCORE
@@ -34,20 +34,30 @@
#include "assym.s"
- .align 4096
+/*
+ * Resume entry point. The BIOS enters here in real mode after POST with
+ * CS set to the page where we stored this code. It should configure the
+ * segment registers with a flat 4 GB address space and EFLAGS.IF = 0.
+ * Depending on the previous sleep state, we may need to initialize more
+ * of the system (i.e., S3 suspend-to-RAM vs. S4 suspend-to-disk).
+ */
+ .align 4
.code16
wakeup_16:
nop
cli
+ cld
/*
- * Set up segment registers for real mode and a small stack for
- * any calls we make.
+ * Set up segment registers for real mode, a small stack for
+ * any calls we make, and clear any flags.
*/
movw %cs,%ax
movw %ax,%ds
movw %ax,%ss
movw $PAGE_SIZE,%sp
+ pushl $0
+ popfl
/* To debug resume hangs, beep the speaker if the user requested. */
cmpl $1,resume_beep
@@ -75,22 +85,22 @@
movw %ax,%ss
nobiosreset:
- /* Load GDT for real mode */
- lgdt physical_gdt
+ /* Load GDT for real mode. Use 32 bit prefix for addresses >16 MB. */
+ lgdtl physical_gdt
/* Restore CR2, CR3 and CR4 */
- mov previous_cr2,%eax
- mov %eax,%cr2
- mov previous_cr3,%eax
- mov %eax,%cr3
- mov previous_cr4,%eax
- mov %eax,%cr4
+ movl previous_cr2,%eax
+ movl %eax,%cr2
+ movl previous_cr3,%eax
+ movl %eax,%cr3
+ movl previous_cr4,%eax
+ movl %eax,%cr4
- /* Transfer some values to protected mode */
+ /* Transfer some values to protected mode with an inline stack */
#define NVALUES 9
#define TRANSFER_STACK32(val, idx) \
- mov val,%eax; \
- mov %eax,wakeup_32stack+(idx+1)+(idx*4);
+ movl val,%eax; \
+ movl %eax,wakeup_32stack+(idx+1)+(idx*4)
TRANSFER_STACK32(previous_ss, (NVALUES - 9))
TRANSFER_STACK32(previous_fs, (NVALUES - 8))
@@ -106,21 +116,20 @@
mov physical_esp,%esi /* to be used in 32bit code */
/* Enable protected mode */
- mov %cr0,%eax
+ movl %cr0,%eax
orl $(CR0_PE),%eax
- mov %eax,%cr0
+ movl %eax,%cr0
wakeup_sw32:
/* Switch to protected mode by intersegmental jump */
ljmpl $KCSEL,$0x12345678 /* Code location, to be replaced */
+ /*
+ * Now switched to protected mode without paging enabled.
+ * %esi: KERNEL stack pointer (physical address)
+ */
.code32
wakeup_32:
- /*
- * Switched to protected mode w/o paging
- * %esi: KERNEL stack pointer (physical address)
- */
-
nop
/* Set up segment registers for protected mode */
@@ -134,13 +143,13 @@
movl %esi,%esp /* physical address stack pointer */
wakeup_32stack:
- /* Operands are overwritten in 16bit code */
+ /* Operands are overwritten in 16 bit code by TRANSFER_STACK32 macro */
pushl $0xabcdef09 /* ss + dummy */
pushl $0xabcdef08 /* fs + gs */
pushl $0xabcdef07 /* ds + es */
pushl $0xabcdef06 /* gdt:base (physical address) */
- pushl $0xabcdef05 /* recover address */
- pushl $0xabcdef04 /* idt:base */
+ pushl $0xabcdef05 /* recover address */
+ pushl $0xabcdef04 /* idt:base */
pushl $0xabcdef03 /* ldt + idt:limit */
pushl $0xabcdef02 /* gdt:base */
pushl $0xabcdef01 /* TR + gdt:limit */
@@ -169,15 +178,10 @@
andb $TSS_TYPEFIX_MASK,5(%eax)
/* Prepare to return to sleep/wakeup code point */
- lgdt PREVIOUS_GDT
- lidt PREVIOUS_IDT
+ lgdtl PREVIOUS_GDT
+ lidtl PREVIOUS_IDT
- xorl %eax,%eax
- movl %eax,%ebx
- movl %eax,%ecx
- movl %eax,%edx
- movl %eax,%esi
- movl %eax,%edi
+ /* Pack values from the GDT to be loaded into segment registers. */
movl PREVIOUS_DS,%ebx
movl PREVIOUS_FS,%ecx
movl PREVIOUS_SS,%edx
@@ -194,15 +198,17 @@
jmp 1f
1: jmp 1f
1:
+
/*
- * Now that we are in kernel virtual memory addressing
- * %ebx: ds + es
- * %ecx: fs + gs
- * %edx: ss + dummy
- * %esi: LDTR + TR
- * %edi: recover address
+ * Now we are in kernel virtual memory addressing with the following
+ * original register values:
+ * %ebx: ds + es
+ * %ecx: fs + gs
+ * %edx: ss + dummy
+ * %esi: LDTR + TR
+ * %edi: recover address
+ * We'll load these back into the segment registers now.
*/
-
nop
movl %esi,%eax /* LDTR + TR */
@@ -235,7 +241,10 @@
resume_beep: .long 0
reset_video: .long 0
-/* transfer from real mode to protected mode */
+/*
+ * Transfer from real mode to protected mode. The order of these variables
+ * is very important, DO NOT INSERT OR CHANGE unless you know why.
+ */
previous_cr0: .long 0
previous_tr: .word 0
previous_gdt: .word 0
==== //depot/user/imp/arm/sys/i386/acpica/acpi_wakeup.c#5 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.42 2006/06/08 17:54:10 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.43 2006/06/10 08:20:17 njl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,6 +52,9 @@
#include "acpi_wakecode.h"
+/* Make sure the code is less than one page and leave room for the stack. */
+CTASSERT(sizeof(wakecode) < PAGE_SIZE - 1024);
+
#ifndef _SYS_CDEFS_H_
#error this file needs sys/cdefs.h as a prerequisite
#endif
@@ -67,7 +70,7 @@
r_efl, r_cr0, r_cr2, r_cr3, r_cr4, ret_addr;
static uint16_t r_cs, r_ds, r_es, r_fs, r_gs, r_ss, r_tr;
-static uint32_t r_esp = 0;
+static uint32_t r_esp;
static void acpi_printcpu(void);
static void acpi_realmodeinst(void *arg, bus_dma_segment_t *segs,
@@ -282,7 +285,7 @@
static bus_dma_tag_t acpi_waketag;
static bus_dmamap_t acpi_wakemap;
-static vm_offset_t acpi_wakeaddr = 0;
+static vm_offset_t acpi_wakeaddr;
static void
acpi_alloc_wakeup_handler(void)
@@ -292,16 +295,21 @@
if (!cold)
return;
- if (bus_dma_tag_create(/* parent */ NULL, /* alignment */ 2, 0,
- /* lowaddr below 1MB */ 0x9ffff,
- /* highaddr */ BUS_SPACE_MAXADDR, NULL, NULL,
- PAGE_SIZE, 1, PAGE_SIZE, 0, busdma_lock_mutex,
- &Giant, &acpi_waketag) != 0) {
+ /*
+ * Specify the region for our wakeup code. We want it in the low 1 MB
+ * region, excluding video memory and above (0xa0000). We ask for
+ * it to be page-aligned, just to be safe.
+ */
+ if (bus_dma_tag_create(/*parent*/ NULL,
+ /*alignment*/ PAGE_SIZE, /*no boundary*/ 0,
+ /*lowaddr*/ 0x9ffff, /*highaddr*/ BUS_SPACE_MAXADDR, NULL, NULL,
+ /*maxsize*/ PAGE_SIZE, /*segments*/ 1, /*maxsegsize*/ PAGE_SIZE,
+ 0, busdma_lock_mutex, &Giant, &acpi_waketag) != 0) {
printf("acpi_alloc_wakeup_handler: can't create wake tag\n");
return;
}
- if (bus_dmamem_alloc(acpi_waketag, &wakeaddr,
- BUS_DMA_NOWAIT, &acpi_wakemap)) {
+ if (bus_dmamem_alloc(acpi_waketag, &wakeaddr, BUS_DMA_NOWAIT,
+ &acpi_wakemap) != 0) {
printf("acpi_alloc_wakeup_handler: can't alloc wake memory\n");
return;
}
@@ -313,13 +321,21 @@
static void
acpi_realmodeinst(void *arg, bus_dma_segment_t *segs, int nsegs, int error)
{
- struct acpi_softc *sc = arg;
- uint32_t *addr;
+ struct acpi_softc *sc;
+ uint32_t *addr;
+ /* Overwrite the ljmp target with the real address */
+ sc = arg;
+ sc->acpi_wakephys = segs[0].ds_addr;
addr = (uint32_t *)&wakecode[wakeup_sw32 + 2];
- *addr = segs[0].ds_addr + wakeup_32;
+ *addr = sc->acpi_wakephys + wakeup_32;
+
+ /* Copy the wake code into our low page and save its physical addr. */
bcopy(wakecode, (void *)sc->acpi_wakeaddr, sizeof(wakecode));
- sc->acpi_wakephys = segs[0].ds_addr;
+ if (bootverbose) {
+ device_printf(sc->acpi_dev, "wakeup code va %#x pa %#x\n",
+ acpi_wakeaddr, sc->acpi_wakephys);
+ }
}
void
@@ -333,6 +349,5 @@
sc->acpi_wakemap = acpi_wakemap;
bus_dmamap_load(sc->acpi_waketag, sc->acpi_wakemap,
- (void *)sc->acpi_wakeaddr, PAGE_SIZE,
- acpi_realmodeinst, sc, 0);
+ (void *)sc->acpi_wakeaddr, PAGE_SIZE, acpi_realmodeinst, sc, 0);
}
==== //depot/user/imp/arm/sys/kern/kern_mbuf.c#13 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_mbuf.c,v 1.24 2006/04/21 09:25:39 ps Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_mbuf.c,v 1.25 2006/06/10 14:34:07 rwatson Exp $");
#include "opt_mac.h"
#include "opt_param.h"
@@ -110,7 +110,6 @@
}
SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_ANY, tunable_mbinit, NULL);
-SYSCTL_DECL(_kern_ipc);
/* XXX: These should be tuneables. Can't change UMA limits on the fly. */
static int
sysctl_nmbclusters(SYSCTL_HANDLER_ARGS)
==== //depot/user/imp/arm/sys/kern/subr_firmware.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/subr_firmware.c,v 1.1 2006/01/29 02:52:41 mlaier Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/subr_firmware.c,v 1.2 2006/06/10 17:04:07 iedowse Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -42,7 +42,6 @@
#include <sys/module.h>
#define FIRMWARE_MAX 30
-static char *name_unload = "UNLOADING";
static struct firmware firmware_table[FIRMWARE_MAX];
struct task firmware_task;
struct mtx firmware_mtx;
@@ -88,6 +87,7 @@
frp->datasize = datasize;
frp->version = version;
frp->refcnt = 0;
+ frp->flags = 0;
if (parent != NULL)
parent->refcnt++;
frp->parent = parent;
@@ -97,18 +97,15 @@
}
static void
-clearentry(struct firmware *fp, int keep_file)
+clearentry(struct firmware *fp)
{
KASSERT(fp->refcnt == 0, ("image %s refcnt %u", fp->name, fp->refcnt));
- if (keep_file && (fp->file != NULL))
- fp->name = name_unload;
- else {
- fp->name = NULL;
- fp->file = NULL;
- }
+ fp->name = NULL;
+ fp->file = NULL;
fp->data = NULL;
fp->datasize = 0;
fp->version = 0;
+ fp->flags = 0;
if (fp->parent != NULL) { /* release parent reference */
fp->parent->refcnt--;
fp->parent = NULL;
@@ -150,7 +147,7 @@
if (fp != NULL) {
refcnt = fp->refcnt;
if (refcnt == 0)
- clearentry(fp, 0);
+ clearentry(fp);
}
mtx_unlock(&firmware_mtx);
return (refcnt != 0 ? EBUSY : 0);
@@ -208,20 +205,30 @@
unloadentry(void *unused1, int unused2)
{
struct firmware *fp;
+ linker_file_t file;
+ int i;
mtx_lock(&firmware_mtx);
- while ((fp = lookup(name_unload))) {
- /*
- * XXX: ugly, we should be able to lookup unlocked here if
- * we properly lock around clearentry below to avoid double
- * unload. Play it safe for now.
- */
+ for (;;) {
+ /* Look for an unwanted entry that we explicitly loaded. */
+ for (i = 0; i < FIRMWARE_MAX; i++) {
+ fp = &firmware_table[i];
+ if (fp->name != NULL && fp->file != NULL &&
+ fp->refcnt == 0 &&
+ (fp->flags & FIRMWAREFLAG_KEEPKLDREF) == 0)
+ break;
+ fp = NULL;
+ }
+ if (fp == NULL)
+ break;
+ file = fp->file;
+ /* No longer explicitly loaded. */
+ fp->file = NULL;
mtx_unlock(&firmware_mtx);
- linker_file_unload(fp->file, LINKER_UNLOAD_NORMAL);
+ linker_file_unload(file, LINKER_UNLOAD_NORMAL);
mtx_lock(&firmware_mtx);
- clearentry(fp, 0);
}
mtx_unlock(&firmware_mtx);
}
@@ -237,8 +244,10 @@
{
mtx_lock(&firmware_mtx);
fp->refcnt--;
- if (fp->refcnt == 0 && (flags & FIRMWARE_UNLOAD))
- clearentry(fp, 1);
+ if (fp->refcnt == 0) {
+ if ((flags & FIRMWARE_UNLOAD) == 0)
+ fp->flags |= FIRMWAREFLAG_KEEPKLDREF;
+ }
if (fp->file)
taskqueue_enqueue(taskqueue_thread, &firmware_task);
mtx_unlock(&firmware_mtx);
@@ -250,11 +259,18 @@
static int
firmware_modevent(module_t mod, int type, void *unused)
{
+ int i;
+
switch (type) {
case MOD_LOAD:
TASK_INIT(&firmware_task, 0, unloadentry, NULL);
return 0;
case MOD_UNLOAD:
+ for (i = 0; i < FIRMWARE_MAX; i++) {
+ struct firmware *fp = &firmware_table[i];
+ fp->flags &= ~FIRMWAREFLAG_KEEPKLDREF;
+ }
+ taskqueue_enqueue(taskqueue_thread, &firmware_task);
taskqueue_drain(taskqueue_thread, &firmware_task);
return 0;
}
==== //depot/user/imp/arm/sys/kern/sys_pipe.c#4 (text+ko) ====
@@ -89,7 +89,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/sys_pipe.c,v 1.186 2006/01/30 08:25:04 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/sys_pipe.c,v 1.187 2006/06/10 14:34:07 rwatson Exp $");
#include "opt_mac.h"
@@ -181,8 +181,6 @@
static int piperesizefail;
static int piperesizeallowed = 1;
-SYSCTL_DECL(_kern_ipc);
-
SYSCTL_INT(_kern_ipc, OID_AUTO, maxpipekva, CTLFLAG_RDTUN,
&maxpipekva, 0, "Pipe KVA limit");
SYSCTL_INT(_kern_ipc, OID_AUTO, pipes, CTLFLAG_RD,
==== //depot/user/imp/arm/sys/kern/sysv_msg.c#2 (text+ko) ====
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/sysv_msg.c,v 1.60 2005/02/12 01:22:39 csjp Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/sysv_msg.c,v 1.61 2006/06/10 14:34:07 rwatson Exp $");
#include "opt_sysvipc.h"
#include "opt_mac.h"
@@ -1311,7 +1311,6 @@
sizeof(struct msqid_kernel) * msginfo.msgmni));
}
-SYSCTL_DECL(_kern_ipc);
SYSCTL_INT(_kern_ipc, OID_AUTO, msgmax, CTLFLAG_RD, &msginfo.msgmax, 0,
"Maximum message size");
SYSCTL_INT(_kern_ipc, OID_AUTO, msgmni, CTLFLAG_RDTUN, &msginfo.msgmni, 0,
==== //depot/user/imp/arm/sys/kern/sysv_sem.c#2 (text+ko) ====
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/sysv_sem.c,v 1.78 2005/06/07 05:03:27 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/sysv_sem.c,v 1.79 2006/06/10 14:34:07 rwatson Exp $");
#include "opt_sysvipc.h"
#include "opt_mac.h"
@@ -196,7 +196,6 @@
SEMAEM /* adjust on exit max value */
};
-SYSCTL_DECL(_kern_ipc);
SYSCTL_INT(_kern_ipc, OID_AUTO, semmap, CTLFLAG_RW, &seminfo.semmap, 0,
"Number of entries in the semaphore map");
SYSCTL_INT(_kern_ipc, OID_AUTO, semmni, CTLFLAG_RDTUN, &seminfo.semmni, 0,
==== //depot/user/imp/arm/sys/kern/sysv_shm.c#5 (text+ko) ====
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/sysv_shm.c,v 1.105 2006/03/30 07:42:32 ps Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/sysv_shm.c,v 1.106 2006/06/10 14:34:07 rwatson Exp $");
#include "opt_compat.h"
#include "opt_sysvipc.h"
@@ -180,7 +180,6 @@
static int shm_use_phys;
static int shm_allow_removed;
-SYSCTL_DECL(_kern_ipc);
SYSCTL_ULONG(_kern_ipc, OID_AUTO, shmmax, CTLFLAG_RW, &shminfo.shmmax, 0,
"Maximum shared memory segment size");
SYSCTL_ULONG(_kern_ipc, OID_AUTO, shmmin, CTLFLAG_RW, &shminfo.shmmin, 0,
==== //depot/user/imp/arm/sys/kern/uipc_mbuf.c#12 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_mbuf.c,v 1.165 2006/03/15 21:11:11 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_mbuf.c,v 1.166 2006/06/10 14:34:07 rwatson Exp $");
#include "opt_mac.h"
#include "opt_param.h"
@@ -64,7 +64,6 @@
/*
* sysctl(8) exported objects
*/
-SYSCTL_DECL(_kern_ipc);
SYSCTL_INT(_kern_ipc, KIPC_MAX_LINKHDR, max_linkhdr, CTLFLAG_RD,
&max_linkhdr, 0, "Size of largest link layer header");
SYSCTL_INT(_kern_ipc, KIPC_MAX_PROTOHDR, max_protohdr, CTLFLAG_RD,
==== //depot/user/imp/arm/sys/kern/uipc_socket.c#17 (text+ko) ====
@@ -89,7 +89,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_socket.c,v 1.267 2006/06/08 22:33:18 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_socket.c,v 1.268 2006/06/10 14:34:07 rwatson Exp $");
#include "opt_inet.h"
#include "opt_mac.h"
@@ -109,6 +109,7 @@
#include <sys/file.h> /* for struct knote */
#include <sys/kernel.h>
#include <sys/event.h>
+#include <sys/eventhandler.h>
#include <sys/poll.h>
#include <sys/proc.h>
#include <sys/protosw.h>
@@ -148,11 +149,11 @@
uma_zone_t socket_zone;
so_gen_t so_gencnt; /* generation count for sockets */
+int maxsockets;
+
MALLOC_DEFINE(M_SONAME, "soname", "socket name");
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list