Commit Graph

165620 Commits

Author SHA1 Message Date
nwhitehorn
4652fc6f95 Teach truss and xlint how to operate on 64-bit PowerPC systems. 2010-07-12 00:54:41 +00:00
nwhitehorn
88c6aef329 Provide support in loader for booting 64-bit PowerPC kernels. Like amd64,
64-bit PowerPC kernels are loaded by a 32-bit loader, since nearly all
powerpc64 firmwares execute in 32-bit mode.
2010-07-12 00:49:22 +00:00
thompsa
33836b0d5c Use more compact deviceid table.
Submitted by:	Akinori Furukoshi
2010-07-11 23:54:44 +00:00
thompsa
a191c92114 Update for style(9).
Submitted by:	Akinori Furukoshi (author)
2010-07-11 23:52:12 +00:00
raj
f6ff68deb2 Sort platform options. 2010-07-11 21:12:42 +00:00
raj
ca95c68e7d Get rid of bootinfo for good in loader (U-Boot-based) and ARM.
For FDT-enabled platforms the device tree is a modern replacement for bootinfo
config data.
2010-07-11 21:11:23 +00:00
raj
6496d826cc Convert Freescale PowerPC platforms to FDT convention.
The following systems are affected:

  - MPC8555CDS
  - MPC8572DS

This overhaul covers the following major changes:

  - All integrated peripherals drivers for Freescale MPC85XX SoC, which are
    currently in the FreeBSD source tree are reworked and adjusted so they
    derive config data out of the device tree blob (instead of hard coded /
    tabelarized values).

  - This includes: LBC, PCI / PCI-Express, I2C, DS1553, OpenPIC, TSEC, SEC,
    QUICC, UART, CFI.

  - Thanks to the common FDT infrastrucutre (fdtbus, simplebus) we retire
    ocpbus(4) driver, which was based on hard-coded config data.

Note that world for these platforms has to be built WITH_FDT.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2010-07-11 21:08:29 +00:00
raj
710dc13ac9 Provide more defines for PCI-Express device ctrl. 2010-07-11 20:55:39 +00:00
raj
af812a8be4 Introduce PowerPC-specific helper routines for FDT.
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2010-07-11 20:49:36 +00:00
raj
b8fb1a2a99 Save fdtbus trigger / polarity data at their correct index. 2010-07-11 20:33:39 +00:00
raj
dba53e0271 Let simplebus(4) diagnostics be a bit more descriptive. 2010-07-11 20:30:59 +00:00
raj
ffc324d97e Provide a missing interrupt-parent for the CPM / QUICC node in the DTS. 2010-07-11 20:29:34 +00:00
alc
db4ca9f5c2 Change the implementation of vm_hold_free_pages() so that it performs at
most one call to pmap_qremove(), and thus one TLB shootdown, instead of one
call and TLB shootdown per page.

Simplify the interface to vm_hold_free_pages().

MFC after:	3 weeks
2010-07-11 20:11:44 +00:00
mav
5036d2a373 Make kernel panic with reasonable message if no usable event timer found. 2010-07-11 17:08:37 +00:00
mav
d760bd51fb Remove interval validation from cpu_tick_calibrate(). As I found, check
was needed at preliminary version of the patch, where number of CPU ticks
was divided strictly on 16 seconds. Final code instead uses real interval
duration, so precise interval should not be important. Same time aliasing
issues around second boundary causes false positives, periodically logging
useless "t_delta ... too long/short" messages when HZ set below 256.
2010-07-11 16:47:45 +00:00
nwhitehorn
9712e9de77 Fix SVN mismerge. We somehow ended up with the 32-bit powerpc version
in arch/powerpc64 instead of the 64-bit one.
2010-07-11 05:13:38 +00:00
weongyo
d1622ddea9 Fixes a page fault in bwi_pci_probe() because the array isn't terminated
with NULL.

PR:		kern/148473
Submitted by:	Grzegorz Dabrowski <grzegorz.dabrowski at gmail dot com>
MFC after:	1 week
2010-07-10 22:37:23 +00:00
nwhitehorn
20410e1e6b OpenSSL configuration for powerpc64
Obtained from:	projects/ppc64
2010-07-10 22:07:48 +00:00
nwhitehorn
589ff2378c Teach crunchide(1) about PPC ELF64. 2010-07-10 22:06:51 +00:00
weongyo
8de20561d1 Fixes a bug for LP PHY that some frames have 2 padding bytes at the
start so we should adjust the mbuf if the driver is running in PIO mode.
Now it should work well with WPA authentication and association for LP
PHY devices.

