Skip to content

Commit

Permalink
Merge remote-tracking branch 'freebsd/master' into hardened/current/m…
Browse files Browse the repository at this point in the history
…aster
  • Loading branch information
opntr-auto committed Jul 14, 2015
2 parents c3626f5 + 252466c commit 3581827
Show file tree
Hide file tree
Showing 29 changed files with 189 additions and 104 deletions.
8 changes: 2 additions & 6 deletions lib/msun/man/cacos.3
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd May 27, 2013
.Dd Jul 14, 2015
.Dt CACOS 3
.Os
.Sh NAME
Expand Down Expand Up @@ -98,11 +98,7 @@ functions perform the same operations in
.Fa float
precision.
.Pp
.ie '\*[.T]'utf8'
. ds Un \[cu]
.el
. ds Un U
.
.ds Un \[cu]
There is no universal convention for defining the principal values of
these functions. The following table gives the branch cuts, and the
corresponding ranges for the return values, adopted by the C language.
Expand Down
2 changes: 1 addition & 1 deletion release/doc/en_US.ISO8859-1/relnotes/article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@
I/O, and uses hardware virtualization extensions for all other
tasks, without the need for emulation.</para>

<para revision="273375">The &man.bhyve.8; hypervisior has been
<para revision="273375">The &man.bhyve.8; hypervisor has been
updated to support &amd; processors with
<acronym>SVM</acronym> and <acronym>AMD-V</acronym> hardware
extensions.</para>
Expand Down
10 changes: 5 additions & 5 deletions sbin/ggate/ggatec/ggatec.8
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd April 2, 2015
.Dd July 14, 2015
.Dt GGATEC 8
.Os
.Sh NAME
Expand Down Expand Up @@ -71,8 +71,8 @@ utility is a network client for the GEOM Gate class.
It is responsible for the creation of
.Nm ggate
devices and forwarding I/O requests between the
.Nm geom_gate.ko
kernel module and the
.Nm GEOM Gate
kernel subsystem and the
.Xr ggated 8
network daemon.
Available commands:
Expand Down Expand Up @@ -111,7 +111,7 @@ Do not use
.Dv TCP_NODELAY
option on TCP sockets.
.It Fl o Cm ro | wo | rw
Specify permission to use when opening the file or device: read-only
Specify permissions to use when opening the file or device: read-only
.Pq Cm ro ,
write-only
.Pq Cm wo ,
Expand All @@ -136,7 +136,7 @@ Default is 131072 (128kB).
Sector size for
.Nm ggate
provider.
If not specified, it is taken from device, or set to 512 bytes for files.
If not specified, it is taken from the device, or set to 512 bytes for files.
.It Fl t Ar timeout
Number of seconds to wait before an I/O request will be canceled.
Default is 0, which means no timeout.
Expand Down
1 change: 1 addition & 0 deletions sbin/ggate/ggatec/ggatec.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ g_gatec_create(void)
/*
* Ok, got both sockets, time to create provider.
*/
memset(&ggioc, 0, sizeof(ggioc));
ggioc.gctl_version = G_GATE_VERSION;
ggioc.gctl_mediasize = mediasize;
ggioc.gctl_sectorsize = sectorsize;
Expand Down
12 changes: 6 additions & 6 deletions sbin/ggate/ggated/ggated.8
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd April 29, 2004
.Dd July 14, 2015
.Dt GGATED 8
.Os
.Sh NAME
Expand All @@ -43,14 +43,14 @@
.Sh DESCRIPTION
The
.Nm
utility is a network server for GEOM Gate class.
utility is a network server for the GEOM Gate class.
It runs on a server machine to service GEOM Gate requests from workers
placed on a client machine.
Keep in mind, that connection between
Keep in mind, that connections between
.Xr ggatec 8
and
.Nm
is not encrypted.
are not encrypted.
.Pp
Available options:
.Bl -tag -width ".Ar exports\ file"
Expand All @@ -65,7 +65,7 @@ option on TCP sockets.
.It Fl p Ar port
Port on which
.Nm
listens for connection.
listens for connections.
Default is 3080.
.It Fl R Ar rcvbuf
Size of receive buffer to use.
Expand All @@ -74,7 +74,7 @@ Default is 131072 (128kB).
Size of send buffer to use.
Default is 131072 (128kB).
.It Fl v
Do not fork, run in foreground and print debug informations on standard
Do not fork, run in foreground and print debug information on standard
output.
.It Ar "exports file"
An alternate location for the exports file.
Expand Down
13 changes: 7 additions & 6 deletions sbin/ggate/ggatel/ggatel.8
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd April 9, 2015
.Dd July 14, 2015
.Dt GGATEL 8
.Os
.Sh NAME
Expand Down Expand Up @@ -62,7 +62,7 @@ It can be used as a replacement for
devices or as a
.Dq GEOMificator
for non GEOM-aware devices, but it was mainly created as an example
on how to use and how to communicate with the GEOM Gate kernel module.
on how to use and how to communicate with the GEOM Gate kernel subsystem.
.Pp
Available commands:
.Bl -tag -width ".Cm destroy"
Expand All @@ -82,7 +82,8 @@ providers.
Take over a previously created provider and handle pending and future
requests. This is useful if the initial
.Nm
process died. To prevent data loss, the given path must lead to the
process died.
To prevent data loss, the given path must lead to the
regular file or device that was used to create the provider.
.El
.Pp
Expand All @@ -93,7 +94,7 @@ Forcibly destroy
.Nm ggate
provider (cancels all pending requests).
.It Fl o Cm ro | wo | rw
Specify permission to use when opening the file or device: read-only
Specify permissions to use when opening the file or device: read-only
.Pq Cm ro ,
write-only
.Pq Cm wo ,
Expand All @@ -105,7 +106,7 @@ Default is
Sector size for
.Nm ggate
provider.
If not specified, it is taken from device, or set to 512 bytes for files.
If not specified, it is taken from the device, or set to 512 bytes for files.
.It Fl t Ar timeout
Number of seconds to wait before an I/O request will be canceled.
0 means no timeout.
Expand All @@ -131,7 +132,7 @@ the
.Dq Li fd0
device and use
.Xr gbde 8
to encrypt data on a floppy.
to encrypt data on a floppy disk.
.Bd -literal -offset indent
ggatel create -u 5 /dev/fd0
gbde init /dev/ggate5
Expand Down
1 change: 1 addition & 0 deletions sbin/ggate/ggatel/ggatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ g_gatel_create(void)
fd = open(path, g_gate_openflags(flags) | O_DIRECT | O_FSYNC);
if (fd == -1)
err(EXIT_FAILURE, "Cannot open %s", path);
memset(&ggioc, 0, sizeof(ggioc));
ggioc.gctl_version = G_GATE_VERSION;
ggioc.gctl_unit = unit;
ggioc.gctl_mediasize = g_gate_mediasize(fd);
Expand Down
2 changes: 1 addition & 1 deletion sys/amd64/conf/GENERIC
Original file line number Diff line number Diff line change
Expand Up @@ -364,5 +364,5 @@ device vmx # VMware VMXNET3 Ethernet
# Netmap provides direct access to TX/RX rings on supported NICs
device netmap # netmap(4) support