Tested by:	Warren Block <wblock at wonkity.com>
MFC after:	1 month
2010-07-10 21:39:03 +00:00
alc
0a0ebaf177 Reduce the number of global TLB shootdowns generated by pmap_qenter().
Specifically, teach pmap_qenter() to recognize the case when it is being
asked to replace a mapping with the very same mapping and not generate
a shootdown.  Unfortunately, the buffer cache commonly passes an entire
buffer to pmap_qenter() when only a subset of the mappings are changing.
For the extension of buffers in allocbuf() this was resulting in
unnecessary shootdowns.  The addition of new pages to the end of the
buffer need not and did not trigger a shootdown, but overwriting the
initial mappings with the very same mappings was seen as a change that
necessitated a shootdown.  With this change, that is no longer so.

For a "buildworld" on amd64, this change eliminates 14-15% of the
pmap_invalidate_range() shootdowns, and about 4% of the overall
shootdowns.

MFC after:	3 weeks
2010-07-10 18:22:44 +00:00
nwhitehorn
7b6b47da77 Since powerpc and powerpc64 share an instruction set, bind can and should
use the 32-bit atomic operations unmodified. Accomplish this by switching
some MACHINE_ARCH values to MACHINE_CPUARCH.
2010-07-10 17:46:53 +00:00
nwhitehorn
615d4b84bc RTLD support for powerpc64. A few small modifications to the Makefile
and symbol map are required to support various consequences of the dot
symbol scheme:

- Symbols beginning with a dot are reserved, so start private symbols with
  an underscore.
- In order to set RTLD breakpoints, gdb must be able to locate the text
  entry point, not the data section function descriptor, so add
  .r_debug_state to the symbol map on powerpc64.

Obtained from:	projects/ppc64
2010-07-10 17:43:24 +00:00
mav
4895e1982d If ata_sata_phy_reset() failed and ata_generic_reset() is not called, mark
channel as having no devices connected. This improves hot-unplug operation
on legacy-emulating SATA controllers.
2010-07-10 15:36:27 +00:00
mav
e4e2e8edd3 On attach, grab channel lock before setting up interrupt. This fixes crash
in ATA_CAM mode if phy connect event arrive before CAM bus initialization
completed.
2010-07-10 15:27:27 +00:00
nwhitehorn
84fe549784 Teach libstand what to do for powerpc64: the same thing as powerpc. Like
amd64, libstand apps for powerpc64 systems are 32-bit, due to 32-bit Open
Firmware implementations.
2010-07-10 15:16:35 +00:00
nwhitehorn
4f81d8d7e1 64-bit PowerPC KVM support. 2010-07-10 15:15:00 +00:00
nwhitehorn
980b46c696 Powerpc64 thread libraries support. 2010-07-10 15:13:49 +00:00
nwhitehorn
a1ab13ffb6 Provide 64-bit PowerPC support in libc.
Obtained from:	projects/ppc64
2010-07-10 14:45:03 +00:00
nwhitehorn
8c6113bcff powerpc64 floating-point is identical to powerpc, so use the same
code on both architectures.
2010-07-10 14:40:57 +00:00
nwhitehorn
d1c3838436 The 64-bit PowerPC ABI implemented in binutils 2.15 requires some special
quirks for weak-symbol handling. Text symbols require also marking weak
the special dot-symbol associated with the function, and data symbols
require that you not do that. To fix this, provide a hacked
__weak_reference for powerpc64, and define a new __weak_reference_data
for the single weak data symbol in base.

Revert after:	binutils 2.17 import
Obtained from:	projects/ppc64
2010-07-10 14:39:08 +00:00
nwhitehorn
f7d973d854 32-bit sysctl emulation is also interesting on powerpc64. 2010-07-10 14:34:37 +00:00
nwhitehorn
fe021cbb05 Add definitions for powerpc64 ELF relocation types. Some 64-bit relocations
are identical to 32-bit relocations in meaning, name, and number, and I
have chosen not to duplicate those here.
2010-07-10 14:33:57 +00:00
kib
ea23c5a7f9 Document pl_siginfo and PT_FLAG_SI for PT_LWPINFO.
MFC after:	1 month
2010-07-10 14:31:44 +00:00
mav
20380dbd90 Make hw.ata.ata_dma_check_80pin tunable affect not only device side, but
also controller side cable checks. Make respective sysctl writable.

PR:		kern/143462
2010-07-10 13:46:14 +00:00
keramida
18ad9f5070 Fix reading of empty fifolog files. When we don't have anything
to inflate, skip the rest of the fifolog reader code to avoid
hitting the assert about Z_OK a bit further down.

Approved by:	phk
MFC after:	1 week
2010-07-10 11:40:31 +00:00
nwhitehorn
443242732c C startup support for 64-bit PowerPC.
Obtained from:	projects/ppc64
2010-07-10 03:45:55 +00:00
nwhitehorn
c7f36558b7 Minor modifications to know what to do with powerpc64. 2010-07-10 02:32:50 +00:00
nwhitehorn
5d21d768b2 Teach our toolchain how to generate 64-bit PowerPC binaries. This fixes
a variety of bugs in binutils related to handling of 64-bit PPC ELF,
provides a GCC configuration for 64-bit PowerPC on FreeBSD, and
associated build systems tweaks.

Obtained from:	projects/ppc64
2010-07-10 02:29:22 +00:00
kib
c497cd3792 Fix spacing.
Noted by:	pgollucci
MFC after:	3 weeks
2010-07-09 21:27:42 +00:00
yongari
798f7ab69e Some revision of Yukon controller generates corrupted frame when TX
checksum offloading is enabled.  The frame has a valid checksum
value so payload might be modified during TX checksum calculation.
Disable TX checksum offloading but give users chance to enable it
when they know their controller works without problems with TX
checksum offloading.

Reported by:	Andrzej Tobola <ato <> iem dot pw dot edu dot pl>
2010-07-09 21:21:08 +00:00
kib
5e9badadaf For both i386 and amd64 pmap,
- change the type of pm_active to cpumask_t, which it is;
- in pmap_remove_pages(), compare with PCPU(curpmap), instead of
  dereferencing the long chain of pointers [1].
For amd64 pmap, remove the unneeded checks for validity of curpmap
in pmap_activate(), since curpmap should be always valid after
r209789.

Submitted by:	alc [1]
Reviewed by:	alc
MFC after:	3 weeks
2010-07-09 20:05:56 +00:00
alc
7c09dc242c Add support for the VM_ALLOC_COUNT() hint to vm_page_alloc(). Consequently,
the maintenance of vm_pageout_deficit can be localized to just two places:
vm_page_alloc() and vm_pageout_scan().

This change also corrects an off-by-one error in the maintenance of
vm_pageout_deficit.  Historically, the buffer cache functions, allocbuf()
and vm_hold_load_pages(), have not taken into account that vm_page_alloc()
already increments vm_pageout_deficit by one.

Reviewed by:	kib
2010-07-09 19:38:30 +00:00
delphij
4ef0eb46da Don't use pack() for structures that is used purely for software state.
Otherwise the resulting, unaligned mutex structure would trigger panic.

Submitted by:		Tom Cough <tom.couch lsi.com>
Reported/Tested by:	jhb
MFC after:		3 days
2010-07-09 17:38:15 +00:00
jfv
bf4d5d990f Fix of a VLAN problem by jhb, the checksum capability
got lost along the way.

MFC: asap
2010-07-09 17:11:29 +00:00
nwhitehorn
68968ee3ef The number after 2 is 3, not 4.
MFC after:	3 days
2010-07-09 14:04:16 +00:00
nwhitehorn
49506987fd Remove an unnecessary include of opt_psim.h, which is not present on
powerpc64.
2010-07-09 14:02:57 +00:00
nwhitehorn
db85722e7e MFppc64:
Minor 64-bit-cleanliness upgrades and support for platform detection on
subtly-broken OF implementations like in the Mambo simulator.
2010-07-09 14:02:24 +00:00
nwhitehorn
75d8db5ef4 MFppc64:
Use longs instead of ints as the native word type in bcopy(). This will
expand nicely on 64-bit systems.
2010-07-09 14:01:18 +00:00
nwhitehorn
087c04e6ae MFppc64:
Check if devices are direct-mapped individually instead of just checking
the value of hw_direct_map.
2010-07-09 14:00:22 +00:00