# The cypto framework is required by IPSEC
# The crypto framework is required by IPSEC
device crypto # Required by IPSEC
12 changes: 3 additions & 9 deletions sys/arm64/arm64/intr_machdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,16 +451,16 @@ void
arm_setup_ipihandler(driver_filter_t *filt, u_int ipi)
{

/* ARM64TODO: The hard coded 16 will be fixed with am_intrng */
arm_setup_intr("ipi", filt, NULL, (void *)((uintptr_t)ipi | 1<<16), ipi + 16,
arm_setup_intr("ipi", filt, NULL, (void *)((uintptr_t)ipi | 1<<16), ipi,
INTR_TYPE_MISC | INTR_EXCL, NULL);
arm_unmask_ipi(ipi);
}

void
arm_unmask_ipi(u_int ipi)
{
PIC_UNMASK(root_pic, ipi + 16);

PIC_UNMASK(root_pic, ipi);
}

void
Expand Down Expand Up @@ -494,9 +494,6 @@ ipi_cpu(int cpu, u_int ipi)
CPU_ZERO(&cpus);
CPU_SET(cpu, &cpus);

/* ARM64TODO: This will be fixed with arm_intrng */
ipi += 16;

CTR2(KTR_SMP, "ipi_cpu: cpu: %d, ipi: %x", cpu, ipi);
PIC_IPI_SEND(root_pic, cpus, ipi);
}
Expand All @@ -505,9 +502,6 @@ void
ipi_selected(cpuset_t cpus, u_int ipi)
{

/* ARM64TODO: This will be fixed with arm_intrng */
ipi += 16;

CTR1(KTR_SMP, "ipi_selected: ipi: %x", ipi);
PIC_IPI_SEND(root_pic, cpus, ipi);
}
Expand Down
3 changes: 3 additions & 0 deletions sys/arm64/arm64/locore.S
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ build_block_pagetable:
lsl x12, x7, #2
orr x12, x12, #L2_BLOCK
orr x12, x12, #(ATTR_AF)
#ifdef SMP
orr x12, x12, ATTR_SH(ATTR_SH_IS)
#endif

/* Only use the output address bits */
lsr x9, x9, #L2_SHIFT
Expand Down
6 changes: 3 additions & 3 deletions sys/arm64/arm64/mp_machdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ init_secondary(uint64_t cpu)
pcpup->pc_curthread = pcpup->pc_idlethread;
pcpup->pc_curpcb = pcpup->pc_idlethread->td_pcb;

/* Configure the interrupt controller */
arm_init_secondary();

for (i = 0; i < COUNT_IPI; i++)
arm_unmask_ipi(i);

Expand All @@ -239,9 +242,6 @@ init_secondary(uint64_t cpu)
vfp_init();
#endif

/* Configure the interrupt controller */
arm_init_secondary();

/* Enable interrupts */
intr_enable();

Expand Down
21 changes: 10 additions & 11 deletions sys/arm64/arm64/pmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ pmap_bootstrap_dmap(vm_offset_t l1pt)
KASSERT(l1_slot < Ln_ENTRIES, ("Invalid L1 index"));

pmap_load_store(&l1[l1_slot],
(pa & ~L1_OFFSET) | ATTR_AF | L1_BLOCK |
ATTR_IDX(CACHED_MEMORY));
(pa & ~L1_OFFSET) | ATTR_DEFAULT |
ATTR_IDX(CACHED_MEMORY) | L1_BLOCK);
}

cpu_dcache_wb_range((vm_offset_t)l1, PAGE_SIZE);
Expand Down Expand Up @@ -860,8 +860,8 @@ pmap_kenter_device(vm_offset_t sva, vm_size_t size, vm_paddr_t pa)
while (size != 0) {
l3 = pmap_l3(kernel_pmap, va);
KASSERT(l3 != NULL, ("Invalid page table, va: 0x%lx", va));
pmap_load_store(l3, (pa & ~L3_OFFSET) | ATTR_AF | L3_PAGE |
ATTR_IDX(DEVICE_MEMORY));
pmap_load_store(l3, (pa & ~L3_OFFSET) | ATTR_DEFAULT |
ATTR_IDX(DEVICE_MEMORY) | L3_PAGE);
PTE_SYNC(l3);

va += PAGE_SIZE;
Expand Down Expand Up @@ -953,8 +953,8 @@ pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count)
va = sva;
for (i = 0; i < count; i++) {
m = ma[i];
pa = VM_PAGE_TO_PHYS(m) | ATTR_AF |
ATTR_IDX(m->md.pv_memattr) | ATTR_AP(ATTR_AP_RW) | L3_PAGE;
pa = VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | ATTR_AP(ATTR_AP_RW) |
ATTR_IDX(m->md.pv_memattr) | L3_PAGE;
l3 = pmap_l3(kernel_pmap, va);
pmap_load_store(l3, pa);
PTE_SYNC(l3);
Expand Down Expand Up @@ -1214,8 +1214,7 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp)

l2 = (pd_entry_t *)PHYS_TO_DMAP(*l1 & ~ATTR_MASK);
l2 = &l2[ptepindex & Ln_ADDR_MASK];
pmap_load_store(l2, VM_PAGE_TO_PHYS(m) | ATTR_AF |
ATTR_IDX(CACHED_MEMORY) | L2_TABLE);
pmap_load_store(l2, VM_PAGE_TO_PHYS(m) | L2_TABLE);
PTE_SYNC(l2);
}

Expand Down Expand Up @@ -1907,14 +1906,14 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
if ((m->oflags & VPO_UNMANAGED) == 0 && !vm_page_xbusied(m))
VM_OBJECT_ASSERT_LOCKED(m->object);
pa = VM_PAGE_TO_PHYS(m);
new_l3 = (pt_entry_t)(pa | ATTR_AF | L3_PAGE);
new_l3 = (pt_entry_t)(pa | ATTR_DEFAULT | ATTR_IDX(m->md.pv_memattr) |
L3_PAGE);
if ((prot & VM_PROT_WRITE) == 0)
new_l3 |= ATTR_AP(ATTR_AP_RO);
if ((flags & PMAP_ENTER_WIRED) != 0)
new_l3 |= ATTR_SW_WIRED;
if ((va >> 63) == 0)
new_l3 |= ATTR_AP(ATTR_AP_USER);
new_l3 |= ATTR_IDX(m->md.pv_memattr);

CTR2(KTR_PMAP, "pmap_enter: %.16lx -> %.16lx", va, pa);

Expand Down Expand Up @@ -2243,7 +2242,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m,
*/
pmap_resident_count_inc(pmap, 1);

pa = VM_PAGE_TO_PHYS(m) | ATTR_AF | ATTR_IDX(m->md.pv_memattr) |
pa = VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | ATTR_IDX(m->md.pv_memattr) |
ATTR_AP(ATTR_AP_RW) | L3_PAGE;

/*
Expand Down
2 changes: 1 addition & 1 deletion sys/arm64/conf/GENERIC
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,5 @@ device bpf # Berkeley packet filter
options FDT
device acpi

# The cypto framework is required by IPSEC
# The crypto framework is required by IPSEC
device crypto # Required by IPSEC
6 changes: 6 additions & 0 deletions sys/arm64/include/pte.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ typedef uint64_t pt_entry_t; /* page table entry */
#define ATTR_IDX(x) ((x) << 2)
#define ATTR_IDX_MASK (7 << 2)

#ifdef SMP
#define ATTR_DEFAULT (ATTR_AF | ATTR_SH(ATTR_SH_IS))
#else
#define ATTR_DEFAULT (ATTR_AF)
#endif

#define ATTR_DESCR_MASK 3

/* Level 0 table, 512GiB per entry */
Expand Down
Loading

0 comments on commit 3581827

Please sign in to comment.