272461 |
03-Oct-2014 |
gjb |
Copy stable/10@r272459 to releng/10.1 as part of the 10.1-RELEASE process.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
270920 |
01-Sep-2014 |
kib |
Fix a leak of the wired pages when unwiring of the PROT_NONE-mapped wired region. Rework the handling of unwire to do the it in batch, both at pmap and object level.
All commits below are by alc.
MFC r268327: Introduce pmap_unwire().
MFC r268591: Implement pmap_unwire() for powerpc.
MFC r268776: Implement pmap_unwire() for arm.
MFC r268806: pmap_unwire(9) man page.
MFC r269134: When unwiring a region of an address space, do not assume that the underlying physical pages are mapped by the pmap. This fixes a leak of the wired pages on the unwiring of the region mapped with no access allowed.
MFC r269339: In the implementation of the new function pmap_unwire(), the call to MOEA64_PVO_TO_PTE() must be performed before any changes are made to the PVO. Otherwise, MOEA64_PVO_TO_PTE() will panic.
MFC r269365: Correct a long-standing problem in moea{,64}_pvo_enter() that was revealed by the combination of r268591 and r269134: When we attempt to add the wired attribute to an existing mapping, moea{,64}_pvo_enter() do nothing. (They only set the wired attribute on newly created mappings.)
MFC r269433: Handle wiring failures in vm_map_wire() with the new functions pmap_unwire() and vm_object_unwire(). Retire vm_fault_{un,}wire(), since they are no longer used.
MFC r269438: Rewrite a loop in vm_map_wire() so that gcc doesn't think that the variable "rv" is uninitialized.
MFC r269485: Retire pmap_change_wiring().
Reviewed by: alc
|
270439 |
24-Aug-2014 |
kib |
Merge the changes to pmap_enter(9) for sleep-less operation (requested by flag). The ia64 pmap.c changes are direct commit, since ia64 is removed on head.
MFC r269368 (by alc): Retire PVO_EXECUTABLE.
MFC r269728: Change pmap_enter(9) interface to take flags parameter and superpage mapping size (currently unused).
MFC r269759 (by alc): Update the text of a KASSERT() to reflect the changes in r269728.
MFC r269822 (by alc): Change {_,}pmap_allocpte() so that they look for the flag PMAP_ENTER_NOSLEEP instead of M_NOWAIT/M_WAITOK when deciding whether to sleep on page table page allocation.
MFC r270151 (by alc): Replace KASSERT that no PV list locks are held with a conditional unlock.
Reviewed by: alc Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
|
270061 |
16-Aug-2014 |
bz |
MFC r264601,264646,265766,267918,267919,267920:
Merge if_nf10bmac(4), a driver to support an NetFPGA-10G Embedded CPU Ethernet Core.
The current version operates on a simple PIO based interface connected to a NetFPGA-10G port.
To avoid confusion: this driver operates on a CPU running on the FPGA, e.g. BERI/mips, and is not suited for the PCI host interface.
Adjust the register layout to allow for 64bit registers in the future for nf10bmac(4). Also, add support for and enable RX interrupts.
Allow switching between 32bit and 64bit bus width data access at compile time by setting NF10BMAC_64BIT and using a REGWTYPE #define to set correct variable and return value widths.
Adjust comments to indicate the 32 or 64bit register widths.
Relnotes: yes Sponsored by: DARPA/AFRL
|
270060 |
16-Aug-2014 |
bz |
MFC r263632:
For BERI on NetFPGA assume HZ=100 by default.
Remove the uart support in favour of a "jtag-uart" interface imitation providing a much simpler interface, directly exported to the host, allowing the toolchain to be shared with BERI on Altera. [1]
Submitted by: Jong Hun HAN (jong.han cl.cam.ac.uk) [1] Sponsored by: DARPA/AFRL
|
270058 |
16-Aug-2014 |
bz |
MFC r264605:
Based on xlp_machdep.c and completed the list of options based on boot/mips/beri/loader/metadata.c allow FDT configuration to set command line options. This leads to an interesting quesiton of future interactions with loader. However for configurations without loader this allows bootverbose or boot single user to be set by compiling a new kernel, which is good enough for testing and debugging.
Reviewed by: rwatson Sponsored by: DARPA/AFRL
|
269752 |
09-Aug-2014 |
markj |
MFC r266826, r266827 Move some duplicated hook definitions from machine-dependent files to kern_dtrace.c.
|
267734 |
22-Jun-2014 |
gavin |
Merge r267482,r267483,r267486,r267577,r267671,r267672 from head:
Remove send-pr and fix up all references to it. Replace it with a stub send-pr directing people towards the web site.
|
266331 |
17-May-2014 |
ian |
MFC 263301
In kernel config files, it is supposed to be 'options<space><tab>' not 'options<tab><tab>', per long standing (but recently not so strictly enforced) convention.
|
266312 |
17-May-2014 |
ian |
MFC 263036, 263059: delete advertising clause in licenses, renumber.
|
266204 |
16-May-2014 |
ian |
MFC r257854 (discussed with alc@)
As of r257209, all architectures have defined VM_KMEM_SIZE_SCALE. In other words, every architecture is now auto-sizing the kmem arena. This revision changes kmeminit() so that the definition of VM_KMEM_SIZE_SCALE becomes mandatory and the definition of VM_KMEM_SIZE becomes optional.
Replace or eliminate all existing definitions of VM_KMEM_SIZE. With auto-sizing enabled, VM_KMEM_SIZE effectively became an alternate spelling for VM_KMEM_SIZE_MIN on most architectures. Use VM_KMEM_SIZE_MIN for clarity.
|
266160 |
15-May-2014 |
ian |
MFC r261423, r261424, r261516, r261513, r261562, r261563, r261564, r261565, r261596, r261606
Add the imx sdhci controller.
Move Open Firmware device root on PowerPC, ARM, and MIPS systems to a sub-node of nexus (ofwbus) rather than direct attach under nexus. This fixes FDT on x86 and will make coexistence with ACPI on ARM systems easier. SPARC is unchanged.
Add the missing ')' at end of sentence. Reword it to use a more common idiom.
Pass the kernel physical address to initarm through the boot param struct.
Make functions only used in vfp.c static, and remove vfp_enable.
Fix __syscall on armeb EABI. As it returns a 64-bit value it needs to place 32-bit data in r1, not r0. 64-bit data is already packed correctly.
Use abp_physaddr for the physical address over KERNPHYSADDR. This helps us remove the need to load the kernel at a fixed address.
Remove references to PHYSADDR where it's used only in debugging output.
Dynamically generate the page table. This will allow us to detect the physical address we are loaded at to change the mapping.
|
266152 |
15-May-2014 |
ian |
MFC r261410
Follow r261352 by updating all drivers which are children of simplebus to check the status property in their probe routines.
|
266128 |
15-May-2014 |
ian |
MFC r261351, r261352, r261355, r261396, r261397, r261398, r261403, r261404, r261405
Open Firmware interrupt specifiers can consist of arbitrary-length byte strings and include arbitrary information (IRQ line/domain/sense). When the ofw_bus_map_intr() API was introduced, it assumed that, as on most systems, these were either 1 cell, containing an interrupt line, or 2, containing a line number plus a sense code. It turns out a non-negligible number of ARM systems use 3 (or even 4!) cells for interrupts, so make this more general.
Provide a simpler and more standards-compliant simplebus implementation to get the Routerboard 800 up and running with the vendor device tree. This does not implement some BERI-specific features (which hopefully won't be necessary soon), so move the old code to mips/beri, with a higher attach priority when built, until MIPS interrupt domain support is rearranged.
Allow nesting of simplebuses.
Add a set of helpers (ofw_bus_get_status() and ofw_bus_status_okay()) to process "status" properties of OF nodes.
Fix one remnant endian flaw in nexus.
|
266084 |
14-May-2014 |
ian |
MFC r257738, r259202, r258410, r260288, r260292, r260294, r260320, r260323, r260326, r260327, r260331, r260333, r260340, r260371, r260372, r260373, r260374, r260375
Add common bus_space tag definition shared for most supported ARMv6/v7 SoCs. Correct license statements to reflect the fact that these files were all derived from sys/arm/mv/bus_space.c.
In pmap_unmapdev(), remember the size, and use that as an argument to kva_free(), or we'd end up always passing it a size of 0
In pmap_mapdev(), first check whether a static mapping exists,
Convert TI static device mapping to use the new arm_devmap_add_entry(),
Use the common armv6 fdt_bus_tag defintion for tegra instead of a local copy.
Eliminate use of fdt_immr_addr(), it's not needed for tegra
Convert lpc from using fdt_immr style to arm_devmap_add_entry() to make static device mappings.
Retire machine/fdt.h as a header used by MI code, as its function is now obsolete. This involves the following pieces: - Remove it entirely on PowerPC, where it is not used by MD code either - Remove all references to machine/fdt.h in non-architecture-specific code (aside from uart_cpu_fdt.c, shared by ARM and MIPS, and so is somewhat non-arch-specific). - Fix code relying on header pollution from machine/fdt.h includes - Legacy fdtbus.c (still used on x86 FDT systems) now passes resource requests to its parent (nexus). This allows x86 FDT devices to allocate both memory and IO requests and removes the last notionally MI use of fdtbus_bs_tag. - On those architectures that retain a machine/fdt.h, unused bits like FDT_MAP_IRQ and FDT_INTR_MAX have been removed.
Add #include <machine/fdt.h> to a few files that used to get it via pollution
Enable the mv cesa security/crypto device by providing the required property in the dts source, and adding the right devices to the kernel config.
Remove dev/fdt/fdt_pci.c, which was code specific to Marvell ARM SoCs, related to setting up static device mappings. Since it was only used by arm/mv/mv_pci.c, it's now just static functions within that file, plus one public function that gets called only from arm/mv/mv_machdep.c.
Switch RPi to using arm_devmap_add_entry() to set up static device mapping.
Allow 'no static device mappings' to potentially work.
Don't try to find a static mapping before calling pmap_mapdev(), that logic is now part of pmap_mapdev() and doesn't need to be duplicated here.
Switch a10 to using arm_devmap_add_entry() to set up static device mapping.
|
266000 |
14-May-2014 |
ian |
MFC r257702, r257745, r257746, r257747, r257751, r257791, r257793, r257794, r257795, r257992
Teach nexus(4) about Open Firmware (e.g. FDT) on ARM and MIPS, retiring fdtbus in most cases.
Make OF_nextprop() work correctly for FDT by using the libfdt fdt_next_property_offset() API.
Do not panic if pmap_mincore() is called.
An addendum: it is possible, though of questionable utility, for a node to have no properties at all. Add definition for the Atheros 8021 gigabit PHY.
Consolidate Apple firmware hacks and improve them by switching on the presence of mac-io devices in the tree, which uniquely identifies Apple hardware.
Allow OF_decode_addr() to also be able to map resources on big-endian devices.
Make tsec work with the device tree present on the RB800.
Be more flexible about which compatible strings to accept. This brings up the PCI Express bus on the RB800 using the firmware device tree.
Rename the "bare" platform "mpc85xx", which is what it actually is, and add actual platform probing based on PVR.
|
265999 |
14-May-2014 |
ian |
MFC r257334, r257336, r257337, r257338, r257341, r257342, r257343, r257370, r257368, r257416
Hints-only devices should return BUS_PROBE_NOWILDCARD from their probe methods.
|
265606 |
07-May-2014 |
scottl |
Merge r264984
Retire smp_active. It was racey and caused demonstrated problems with the cpufreq code. Replace its use with smp_started. There's at least one userland tool that still looks at the kern.smp.active sysctl, so preserve it but point it to smp_started as well.
Obtained from: Netflix, Inc.
|
265388 |
05-May-2014 |
ken |
MFC the mpr(4) driver for LSI's 12Gb SAS cards.
This includes r265236, r265237, r265241 and r265261:
------------------------------------------------------------------------ r265236 | ken | 2014-05-02 14:25:09 -0600 (Fri, 02 May 2014) | 51 lines
Bring in the mpr(4) driver for LSI's MPT3 12Gb SAS controllers.
This is derived from the mps(4) driver, but it supports only the 12Gb IT and IR hardware including the SAS 3004, SAS 3008 and SAS 3108.
Some notes about this driver: o The 12Gb hardware can do "FastPath" I/O, and that capability is included in this driver.
o WarpDrive functionality has been removed, since it isn't supported in the 12Gb driver interface.
o The Scatter/Gather list handling code is significantly different between the 6Gb and 12Gb hardware. The 12Gb boards support IEEE Scatter/Gather lists.
Thanks to LSI for developing and testing this driver for FreeBSD.
share/man/man4/mpr.4: mpr(4) man page.
sys/dev/mpr/*: mpr(4) driver files.
sys/modules/Makefile, sys/modules/mpr/Makefile: Add a module Makefile for the mpr(4) driver.
sys/conf/files: Add the mpr(4) driver.
sys/amd64/conf/GENERIC, sys/i386/conf/GENERIC, sys/mips/conf/OCTEON1, sys/sparc64/conf/GENERIC: Add the mpr(4) driver to all config files that currently have the mps(4) driver.
sys/ia64/conf/GENERIC: Add the mps(4) and mpr(4) drivers to the ia64 GENERIC config file.
sys/i386/conf/XEN: Exclude the mpr module from building here.
Submitted by: Steve McConnell <Stephen.McConnell@lsi.com> Tested by: Chris Reeves <chrisr@spectralogic.com> Sponsored by: LSI, Spectra Logic Relnotes: LSI 12Gb SAS driver mpr(4) added
------------------------------------------------------------------------ ------------------------------------------------------------------------ r265237 | ken | 2014-05-02 14:36:20 -0600 (Fri, 02 May 2014) | 8 lines
Add the mpr(4) man page to the man4 Makefile.
This should have been included in r265236.
Submitted by: Steve McConnell <Stephen.McConnell@lsi.com> MFC after: 3 days Sponsored by: LSI, Spectra Logic
------------------------------------------------------------------------ ------------------------------------------------------------------------ r265241 | brueffer | 2014-05-02 15:14:28 -0600 (Fri, 02 May 2014) | 2 lines
Use our standard SYNOPSIS wording; perform some cleanup while here.
------------------------------------------------------------------------ ------------------------------------------------------------------------ r265261 | brueffer | 2014-05-03 05:15:28 -0600 (Sat, 03 May 2014) | 2 lines
Add a missing colon.
------------------------------------------------------------------------
Submitted by: Steve McConnell <Stephen.McConnell@lsi.com> Tested by: Chris Reeves <chrisr@spectralogic.com> Sponsored by: LSI, Spectra Logic Relnotes: LSI 12Gb SAS driver mpr(4) added
|
264496 |
15-Apr-2014 |
tijl |
MFC r263998:
Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4 -fms-extensions.
|
263687 |
24-Mar-2014 |
emaste |
MFC r263289: Update NetBSD Foundation copyrights to 2-clause BSD
The NetBSD Foundation states "Third parties are encouraged to change the license on any files which have a 4-clause license contributed to the NetBSD Foundation to a 2-clause license."
This change removes clauses 3 and 4 from copyright / license blocks that list The NetBSD Foundation as the only copyright holder.
Sponsored by: The FreeBSD Foundation
|
262717 |
03-Mar-2014 |
brooks |
MFR r261294:
Remove an unneeded space in the BERI merge.
Sponsored by: DARPA, AFRL
|
262649 |
01-Mar-2014 |
imp |
MFC: r260889, r260890, r260911:
r260911 | imp | 2014-01-20 10:45:36 -0700 (Mon, 20 Jan 2014) | 5 lines
Don't lock in the generic grab just to lock again in the specific grabs.
r260890 | imp | 2014-01-19 12:39:13 -0700 (Sun, 19 Jan 2014) | 11 lines
Introduce grab and ungrab upcalls. When the kernel desires to grab the console, it calls the grab functions. These functions should turn off the RX interrupts, and any others that interfere. This makes mountroot prompt work again. If there's more generalized need other than prompting, many of these routines should be expanded to do those new things.
Reviewed by: bde (with reservations)
|
262042 |
17-Feb-2014 |
avg |
MFC r257417: Remove references to an unused fasttrap probe hook
|
261455 |
04-Feb-2014 |
eadler |
MFC r258779,r258780,r258787,r258822:
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result.
Similar to the (1 << 31) case it is not defined to do (2 << 30).
This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases.
A similar change was made in OpenBSD.
|
261278 |
29-Jan-2014 |
brooks |
MFC r256939
MFP4: Change 221767 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/02/05 14:18:53
When printing out information on a TLB MOD exception for a user process (e.g., an attempt to write to a read-only page), report it as a "write" in the console message, rather than "unknown".
Change 221768 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/02/05 14:28:00
Fix post-compile but pre-commit typo in last changeset.
Sponsored by: DARPA/AFRL
|
261277 |
29-Jan-2014 |
brooks |
MFC r256937:
MFP4: Change 231031 by brooks@brooks_zenith on 2013/07/11 16:22:08
Turn the unused and uncompilable MIPS_DISABLE_L1_CACHE define in cache.c into an option and when set force I- and D-cache line sizes to 0 (the latter part might be better as a tunable).
Fix some casts in an #if 0'd bit of code which attempts to disable L1 cache ops when the cache is coherent.
Sponsored by: DARPA/AFRL
|
261274 |
29-Jan-2014 |
brooks |
MFC r256745:
MFP4: Change 227630 by bz@bz_zenith on 2013/04/12 08:50:27
Implement soft reset setting sr in sr and just in case loop endlessly afterwards.
Sponsored by: DARPA/AFRL
|
259899 |
26-Dec-2013 |
bz |
MFC r259267:
Add an FDT DTS and MDROOT kernel configuration for BERI on NetFPGA.
At this point we only support one CPU, the PIC, and a UART console.
Sponsored by: DARPA, AFRL
|
259898 |
26-Dec-2013 |
bz |
MFC r259265:
Use correct value pointing to previously selected FDT DTB.
Sponsored by: DARPA, AFRL
|
259510 |
17-Dec-2013 |
kib |
MFC r257228: Add bus_dmamap_load_ma() function to load map with the array of vm_pages.
|
257528 |
01-Nov-2013 |
brooks |
MFC r256935
MFP4: Change 228019 by bz@bz_zenith on 2013/04/23 13:55:30
Add kernel side support for large TLB on BERI/CHERI. Modelled similar to NLM
Sponsored by: DAPRA/AFRL Approved by: re (delphij)
|
257527 |
01-Nov-2013 |
brooks |
MFC r256912, r256931, r256977
Sync BERI kernel configs with P4:
Switch the majority of device configuration to FDT from hints.
Add BERI_*_BASE configs to reduce duplication in the MDROOT and SDROOT kernels.
Add NFS and GSSAPI support by default.
Enable ATSE_CFI_HACK in BERI configs, stable MAC addresses are useful.
BERI_SIM.hint is no longer used, remove it.
Sponsored by: DARPA/AFRL Approved by: re (delphij)
|
257523 |
01-Nov-2013 |
brooks |
MFC r256934, r256963, r256972, r257017
MFP4: Change 221534 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/01/27 16:05:30
FreeBSD/mips stores page-table entries in a near-identical format to MIPS TLB entries -- only it overrides certain "reserved" bits in the MIPS-defined EntryLo register to hold software-defined bits (swbits) to avoid significantly increasing the page table memory footprint. On n32 and n64, these bits were (a) colliding with MIPS64r2 physical memory extensions and (b) being improperly cleared.
Attempt to fix both of these problems by pushing swbits further along 64-bit EntryLo registers into the reserved space, and improving consistency between C-based and assembly-based clearing of swbits -- in particular, to use the same definition. This should stop swbits from leaking into TLB entries -- while ignored by most current MIPS hardware, this would cause a problem with (much) larger physical memory sizes, and also leads to confusing hardware-level tracing as physical addresses contain unexpected (and inconsistent) higher bits.
Discussed with: imp, jmallett
Change 1187301 by brooks@brooks_zenith on 2013/10/23 14:40:10 Loop back the initial commit of 221534 to HEAD. Correct its implementation for mips32.
Sponsored by: DARPA/AFRL Approved by: re (gjb)
|
257522 |
01-Nov-2013 |
brooks |
MFC r256911, r256936
MFP4: 223121 (PIC portion), 225861, 227822, 229692 (PIC only), 229693, 230523, 1123614
Implement a driver for Robert Norton's PIC as an FDT interrupt controller. Devices whose interrupt-parent property points to a beripic
device will have their interrupt allocation, activation, and setup operations routed through the IC rather than down the traditional bus hierarchy.
This driver largely abstracts the underlying CPU away allowing the PIC to be implemented on CPU's other than BERI. Due to insufficient abstractions a small amount of MIPS specific code is currently required in fdt_mips.c and to implement counters.
Sponsored by: DARPA/AFRL Approved by: re (gjb)
|
257456 |
31-Oct-2013 |
brooks |
MFC r256865
Remove the isf(4) driver. It was created by accident and is subset of the cfi(4) driver. It remained in the tree longer than would be ideal due to the time required to bring cfi(4) to feature parity.
Sponsored by: DARPA/AFRL Approved by: re (gjb)
|
257447 |
31-Oct-2013 |
brooks |
MFC r256752, r256946
MFP4: 221483, 221567, 221568, 221670, 221677, 221678, 221800, 221801, 221804, 221805, 222004, 222006, 222055, 222820, 1135077, 1135118, 1136259
Add atse(4), a driver for the Altera Triple Speed Ethernet MegaCore.
The current driver support gigabit Ethernet speeds only and works with the MegaCore only in the internal FIFO configuration in the soon to be open sourced BERI CPU configuration.
MFP4: 1187103, 222076, 222057, 222051, 221799
Add atsectl, a simple utility to read and update MAC addresses stored in
the default flash location on Altera DE4 boards. Typically used once when setting up a board so leaving in tools rather than inflicting on all users.
To build with world add LOCAL_DIRS=tools/tools/atsectl to the make command line.
Submitted by: bz Sponsored by: DARPA/AFRL Approved by: re (glebius)
|
256381 |
12-Oct-2013 |
markm |
Merge from project branch via main. Uninteresting commits are trimmed.
Refactor of /dev/random device. Main points include:
* Userland seeding is no longer used. This auto-seeds at boot time on PC/Desktop setups; this may need some tweeking and intelligence from those folks setting up embedded boxes, but the work is believed to be minimal.
* An entropy cache is written to /entropy (even during installation) and the kernel uses this at next boot.
* An entropy file written to /boot/entropy can be loaded by loader(8)
* Hardware sources such as rdrand are fed into Yarrow, and are no longer available raw.
------------------------------------------------------------------------ r256240 | des | 2013-10-09 21:14:16 +0100 (Wed, 09 Oct 2013) | 4 lines
Add a RANDOM_RWFILE option and hide the entropy cache code behind it. Rename YARROW_RNG and FORTUNA_RNG to RANDOM_YARROW and RANDOM_FORTUNA. Add the RANDOM_* options to LINT.
------------------------------------------------------------------------ r256239 | des | 2013-10-09 21:12:59 +0100 (Wed, 09 Oct 2013) | 2 lines
Define RANDOM_PURE_RNDTEST for rndtest(4).
------------------------------------------------------------------------ r256204 | des | 2013-10-09 18:51:38 +0100 (Wed, 09 Oct 2013) | 2 lines
staticize struct random_hardware_source
------------------------------------------------------------------------ r256203 | markm | 2013-10-09 18:50:36 +0100 (Wed, 09 Oct 2013) | 2 lines
Wrap some policy-rich code in 'if NOTYET' until we can thresh out what it really needs to do.
------------------------------------------------------------------------ r256184 | des | 2013-10-09 10:13:12 +0100 (Wed, 09 Oct 2013) | 2 lines
Re-add /dev/urandom for compatibility purposes.
------------------------------------------------------------------------ r256182 | des | 2013-10-09 10:11:14 +0100 (Wed, 09 Oct 2013) | 3 lines
Add missing include guards and move the existing ones out of the implementation namespace.
------------------------------------------------------------------------ r256168 | markm | 2013-10-08 23:14:07 +0100 (Tue, 08 Oct 2013) | 10 lines
Fix some just-noticed problems:
o Allow this to work with "nodevice random" by fixing where the MALLOC pool is defined.
o Fix the explicit reseed code. This was correct as submitted, but in the project branch doesn't need to set the "seeded" bit as this is done correctly in the "unblock" function.
o Remove some debug ifdeffing.
o Adjust comments.
------------------------------------------------------------------------ r256159 | markm | 2013-10-08 19:48:11 +0100 (Tue, 08 Oct 2013) | 6 lines
Time to eat crow for me.
I replaced the sx_* locks that Arthur used with regular mutexes; this turned out the be the wrong thing to do as the locks need to be sleepable. Revert this folly.
# Submitted by: Arthur Mesh <arthurmesh@gmail.com> (In original diff)
------------------------------------------------------------------------ r256138 | des | 2013-10-08 12:05:26 +0100 (Tue, 08 Oct 2013) | 10 lines
Add YARROW_RNG and FORTUNA_RNG to sys/conf/options.
Add a SYSINIT that forces a reseed during proc0 setup, which happens fairly late in the boot process.
Add a RANDOM_DEBUG option which enables some debugging printf()s.
Add a new RANDOM_ATTACH entropy source which harvests entropy from the get_cyclecount() delta across each call to a device attach method.
------------------------------------------------------------------------ r256135 | markm | 2013-10-08 07:54:52 +0100 (Tue, 08 Oct 2013) | 8 lines
Debugging. My attempt at EVENTHANDLER(multiuser) was a failure; use EVENTHANDLER(mountroot) instead.
This means we can't count on /var being present, so something will need to be done about harvesting /var/db/entropy/... .
Some policy now needs to be sorted out, and a pre-sync cache needs to be written, but apart from that we are now ready to go.
Over to review.
------------------------------------------------------------------------ r256094 | markm | 2013-10-06 23:45:02 +0100 (Sun, 06 Oct 2013) | 8 lines
Snapshot.
Looking pretty good; this mostly works now. New code includes:
* Read cached entropy at startup, both from files and from loader(8) preloaded entropy. Failures are soft, but announced. Untested.
* Use EVENTHANDLER to do above just before we go multiuser. Untested.
------------------------------------------------------------------------ r256088 | markm | 2013-10-06 14:01:42 +0100 (Sun, 06 Oct 2013) | 2 lines
Fix up the man page for random(4). This mainly removes no-longer-relevant details about HW RNGs, reseeding explicitly and user-supplied entropy.
------------------------------------------------------------------------ r256087 | markm | 2013-10-06 13:43:42 +0100 (Sun, 06 Oct 2013) | 6 lines
As userland writing to /dev/random is no more, remove the "better than nothing" bootstrap mode.
Add SWI harvesting to the mix.
My box seeds Yarrow by itself in a few seconds! YMMV; more to follow.
------------------------------------------------------------------------ r256086 | markm | 2013-10-06 13:40:32 +0100 (Sun, 06 Oct 2013) | 11 lines
Debug run. This now works, except that the "live" sources haven't been tested. With all sources turned on, this unlocks itself in a couple of seconds! That is no my box, and there is no guarantee that this will be the case everywhere.
* Cut debug prints.
* Use the same locks/mutexes all the way through.
* Be a tad more conservative about entropy estimates.
------------------------------------------------------------------------ r256084 | markm | 2013-10-06 13:35:29 +0100 (Sun, 06 Oct 2013) | 5 lines
Don't use the "real" assembler mnemonics; older compilers may not understand them (like when building CURRENT on 9.x).
# Submitted by: Konstantin Belousov <kostikbel@gmail.com>
------------------------------------------------------------------------ r256081 | markm | 2013-10-06 10:55:28 +0100 (Sun, 06 Oct 2013) | 12 lines
SNAPSHOT.
Simplify the malloc pools; We only need one for this device.
Simplify the harvest queue.
Marginally improve the entropy pool hashing, making it a bit faster in the process.
Connect up the hardware "live" source harvesting. This is simplistic for now, and will need to be made rate-adaptive.
All of the above passes a compile test but needs to be debugged.
------------------------------------------------------------------------ r256042 | markm | 2013-10-04 07:55:06 +0100 (Fri, 04 Oct 2013) | 25 lines
Snapshot. This passes the build test, but has not yet been finished or debugged.
Contains:
* Refactor the hardware RNG CPU instruction sources to feed into the software mixer. This is unfinished. The actual harvesting needs to be sorted out. Modified by me (see below).
* Remove 'frac' parameter from random_harvest(). This was never used and adds extra code for no good reason.
* Remove device write entropy harvesting. This provided a weak attack vector, was not very good at bootstrapping the device. To follow will be a replacement explicit reseed knob.
* Separate out all the RANDOM_PURE sources into separate harvest entities. This adds some secuity in the case where more than one is present.
* Review all the code and fix anything obviously messy or inconsistent. Address som review concerns while I'm here, like rename the pseudo-rng to 'dummy'.
# Submitted by: Arthur Mesh <arthurmesh@gmail.com> (the first item)
------------------------------------------------------------------------ r255319 | markm | 2013-09-06 18:51:52 +0100 (Fri, 06 Sep 2013) | 4 lines
Yarrow wants entropy estimations to be conservative; the usual idea is that if you are certain you have N bits of entropy, you declare N/2.
------------------------------------------------------------------------ r255075 | markm | 2013-08-30 18:47:53 +0100 (Fri, 30 Aug 2013) | 4 lines
Remove short-lived idea; thread to harvest (eg) RDRAND enropy into the usual harvest queues. It was a nifty idea, but too heavyweight.
# Submitted by: Arthur Mesh <arthurmesh@gmail.com>
------------------------------------------------------------------------ r255071 | markm | 2013-08-30 12:42:57 +0100 (Fri, 30 Aug 2013) | 4 lines
Separate out the Software RNG entropy harvesting queue and thread into its own files.
# Submitted by: Arthur Mesh <arthurmesh@gmail.com>
------------------------------------------------------------------------ r254934 | markm | 2013-08-26 20:07:03 +0100 (Mon, 26 Aug 2013) | 2 lines
Remove the short-lived namei experiment.
------------------------------------------------------------------------ r254928 | markm | 2013-08-26 19:35:21 +0100 (Mon, 26 Aug 2013) | 2 lines
Snapshot; Do some running repairs on entropy harvesting. More needs to follow.
------------------------------------------------------------------------ r254927 | markm | 2013-08-26 19:29:51 +0100 (Mon, 26 Aug 2013) | 15 lines
Snapshot of current work;
1) Clean up namespace; only use "Yarrow" where it is Yarrow-specific or close enough to the Yarrow algorithm. For the rest use a neutral name.
2) Tidy up headers; put private stuff in private places. More could be done here.
3) Streamline the hashing/encryption; no need for a 256-bit counter; 128 bits will last for long enough.
There are bits of debug code lying around; these will be removed at a later stage.
------------------------------------------------------------------------ r254784 | markm | 2013-08-24 14:54:56 +0100 (Sat, 24 Aug 2013) | 39 lines
1) example (partially humorous random_adaptor, that I call "EXAMPLE") * It's not meant to be used in a real system, it's there to show how the basics of how to create interfaces for random_adaptors. Perhaps it should belong in a manual page
2) Move probe.c's functionality in to random_adaptors.c * rename random_ident_hardware() to random_adaptor_choose()
3) Introduce a new way to choose (or select) random_adaptors via tunable "rngs_want" It's a list of comma separated names of adaptors, ordered by preferences. I.e.: rngs_want="yarrow,rdrand"
Such setting would cause yarrow to be preferred to rdrand. If neither of them are available (or registered), then system will default to something reasonable (currently yarrow). If yarrow is not present, then we fall back to the adaptor that's first on the list of registered adaptors.
4) Introduce a way where RNGs can play a role of entropy source. This is mostly useful for HW rngs.
The way I envision this is that every HW RNG will use this functionality by default. Functionality to disable this is also present. I have an example of how to use this in random_adaptor_example.c (see modload event, and init function)
5) fix kern.random.adaptors from kern.random.adaptors: yarrowpanicblock to kern.random.adaptors: yarrow,panic,block
6) add kern.random.active_adaptor to indicate currently selected adaptor: root@freebsd04:~ # sysctl kern.random.active_adaptor kern.random.active_adaptor: yarrow
# Submitted by: Arthur Mesh <arthurmesh@gmail.com>
Submitted by: Dag-Erling Smørgrav <des@FreeBSD.org>, Arthur Mesh <arthurmesh@gmail.com> Reviewed by: des@FreeBSD.org Approved by: re (delphij) Approved by: secteam (des,delphij)
|
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
256247 |
09-Oct-2013 |
adrian |
Add read/write bus barriers for MIPS.
Tested:
* AR9344 - mips74k SoC
Approved by: re@ (delphij)
|
256175 |
09-Oct-2013 |
adrian |
Add some missing AR934x register definitions.
These are needed for ethernet bootstrap.
Approved by: re@ (gjb)
|
256174 |
09-Oct-2013 |
adrian |
Fix interrupt handling from the APB periperals (ie, UART) - it also requires an explicit acknowledgement.
Tested:
* AR9344 (DB120) SoC
Approved by: re@ (gjb)
|
256173 |
09-Oct-2013 |
adrian |
Mark AR934x based boards to be mips74k.
Reviewed by: imp@ Approved by: re@ (gjb)
|
256172 |
09-Oct-2013 |
adrian |
Add "better" MIPS24k and MIPS74k barriers.
* the mips74k cores only need EHB (which is 'sll $0, $0, 3') here; NOPs don't actually work.
* add EHB as the last NOP for the default barriers/hazards; that is "better" behaviour and should work on a wider variety of processors.
This allows the existing (icky) TLB code to work, allowing the AR9344 SoC (mips74k) to actually get through kernel startup.
Tested:
* AR9344 SoC - (mips74k) * AR9331 SoC - (mips24k)
TODO:
* test on mips4k CPUs, just to be sure.
* document that sll $0, $0, 3 is actually "EHB" and that it falls back to being a NOP for pre-mips32r1.
* mips24k has an errata that we currently don't correctly explicitly state - ie, that after DERET/ERET, the only valid instruction is a NOP.
Reviewed by: imp@ Approved by: re@ (gjb)
|
256171 |
09-Oct-2013 |
adrian |
Shuffle the includes around so they occur after opt_global.h is included; this way the CPU ABI / core #define items are there.
Reviewed by: imp@ Approved by: re@ (gjb)
|
256046 |
04-Oct-2013 |
jchandra |
Fixes for the Netlogic XLP on-chip RSA block driver
The changes are to: * Use contigmalloc/contigfree which handling microcode buffer * Use a different buffer to send microcode to each engine * Swap microcode in little-endian compilation * Fix freeback message queue id field * Simplify xlp_get_rsa_opsize() to remove unnecessary checks * Fix NULL check after use in xlp_free_cmd_params() * Do better error handling when the hardware returns error * Fix error codes in few cases
Submitted by: Vekatesh J. V. <venkatesh.vivekanandan@broadcom.com> Approved by: re (hrs)
|
256045 |
04-Oct-2013 |
jchandra |
Style fixes for the Netlogic XLP RSA driver
Updates to the Netlogic XLP on-chp RSA block driver. The changes are to follow style(9) guidelines, to improve readability and to remove unnecessary initialization.
No changes to logic have been introduced by this commit.
Submitted by: Venkatesh J. V. <venkatesh.vivekanandan@broadcom.com> Approved by: re (hrs)
|
255989 |
02-Oct-2013 |
sbruno |
set ROOTDEVNAME to ada0 with no paritions. This makes it much more functional with makefs and other tools for testing and ports building
Approved by: re (gjb) MFC after: 2 weeks
|
255935 |
29-Sep-2013 |
adrian |
Add pagemask debugging output in "show tlb" in the debugger.
Approved by: re (marius) Obtained from: bsdimp
|
255786 |
22-Sep-2013 |
glebius |
- Create kern.ipc.sendfile namespace, and put the new "readhead" OID there as "kern.ipc.sendfile.readahead". - Push all nsfbuf related tunables into MD code. Don't move them to new namespace in favor of POLA.
Reviewed by: scottl Approved by: re (gjb)
|
255764 |
21-Sep-2013 |
adrian |
Fix the AR933x CPU UART support by using the correct clock when calculating the UART frequency.
Tested:
* AR933x (carambola 2 board), UART now works again
Approved by: re
|
255724 |
20-Sep-2013 |
alc |
The pmap function pmap_clear_reference() is no longer used. Remove it.
pmap_clear_reference() has had exactly one caller in the kernel for several years, more precisely, since FreeBSD 8. Now, that call no longer exists.
Approved by: re (kib) Sponsored by: EMC / Isilon Storage Division
|
255659 |
17-Sep-2013 |
sbruno |
Bring in configuration for Buffalo Airstation WZR-300HP, Atheros based wireless home router.
Notable things: 2x 16 MB flash devices Atheros Wireless Atheros Switching
Many thanks to adrian@ for his guidance on this and keeping the drivers in the base system up to date
Approved by: re (delphij)
|
255656 |
17-Sep-2013 |
hiren |
We have grown a bit too big lately. Shrinking the kernel for TP-Link TL-WR1043ND.
Submitted by: loos (initial version) Reviewed by: adrian Approved by: sbruno (mentor, implicit) Approved by: re (delphij) Tested by: hiren
|
255368 |
07-Sep-2013 |
jchandra |
Netlogic XLP network driver update
Changes are to - update board and network interface detection logic - fix reading onboard CPLD in little-endian config - print NAE frequency conrrectly for Bx chips - update XAUI config to disable Rx/Tx until interface is up
Submitted by: Venkatesh J V <venkatesh.vivekanandan@broadcom.com>
|
255367 |
07-Sep-2013 |
jchandra |
Use a better version of memcpy/bcopy for mips kernel.
Use a variant of mips libc memcpy for kernel. This implementation uses 64-bit operations when compiled for 64-bit, and is significantly faster in that case.
Submitted by: Tanmay Jagdale <tanmayj@broadcom.com>
|
255362 |
07-Sep-2013 |
markm |
Bring in some behind-the-scenes development, mainly By Arthur Mesh, the rest by me.
o Namespace cleanup; the Yarrow name is now restricted to where it really applies; this is in anticipation of being augmented or replaced by Fortuna in the future. Fortuna is mentioned, but behind #if logic, and is ignorable for now.
o The harvest queue is pulled out into its own modules.
o Entropy harvesting is emproved, both by being made more conservative, and by separating (a bit!) the sources. Available entropy crumbs are marginally improved.
o Selection of sources is made clearer. With recent revelations, this will receive more work in the weeks and months to come.
Submitted by: Arthur Mesh (partly) <arthurmesh@gmail.com>
|
255335 |
06-Sep-2013 |
loos |
Remove the hardcoded limit for the number of gpio_pins that can be used. Allocate it dynamically.
Approved by: adrian (mentor)
|
255334 |
06-Sep-2013 |
loos |
Fix an off-by-one bug in ar71xx_gpio and bcm2835_gpio which makes the last pin unavailable.
Reported and tested by: sbruno (ar71xx) Approved by: adrian (mentor) Pointy hat to: loos
|
255318 |
06-Sep-2013 |
glebius |
Fix build with gcc. Move sf_buf_alloc()/sf_buf_free() declarations to MD headers.
|
255300 |
06-Sep-2013 |
loos |
Fix the leakage of dma tags on if_arge. The leak occur when arge_start() add some packet(s) to tx ring and arge_stop() is called before receive the sent packet interrupt from hardware. Fix arge_stop() to unload the in use dma tags and free the associated mbuf.
PR: 178319, 163670 Approved by: adrian (mentor)
|
255289 |
06-Sep-2013 |
glebius |
On those machines, where sf_bufs do not represent any real object, make sf_buf_alloc()/sf_buf_free() inlines, to save two calls to an absolutely empty functions.
Reviewed by: alc, kib, scottl Sponsored by: Nginx, Inc. Sponsored by: Netflix
|
255212 |
04-Sep-2013 |
gonzo |
Add 32-bit support for Gxemul's oldtestmips machine emulation
Original work by: kan@
|
255195 |
03-Sep-2013 |
sbruno |
Add options GEOM_PART_GPT and options MSDOSFS to the DIR-825
Reviewed by: adrian@
|
255194 |
03-Sep-2013 |
imp |
Newer versions of gcc define __INT64_C and __UINT64_C, so avoid redefining them if gcc provides them.
|
255125 |
01-Sep-2013 |
alc |
pmap_protect() on MIPS does not need to acquire the pvh global lock.
|
255098 |
31-Aug-2013 |
alc |
Implement pmap_advise().
|
255089 |
31-Aug-2013 |
gonzo |
- Set proper KERNLOADADDR - Add bpf(4) required by dhclient
|
255088 |
31-Aug-2013 |
gonzo |
YAMON is 32-bit application and uses 32-bit pointers to pass kernel arguments and environment names/values. Cast values to proper pointer type to make MALTA kernel 64-bit compatible
|
255086 |
30-Aug-2013 |
hiren |
Add device PicoStation M2HP support. This is a nice small outdoor/indoor AP from Ubiquity Networks.
The device has: AR7241 CPU SoC AR9287 Wifi 8MB flash 32MB RAM
wifi has been tested to work along with leds.
Submitted by: loos Approved by: sbruno (mentor, implicit) Tested by: hiren
|
255084 |
30-Aug-2013 |
gonzo |
Add bpf(4) to config file to get dhclient working
|
255083 |
30-Aug-2013 |
gonzo |
Add PCI bus space implementation that converts all 2 and 4 bytes values to/from little endian according to PCI spec.
|
255028 |
29-Aug-2013 |
alc |
Significantly reduce the cost, i.e., run time, of calls to madvise(..., MADV_DONTNEED) and madvise(..., MADV_FREE). Specifically, introduce a new pmap function, pmap_advise(), that operates on a range of virtual addresses within the specified pmap, allowing for a more efficient implementation of MADV_DONTNEED and MADV_FREE. Previously, the implementation of MADV_DONTNEED and MADV_FREE relied on per-page pmap operations, such as pmap_clear_reference(). Intuitively, the problem with this implementation is that the pmap-level locks are acquired and released and the page table traversed repeatedly, once for each resident page in the range that was specified to madvise(2). A more subtle flaw with the previous implementation is that pmap_clear_reference() would clear the reference bit on all mappings to the specified page, not just the mapping in the range specified to madvise(2).
Since our malloc(3) makes heavy use of madvise(2), this change can have a measureable impact. For example, the system time for completing a parallel "buildworld" on a 6-core amd64 machine was reduced by about 1.5% to 2.0%.
Note: This change only contains pmap_advise() implementations for a subset of our supported architectures. I will commit implementations for the remaining architectures after further testing. For now, a stub function is sufficient because of the advisory nature of pmap_advise().
Discussed with: jeff, jhb, kib Tested by: pho (i386), marcel (ia64) Sponsored by: EMC / Isilon Storage Division
|
255021 |
29-Aug-2013 |
loos |
Prevent the full restart cycle every time arge_start() is called. Only (re)start the interface when it is down. This change fix a race with BOOTP where the response packet is lost because the interface is being reset by a netmask change right after send the packet.
PR: 178318 Approved by: adrian (mentor)
|
254990 |
28-Aug-2013 |
loos |
Make ar71xx_spi attach the next free unit of spibus and not only spibus0.
Approved by: adrian (mentor)
|
254989 |
28-Aug-2013 |
loos |
Add the default hints to make the GPIO pins, rf led and reset switch work out of the box on RouterStation.
PR: 177832 Submitted by: Petko Bordjukov (bordjukov@gmail.com) Approved by: adrian (mentor)
|
254983 |
28-Aug-2013 |
gonzo |
Fix GT PCI controller driver on big-endian hardware
|
254946 |
27-Aug-2013 |
gonzo |
Fixes for compatibility with QEMU:
- Route PCI interrupt for NIC - Make "no mapping" warning more user-friendly: add device name and mention that it's IRQ mapping - Do not overlap ICUs' IO window with PCI devices' IO windows by starting IO rman at offset 0x100
|
254944 |
27-Aug-2013 |
gonzo |
- Initialize freq variable so we will not end up with random value if there is no YAMON present
|
254690 |
23-Aug-2013 |
sbruno |
Some vendors store the mac addresses of arge(4) as a literal sring in the form xx:xx:xx:xx:xx:xx complete with ":" characters taking of 18 bytes instead of 6 integers. Expose a "readascii" tuneable to handle this case.
Remove restriction on eepromac assignement for the first dev instance only.
Add eepromac address for DIR-825 to hints file.
Add readascii hint for DIR-825
Reviewed by: adrian@
|
254667 |
22-Aug-2013 |
kib |
Revert r254501. Instead, reuse the type stability of the struct pmap which is the part of struct vmspace, allocated from UMA_ZONE_NOFREE zone. Initialize the pmap lock in the vmspace zone init function, and remove pmap lock initialization and destruction from pmap_pinit() and pmap_release().
Suggested and reviewed by: alc (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation
|
254234 |
12-Aug-2013 |
adrian |
Add a missing break.
|
254138 |
09-Aug-2013 |
attilio |
The soft and hard busy mechanism rely on the vm object lock to work. Unify the 2 concept into a real, minimal, sxlock where the shared acquisition represent the soft busy and the exclusive acquisition represent the hard busy. The old VPO_WANTED mechanism becames the hard-path for this new lock and it becomes per-page rather than per-object. The vm_object lock becames an interlock for this functionality: it can be held in both read or write mode. However, if the vm_object lock is held in read mode while acquiring or releasing the busy state, the thread owner cannot make any assumption on the busy state unless it is also busying it.
Also: - Add a new flag to directly shared busy pages while vm_page_alloc and vm_page_grab are being executed. This will be very helpful once these functions happen under a read object lock. - Move the swapping sleep into its own per-object flag
The KPI is heavilly changed this is why the version is bumped. It is very likely that some VM ports users will need to change their own code.
Sponsored by: EMC / Isilon storage division Discussed with: alc Reviewed by: jeff, kib Tested by: gavin, bapt (older version) Tested by: pho, scottl
|
254025 |
07-Aug-2013 |
jeff |
Replace kernel virtual address space allocation with vmem. This provides transparent layering and better fragmentation.
- Normalize functions that allocate memory to use kmem_* - Those that allocate address space are named kva_* - Those that operate on maps are named kmap_* - Implement recursive allocation handling for kmem_arena in vmem.
Reviewed by: alc Tested by: pho Sponsored by: EMC / Isilon Storage Division
|
253845 |
31-Jul-2013 |
obrien |
Back out r253779 & r253786.
|
253844 |
31-Jul-2013 |
sbruno |
Adjust magic numbers to allow attachment of ath(4) modules.
|
253842 |
31-Jul-2013 |
sbruno |
device if_bridge gets me a bridge device
|
253779 |
29-Jul-2013 |
obrien |
Decouple yarrow from random(4) device.
* Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option. The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow.
* random(4) device doesn't really depend on rijndael-*. Yarrow, however, does.
* Add random_adaptors.[ch] which is basically a store of random_adaptor's. random_adaptor is basically an adapter that plugs in to random(4). random_adaptor can only be plugged in to random(4) very early in bootup. Unplugging random_adaptor from random(4) is not supported, and is probably a bad idea anyway, due to potential loss of entropy pools. We currently have 3 random_adaptors: + yarrow + rdrand (ivy.c) + nehemeiah
* Remove platform dependent logic from probe.c, and move it into corresponding registration routines of each random_adaptor provider. probe.c doesn't do anything other than picking a specific random_adaptor from a list of registered ones.
* If the kernel doesn't have any random_adaptor adapters present then the creation of /dev/random is postponed until next random_adaptor is kldload'ed.
* Fix randomdev_soft.c to refer to its own random_adaptor, instead of a system wide one.
Submitted by: arthurmesh@gmail.com, obrien Obtained from: Juniper Networks Reviewed by: obrien
|
253750 |
28-Jul-2013 |
avg |
Revert r253748,253749
This WIP should not have been committed yet.
Pointyhat to: avg
|
253748 |
28-Jul-2013 |
avg |
put contents of cpu.h under _KERNEL
no userland-serviceable parts inside
MFC after: 20 days
|
253539 |
22-Jul-2013 |
imp |
This file isn't derived from anything delivered by Berkeley, so remove this statement.
|
253512 |
21-Jul-2013 |
adrian |
Add some initial board support for the AR934x and the Qualcomm Atheros DB120 development board.
The AR934x SoCs are a MIPS74k based system with increased RAM addressing space, some scratch-pad RAM, an improved gige switch PHY and 2x2 or 3x3 on-board dual-band wifi.
This support isn't complete by any stretch; it's just enough to bring the board up for others to tinker with. Notably, the MIPS74k support is broken. However it boots enough to echo some basic probe/attach messages, before dying somewhere in the TLB code.
Thankyou to Qualcomm Atheros for their continued support of me doing open source work with their hardware.
Tested:
* AR9344, mips74k
|
253511 |
21-Jul-2013 |
adrian |
Implement some initial AR934x support routines.
This code reads the PLL configuration registers and correctly programs things so the UART and such can come up.
There's MIPS74k platform issues that need fixing; but this at least brings things up enough to echo stuff out the serial port and allow for interactive debugging with ddb.
Tested:
* AR71xx SoCs * AR933x SoC * AR9344 board (DB120)
Obtained from: Qualcomm Atheros; Linux/OpenWRT
|
253510 |
21-Jul-2013 |
adrian |
Teach the GPIO code about the AR934x GPIO register and pin counts.
|
253509 |
21-Jul-2013 |
adrian |
Use the UART frequency when programming the UART clock.
This allows the 16550 support to work correctly on the upcoming AR934x support.
|
253508 |
21-Jul-2013 |
adrian |
Initialise the watchdog and UART frequencies.
For all pre-AR933x chips, the frequency is just the APB frequency. For the AR933x, the UART frequency is different but we just hacked around it.
For the AR934x, there's a different PLL setting for these, so they have to be broken out.
|
253507 |
21-Jul-2013 |
adrian |
Add two new CPU specific definitions - the watchdog clock frequency and the UART clock frequency.
The AR933x and AR934x have separate PLL settings for these.
|
253367 |
15-Jul-2013 |
ae |
Include sys/systm.h after sys/param.h.
Suggested by: pluknet
|
253351 |
15-Jul-2013 |
ae |
Introduce new structure sfstat for collecting sendfile's statistics and remove corresponding fields from struct mbstat. Use PCPU counters and SFSTAT_INC() macro for update these statistics.
Discussed with: glebius
|
253103 |
09-Jul-2013 |
imp |
Nearly a complete rewrite of elf.h.
Start with NetBSD's sys/arch/mips/include/elf_machdep.h 1.18. Remove the NetBSD specific glue pieces (leaving mostly just relocation types).
Add in FreeBSD specific glue pieces from older versions of this file, and move to the top of the file: r237430 | kib | 2012-06-22 00:38:31 -0600 (Fri, 22 Jun 2012) | 5 lines r232449 | jmallett | 2012-03-03 01:19:18 -0700 (Sat, 03 Mar 2012) | 18 lines r217097 | kib | 2011-01-07 07:22:34 -0700 (Fri, 07 Jan 2011) | 3 lines r211412 | kib | 2010-08-17 02:55:45 -0600 (Tue, 17 Aug 2010) | 7 lines r202908 | gonzo | 2010-01-23 19:59:22 -0700 (Sat, 23 Jan 2010) | 4 lines r195356 | imp | 2009-07-05 01:00:51 -0600 (Sun, 05 Jul 2009) | 6 lines r195128 | gonzo | 2009-06-27 17:27:41 -0600 (Sat, 27 Jun 2009) | 4 lines r197933 | kib | 2009-10-10 09:31:24 -0600 (Sat, 10 Oct 2009) | 9 lines r189926 | kib | 2009-03-17 06:50:16 -0600 (Tue, 17 Mar 2009) | 9 lines r186191 | imp | 2008-12-16 13:07:47 -0700 (Tue, 16 Dec 2008) | 7 lines as closely as I can tell, the projects/mips branch merge was disruptive to good history.
This should make merges easier in the future from NetBSD and vice versa.
|
253028 |
08-Jul-2013 |
adrian |
Import the initial SoC register definitions for the AR934x MIPS74k SoC.
Obtained from: Linux/OpenWRT
|
253027 |
08-Jul-2013 |
adrian |
Add AR9341, AR9342, AR9344 SoC types.
|
252965 |
07-Jul-2013 |
imp |
Remove all the NOPs after SYNC. They aren't needed.
They originated in the original Octeon port. They weren't present, as far as I can tell, on the projects/mips branch until after this point. They were in the original Octeon port in code picked up from the vendor, who I've been able to find out trolling old email put them there to get around an SMP problem that most likely was fixed in other ways.
NetBSD and Linux don't have these, except for some specific uses of SYNC on the alchemy parts (which we don't support, but even if we did it is only a specific case and would be specifically coded anyway). This is true of the current Linux code, as well as one old version I polled.
I looked back at the old R12000, R8000, R6000, R4000, R4400 errata that I have, and could find no mention of SYNC needing NOPs for silicon bugs (although plenty of other cases where NOPs and other contortions were needed).
An Google search turned up no old mailing list discussions on this on Linux, NetBSD or FreeBSD (except the disussion that kicked off these studies).
I've test booted this on my Octeon Plus eval board and survived a buildworld. Adrian Chadd reports that this patch has no ill effects on the Ahteros platforms he tested it on.
I conclude it is safe to just remove the NOPs. But added __MIPS_PLATFORM_SYNC_NOPS as a failsafe in case we find some platform where these are, in fact, required.
Reviewed by: adrian@
|
252691 |
04-Jul-2013 |
adrian |
Oops - fix bad hint numbering for the ART section.
|
252690 |
04-Jul-2013 |
adrian |
Add in a configuration file and hints for the Engenius ENH-200.
This is an AR7240 based device with an AR9285 on-board.
I've tested the initial boot and wifi support; however at the moment the ethernet switch driver doesn't seem to be picking up carrier on the active ethernet port. Basic flood pinging works however, so I think we're on the right track.
Thank you to Adrian Woodley <adrian@diskworld.com.au> for purchasing me one of these devices to bootstrap FreeBSD-HEAD on.
|
252689 |
04-Jul-2013 |
adrian |
Add the missing link back to the EEPROM firmware name.
|
252434 |
01-Jul-2013 |
kib |
Fix issues with zeroing and fetching the counters, on x86 and ppc64. Issues were noted by Bruce Evans and are present on all architectures.
On i386, a counter fetch should use atomic read of 64bit value, otherwise carry from the increment on other CPU could be lost for the given fetch, making error of 2^32. If 64bit read (cmpxchg8b) is not available on the machine, it cannot be SMP and it is enough to disable preemption around read to avoid the split read.
On x86 the counter increment is not atomic on purpose, which makes it possible for the store of the incremented result to override just zeroed per-cpu slot. The effect would be a counter going off by arbitrary value after zeroing. Perform the counter zeroing on the same processor which does the increments, making the operations mutually exclusive. On i386, same as for the fetching, if the cmpxchg8b is not available, machine is not SMP and we disable preemption for zeroing.
PowerPC64 is treated the same as amd64.
For other architectures, the changes made to allow the compilation to succeed, without fixing the issues with zeroing or fetching. It should be possible to handle them by using the 64bit loads and stores atomic WRT preemption (assuming the architectures also converted from using critical sections to proper asm). If architecture does not provide the facility, using global (spin) mutex would be non-optimal but working solution.
Noted by: bde Sponsored by: The FreeBSD Foundation
|
252243 |
26-Jun-2013 |
adrian |
Add the EEPROM start offset and size in so ath_ahb will use the supplied EEPROM data.
This needs to die in a fire and replaced with the firmware API to store the calibration data early ..
|
252242 |
26-Jun-2013 |
adrian |
Add in the vendor / device id so the ath_ahb glue works.
|
252241 |
26-Jun-2013 |
adrian |
Add the wireless support to the AR933x base kernel, as the support actually works now.
|
251781 |
15-Jun-2013 |
ed |
Make support for atomics on ARM complete.
Provide both __sync_*-style and __atomic_*-style functions that perform the atomic operations on ARMv5 by using Restartable Atomic Sequences.
While there, clean up some pieces of code where it's sufficient to use regular uint32_t to store register contents and don't need full reg_t's. Also sync this back to the MIPS code.
|
251703 |
13-Jun-2013 |
jeff |
- Add a BIT_FFS() macro and use it to replace cpusetffs_obj()
Discussed with: attilio Sponsored by: EMC / Isilon Storage Division
|
251696 |
13-Jun-2013 |
ed |
Bring the stdatomic for MIPS code slightly more in sync with the ARM version.
|
251559 |
08-Jun-2013 |
ed |
Merge the 1 and 2 byte versions of the atomic functions into one.
After pushing in my fix for the 2 byte functions, I realized that the functions for 1 and 2 byte operations had become identical. Reduce the code size by merging the functions for 1 and 2 byte operations together.
While there, slightly improve variable naming and comments.
|
251551 |
08-Jun-2013 |
adrian |
Add 8devices CARAMBOLA2 support.
This is based on the AR933x (Hornet) SoC from Qualcomm Atheros.
It's a much nicer board to do development on - 64MB RAM, 16MB flash. The development board breaks out the GPIO pins, ethernet, serial (via a USB<->RS232 chip), USB host and of course a small wifi antenna.
Everything but the wifi works thus far.
|
251539 |
08-Jun-2013 |
ed |
Actually make the 2-byte atomics work.
Even though I tested the 1-byte operations on arbitrarily aligned bytes, it seems I did not do this for the 2-byte operations.
Create easy to read functions that are used to get/put bytes and halfwords in words. To keep the compiler happy, explicitly read two bytes into a union to obtain a 16-bit value.
|
251524 |
08-Jun-2013 |
ed |
Add proper __sync_*() intrinsics for MIPS.
To make <stdatomic.h> work on MIPS (and ARM) using GCC, we need to provide implementations of the __sync_*() functions. I already added these functions for 4 and 8 byte types to libcompiler-rt some time ago, based on top of <machine/atomic.h>.
Unfortunately, <machine/atomic.h> only provides a subset of the features needed to implement <stdatomic.h>. This means that in some cases we had to do compare-and-exchange calls in loops, where a simple ll/sc would suffice.
Also implement these functions for 1 and 2 byte types. MIPS only provides ll/sc instructions for 4 and 8 byte types, but this is of course no limitation. We can simply load 4 bytes and use some bitmask tricks to modify only the bytes affected.
Discussed on: mips, arch Tested with: QEMU
|
251103 |
29-May-2013 |
marcel |
Don't assign the copyright to the FreeBSD foundation for the years this file is in FreeBSD. There's formality to this that hasn't happened and Juniper is perfectly fine with being the holder.
Discussed with: eadler, imp, jhb
|
250940 |
23-May-2013 |
marcel |
Change the copyright notice to a standard BSD 2-clause license and assign ownership to the FreeBSD foundation for the years this file has been in the FreeBSD repository.
This file was originally created by Juniper as part of upgrading to FreeBSD 4.10 (which had no MIPS support) and held functions found on other machines It grew actual functionality over time. The functionaliy was copied from other architectures and ported to MIPS on a as-needed basis.
Approved by: Mark Baushke (Juniper IP) Approved by: Megan Sugiyama (Juniper legal) Pointed out by: jmallett@ Requested by: core (jhb@)
|
250884 |
21-May-2013 |
attilio |
o Relax locking assertions for vm_page_find_least() o Relax locking assertions for pmap_enter_object() and add them also to architectures that currently don't have any o Introduce VM_OBJECT_LOCK_DOWNGRADE() which is basically a downgrade operation on the per-object rwlock o Use all the mechanisms above to make vm_map_pmap_enter() to work mostl of the times only with readlocks.
Sponsored by: EMC / Isilon storage division Reviewed by: alc
|
250576 |
12-May-2013 |
eadler |
Fix several typos
PR: kern/176054 Submitted by: Christoph Mallon <christoph.mallon@gmx.de> MFC after: 3 days
|
250544 |
12-May-2013 |
peter |
Tidy up some CVS workarounds.
|
250429 |
10-May-2013 |
imp |
Add commented out OCTEON_VENDOR_GEFES
|
250420 |
09-May-2013 |
bz |
MFp4 CH=227440:
Convert the structures to C99 style initialisation, which makes it a lot easier to check that all of them are set and to generate a derived template from them.
Sponsored by: DARPA, AFRL MFC after: 2 weeks
|
250419 |
09-May-2013 |
adrian |
Add some missing arge MDIO hints.
Submitted by: Luiz Otavio O Souza <loos.br@gmail.com>
|
250385 |
08-May-2013 |
adrian |
Modify the routerstation config to use ukswitch for now.
Until an ADM6996 driver shows up, this allows for the two switch ports to be used.
Submitted by: Luiz Otavio O Souza <loos.br@gmail.com> Reviewed by: ray
|
250338 |
07-May-2013 |
attilio |
Rename VM_NDOMAIN into MAXMEMDOM and move it into machine/param.h in order to match the MAXCPU concept. The change should also be useful for consolidation and consistency.
Sponsored by: EMC / Isilon storage division Obtained from: jeff Reviewed by: alc
|
250192 |
02-May-2013 |
imp |
Use cvmx_mgmt_port_num_ports() instead of the inlined copy of a previous version of this function.
|
250165 |
02-May-2013 |
adrian |
Add the AR933x SoC GPIO pin count limitation.
|
250138 |
01-May-2013 |
imp |
Don't include asm.h in non-asm files. Remove #define to get kludges that asm.h used to define Move clever macros to access assembler instructions to trap.c Remove __ASSEMBLER__ ifdefs in regdef.h: they aren't needed anymore.
|
250137 |
01-May-2013 |
imp |
Remove asm.h dependency in a hackish way. Fixed comment.
|
250136 |
01-May-2013 |
imp |
Import NetBSD's version, which is perfectly fine.
Submitted by: jmallet@
|
250135 |
01-May-2013 |
imp |
Add the standard #ifdef header protection.
|
250134 |
01-May-2013 |
imp |
Import virgin regdef.h from 4.4 Lite 2's sys/pmax/include/regdef.h, expand the %sccs.include.redist.c% directive with the standard 3-clause license, and add $FreeBSD$ to keep the commit script happy.
# This may break some mips stuff, which will be fixed in the next commit.
|
249919 |
26-Apr-2013 |
imp |
Octeon 2 (6xxx) and newer CPUs don't use the clock CPU speed for its I/O clock. Thankfully, the simple executive provies a way to querry the proper clock that works on all models. Move to asking for the SCLK via this interface.
This gets the serial console working after we start init and open the console and set the divisor (which turned the output from good to bad). I can login on the console now.
|
249902 |
25-Apr-2013 |
imp |
Minor whitespace nit
|
249901 |
25-Apr-2013 |
imp |
Use the offsets from pcb.h rather than regnum.h to store the registers in the pcb. setjmp/longjmp in the kernel also used these values, so continue to use them although their use isn't technically the pcb register array (matching is all that's important for setjmp/longjmp in the kernel). Finally, eliminate the old register names from regnum.h.
This is a lexical change only. The non-debug .o files have the same md5.
|
249882 |
25-Apr-2013 |
imp |
Make it possible to include this file in assembler .S sources.
|
249881 |
25-Apr-2013 |
imp |
Use the defines from pcb.h over the ones from regnum.h for this 'C' code. In theory, the ones from regnum.h should be used only for assembler code.
|
249847 |
24-Apr-2013 |
imp |
Fix N32/N64 ABIs to use proper registers after recent changes.
Pointy Hat to: imp
|
249790 |
23-Apr-2013 |
imp |
Update trapframe to be consistent with the changes made to regnum.h. This should fix the booting problems people have been seeing.
|
249776 |
22-Apr-2013 |
brooks |
MFP4 223084, 227821:
Partially implement generic_bs_*_8() for MIPS platforms.
This is known to work with TARGET_ARCH=mips64 with FreeBSD/BERI. Assuming that other definitions in cpufunc.h are correct it will work on non-o64 ABI systems except sibyte. On sibyte and o32 systems generic_bs_*_8() will remain panic() implementations.
Sponsored by: DARPA, AFRL Reviewed by: imp, jmallett (older versions)
|
249589 |
17-Apr-2013 |
adrian |
Add the static kernel boot environment, needed to actually boot this thing.
(Wasting 4k just as a temporary placeholder for a boot environment seems a bit ridiculous, but hey.)
Tested: gxemul:
$ gxemul -e malta -d i:/home/adrian/work/freebsd/svn/mfsroot-rspro.img -C 4Kc /tftpboot/kernel.MALTA
|
249551 |
16-Apr-2013 |
imp |
Point to regdef.h. May need to dig up references to the N32 standard that support this usage (which may be a bit rough, since different parts of the standard say mutually contradictory things).
|
249523 |
15-Apr-2013 |
imp |
Fix N32/N64 register saving by ensuring that all registers resolve to unique values.
There's some confusion about what the n32 assembler API really is (since on page 9 of the spec they say that t0-t3 don't exist, then turn around on page 22 and say that t4-t7 don't exist), and this doesn't touch that.
NetBSD's version of this file follows the convention I used here, and is likely to be correct.
This should fix gdb/ptrace.
|
249449 |
13-Apr-2013 |
dim |
Fix undefined behaviour in several gpio_pin_setflags() routines (under sys/arm and sys/mips), squelching the clang 3.3 warnings about this.
Noticed by: tinderbox and many irate spectators Submitted by: Luiz Otavio O Souza <loos.br@gmail.com> PR: kern/177759 MFC after: 3 days
|
249415 |
12-Apr-2013 |
jchandra |
Move MIPS_MAX_TLB_ENTRIES definition from cpuregs.h to tlb.c
Having MIPS_MAX_TLB_ENTRIES defined to 128 is misleading, since it used to be 64 in older releases of MIPS architecture (where it could be read from Config1) and can be much more than 128 for the newer processors.
For now, move the definition to the only file using it (mips/mips/tlb.c) and define MIPS_MAX_TLB_ENTRIES depending on the MIPS cpu defined. Also add few checks so that we do not write beyond the end of the tlb_state array.
This fixes a kernel data corruption seen in Netlogic XLP, which was casued by tlb_save() writing beyond the end of tlb_state array when breaking into debugger.
|
249409 |
12-Apr-2013 |
jchandra |
Fix incorrect KASSERTs in xlpge
Fix for crash in Netlogic XLP network accelerator driver when invariants are enabled - use correct the condition for KASSERT.
|
249268 |
08-Apr-2013 |
glebius |
Merge from projects/counters: counter(9).
Introduce counter(9) API, that implements fast and raceless counters, provided (but not limited to) for gathering of statistical data.
See http://lists.freebsd.org/pipermail/freebsd-arch/2013-April/014204.html for more details.
In collaboration with: kib Reviewed by: luigi Tested by: ae, ray Sponsored by: Nginx, Inc.
|
249265 |
08-Apr-2013 |
glebius |
Merge from projects/counters:
Pad struct pcpu so that its size is denominator of PAGE_SIZE. This is done to reduce memory waste in UMA_PCPU_ZONE zones.
Sponsored by: Nginx, Inc.
|
249127 |
05-Apr-2013 |
adrian |
Add the basic GPIO pin mapping to the hints file.
Tested:
* AP121 board, tested USB/jumpstart LEDs
|
249126 |
05-Apr-2013 |
adrian |
Implement USB device reset and poweron.
Tested:
* Atheros AP131, AR9331 SoC
|
249125 |
05-Apr-2013 |
adrian |
Fix AR933x USB support - this needs the same controller initialisation as the AR7242.
Tested:
* Atheros AP121, AR9331 * ZyDas wifi device, and 64MB (yes, ew) USB flash storage
|
249124 |
05-Apr-2013 |
adrian |
Add AP121 ethernet / switch PHY support.
* arge0 is MII * arge1 is GMII * the MDIO bus is on arge1, not arge0 * the default switch config is to have ports 0-3 as the switch group, with port 4 being an external PHY dedicated to arge0 (ie, 'cpu' port.)
Whilst I'm here, remove unused bits and pieces from the config.
Tested:
* AP121, ping on both arge0 and arge1 * Tested switch port detection using etherswitchcfg
|
249123 |
05-Apr-2013 |
adrian |
Implement the AR933x ethernet support.
Obtained from: OpenWRT
|
249121 |
05-Apr-2013 |
adrian |
Now that interrupt driven uart IO is working, flip this back on.
|
249120 |
05-Apr-2013 |
adrian |
Implement the AR933x interrupt driven UART code.
* Enable RX and host interrupts during bus probe/attach * Disable all interrupts (+ host ISR) during bus detach * Enable TX DONE interrupt only when we start transmitting; clear it when we're done. * The RX/TX FIFO depth is still conjecture on my part. I'll fix this shortly. * The TX FIFO interrupt isn't an "empty" interrupt, it's an "almost empty" interrupt. Sigh. So.. * .. in ar933x_bus_transmit(), wait for the FIFO to drain before continuing.
I dislike having to wait for the FIFO to drain, alas.
Tested:
* Atheros AP121 board, AR9331 SoC.
TODO:
* RX/TX overflow, RX error, BREAK support, etc. * Figure out the true RX/TX FIFO depth.
|
249119 |
05-Apr-2013 |
adrian |
AR9330/AR9331 also needs to ACK the APB interrupt register, same as AR724x.
This fixes 'stuck interrupt' problems I was having when writing the uart interrupt code.
|
249118 |
05-Apr-2013 |
adrian |
* Add AR9330/AR9331 to the soc identifier enum; * Set it when probing the CPU type.
|
249117 |
05-Apr-2013 |
adrian |
Use geom_uncompress here; we need this to fit in a 4MB flash part.
|
249093 |
04-Apr-2013 |
adrian |
Implement AR933x polled IO uart bus code.
This implements the bus transmit/receive/sigchg/ipend methods with a polled interrupt handler (ipend) rather than enabling hardware interrupts.
The FIFO is faked at 16 bytes deep for now, just so the transmit IO side doesn't suck too bad (the callout frequency limits how quickly IO is flushed to the sender, rather than scheduling the callout more frequently whilst there's active TX. But I digress.)
Tested:
* Atheros AP121 (AR9330) reference board, booting to multi-user interactive mode.
|
249083 |
04-Apr-2013 |
mav |
Remove all legacy ATA code parts, not used since options ATA_CAM enabled in most kernels before FreeBSD 9.0. Remove such modules and respective kernel options: atadisk, ataraid, atapicd, atapifd, atapist, atapicam. Remove the atacontrol utility and some man pages. Remove useless now options ATA_CAM.
No objections: current@, stable@ MFC after: never
|
248965 |
01-Apr-2013 |
ian |
Fix low-level uart drivers that set their fifo sizes in the softc too late.
uart(4) allocates send and receiver buffers in attach() before it calls the low-level driver's attach routine. Many low-level drivers set the fifo sizes in their attach routine, which is too late. Other drivers set them in the probe() routine, so that they're available when uart(4) allocates buffers. This fixes the ones that were setting the values too late by moving the code to probe().
|
248927 |
30-Mar-2013 |
adrian |
AR933x CPU device improvements:
* Add baud rate and divisor programming code. See below for more information.
* Flesh out ar933x_init() to disable interrupts and program the initial console setup.
* Remove #if 0'ed code from ar933x_term().
* Explain what these functions do.
Now, the baud rate and divisor code comes from Linux, as a submission to the OpenWRT project and Linux kernel from Gabor Juhos <juhosg@openwrt.org>.
The original ticket for this code is https://dev.openwrt.org/ticket/12031 .
I've contacted Gabor and asked for his permission to also licence the patch in question (which covers this code) to BSD lience and he's agreed. Hence why I'm including it here in FreeBSD.
Tested:
* AP121 (AR9330)
|
248926 |
30-Mar-2013 |
adrian |
AR933x UART updates:
* Default clock is 25MHz; * Remove the UART register macro here - it's not needed as we don't need to "adjust" the register offset / spacing at all; * Remove unused fields in the softc.
Tested:
* AP121
|
248912 |
29-Mar-2013 |
adrian |
Disable this; it's a local option that I haven't yet committed to -HEAD.
|
248867 |
29-Mar-2013 |
adrian |
For the AR933x UART, the serial clock is not the AHB clock, it's the reference clock. So use that instead.
|
248866 |
29-Mar-2013 |
adrian |
* Fix clock register definitions * Add maximum clock register values
|
248865 |
29-Mar-2013 |
adrian |
Print out the platform reference frequency.
This is useful for AR933x platforms where that matters.
|
248853 |
28-Mar-2013 |
adrian |
Initial (unfinished!) AR933x support.
|
248844 |
28-Mar-2013 |
adrian |
Tie in the AR933x support into -HEAD.
|
248843 |
28-Mar-2013 |
adrian |
Bring over the initial, CPU-only UART support for the AR933x SoC.
This implements the kernel glue needed (getc, putc, rxready).
This isn't a 16550 UART, even if the datasheet overview claims so.
The Linux ar933x support was used as a reference, however the uart code is a reimplementation.
Attentive viewers will note that the uart code is based off of the ns8250 code and the UART bus code is a stubbed-out version of this. I'll be replacing it with non-stubbed versions soon, making this a fully featured driver.
Tested:
* AP121 reference board (AR933x), booting through the mountroot> prompt; then doing some basic interactive tests in ddb.
|
248809 |
28-Mar-2013 |
adrian |
Fix the AR933x platform device start/stop code.
This was ported from the AR724x code and I think that also doesn't quite work. I'll investigate that soon.
With this in place the system reset path works, so 'reset' from kdb actually resets the SoC.
Tested:
* AP121 test board
|
248782 |
27-Mar-2013 |
adrian |
Commit initial (unfinished!) support for the AR933x series of embedded CPUs.
The AR933x is a mips24k based SoC with an AR9380 series SoC on board, two gigabit ethernet interfaces and an internal 10/100mbit ethernet switch. There's also the normal interfaces (USB, ethernet, uart, GPIO.)
The downside? There's a non-ns8250 UART device.
With a very basic UART driver (not in this commit) the SoC is initialised and boots up. I'll commit the UART code soon and then link it into the general setup path.
This code is a re-implementation based from the Linux kernel / openwrt AR933x support.
TODO:
* UART (obviously) * All of the ethernet, USB and wifi SoC glue, including ethernet PLL programming.
|
248781 |
27-Mar-2013 |
adrian |
Add the reference clock for each supported chip.
Obtained from: Linux (openwrt)
|
248508 |
19-Mar-2013 |
kib |
Implement the concept of the unmapped VMIO buffers, i.e. buffers which do not map the b_pages pages into buffer_map KVA. The use of the unmapped buffers eliminate the need to perform TLB shootdown for mapping on the buffer creation and reuse, greatly reducing the amount of IPIs for shootdown on big-SMP machines and eliminating up to 25-30% of the system time on i/o intensive workloads.
The unmapped buffer should be explicitely requested by the GB_UNMAPPED flag by the consumer. For unmapped buffer, no KVA reservation is performed at all. The consumer might request unmapped buffer which does have a KVA reserve, to manually map it without recursing into buffer cache and blocking, with the GB_KVAALLOC flag.
When the mapped buffer is requested and unmapped buffer already exists, the cache performs an upgrade, possibly reusing the KVA reservation.
Unmapped buffer is translated into unmapped bio in g_vfs_strategy(). Unmapped bio carry a pointer to the vm_page_t array, offset and length instead of the data pointer. The provider which processes the bio should explicitely specify a readiness to accept unmapped bio, otherwise g_down geom thread performs the transient upgrade of the bio request by mapping the pages into the new bio_transient_map KVA submap.
The bio_transient_map submap claims up to 10% of the buffer map, and the total buffer_map + bio_transient_map KVA usage stays the same. Still, it could be manually tuned by kern.bio_transient_maxcnt tunable, in the units of the transient mappings. Eventually, the bio_transient_map could be removed after all geom classes and drivers can accept unmapped i/o requests.
Unmapped support can be turned off by the vfs.unmapped_buf_allowed tunable, disabling which makes the buffer (or cluster) creation requests to ignore GB_UNMAPPED and GB_KVAALLOC flags. Unmapped buffers are only enabled by default on the architectures where pmap_copy_page() was implemented and tested.
In the rework, filesystem metadata is not the subject to maxbufspace limit anymore. Since the metadata buffers are always mapped, the buffers still have to fit into the buffer map, which provides a reasonable (but practically unreachable) upper bound on it. The non-metadata buffer allocations, both mapped and unmapped, is accounted against maxbufspace, as before. Effectively, this means that the maxbufspace is forced on mapped and unmapped buffers separately. The pre-patch bufspace limiting code did not worked, because buffer_map fragmentation does not allow the limit to be reached.
By Jeff Roberson request, the getnewbuf() function was split into smaller single-purpose functions.
Sponsored by: The FreeBSD Foundation Discussed with: jeff (previous version) Tested by: pho, scottl (previous version), jhb, bf MFC after: 2 weeks
|
248280 |
14-Mar-2013 |
kib |
Add pmap function pmap_copy_pages(), which copies the content of the pages around, taking array of vm_page_t both for source and destination. Starting offsets and total transfer size are specified.
The function implements optimal algorithm for copying using the platform-specific optimizations. For instance, on the architectures were the direct map is available, no transient mappings are created, for i386 the per-cpu ephemeral page frame is used. The code was typically borrowed from the pmap_copy_page() for the same architecture.
Only i386/amd64, powerpc aim and arm/arm-v6 implementations were tested at the time of commit. High-level code, not committed yet to the tree, ensures that the use of the function is only allowed after explicit enablement.
For sparc64, the existing code has known issues and a stab is added instead, to allow the kernel linking.
Sponsored by: The FreeBSD Foundation Tested by: pho (i386, amd64), scottl (amd64), ian (arm and arm-v6) MFC after: 2 weeks
|
248084 |
09-Mar-2013 |
attilio |
Switch the vm_object mutex to be a rwlock. This will enable in the future further optimizations where the vm_object lock will be held in read mode most of the time the page cache resident pool of pages are accessed for reading purposes.
The change is mostly mechanical but few notes are reported: * The KPI changes as follow: - VM_OBJECT_LOCK() -> VM_OBJECT_WLOCK() - VM_OBJECT_TRYLOCK() -> VM_OBJECT_TRYWLOCK() - VM_OBJECT_UNLOCK() -> VM_OBJECT_WUNLOCK() - VM_OBJECT_LOCK_ASSERT(MA_OWNED) -> VM_OBJECT_ASSERT_WLOCKED() (in order to avoid visibility of implementation details) - The read-mode operations are added: VM_OBJECT_RLOCK(), VM_OBJECT_TRYRLOCK(), VM_OBJECT_RUNLOCK(), VM_OBJECT_ASSERT_RLOCKED(), VM_OBJECT_ASSERT_LOCKED() * The vm/vm_pager.h namespace pollution avoidance (forcing requiring sys/mutex.h in consumers directly to cater its inlining functions using VM_OBJECT_LOCK()) imposes that all the vm/vm_pager.h consumers now must include also sys/rwlock.h. * zfs requires a quite convoluted fix to include FreeBSD rwlocks into the compat layer because the name clash between FreeBSD and solaris versions must be avoided. At this purpose zfs redefines the vm_object locking functions directly, isolating the FreeBSD components in specific compat stubs.
The KPI results heavilly broken by this commit. Thirdy part ports must be updated accordingly (I can think off-hand of VirtualBox, for example).
Sponsored by: EMC / Isilon storage division Reviewed by: jeff Reviewed by: pjd (ZFS specific review) Discussed with: alc Tested by: pho
|
247463 |
28-Feb-2013 |
mav |
MFcalloutng: Switch eventtimers(9) from using struct bintime to sbintime_t. Even before this not a single driver really supported full dynamic range of struct bintime even in theory, not speaking about practical inexpediency. This change legitimates the status quo and cleans up the code.
|
247297 |
26-Feb-2013 |
attilio |
Merge from vmobj-rwlock branch: Remove unused inclusion of vm/vm_pager.h and vm/vnode_pager.h.
Sponsored by: EMC / Isilon storage division Tested by: pho Reviewed by: alc
|
246713 |
12-Feb-2013 |
kib |
Reform the busdma API so that new types may be added without modifying every architecture's busdma_machdep.c. It is done by unifying the bus_dmamap_load_buffer() routines so that they may be called from MI code. The MD busdma is then given a chance to do any final processing in the complete() callback.
The cam changes unify the bus_dmamap_load* handling in cam drivers.
The arm and mips implementations are updated to track virtual addresses for sync(). Previously this was done in a type specific way. Now it is done in a generic way by recording the list of virtuals in the map.
Submitted by: jeff (sponsored by EMC/Isilon) Reviewed by: kan (previous version), scottl, mjacob (isp(4), no objections for target mode changes) Discussed with: ian (arm changes) Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris), amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)
|
245952 |
26-Jan-2013 |
pfg |
Clean some 'svn:executable' properties in the tree.
Submitted by: Christoph Mallon MFC after: 3 days
|
245884 |
24-Jan-2013 |
jchandra |
Little-endian and other fixes for Broadcom XLP network driver
The changes are: - the microcore code loaded into the NAE has to be byteswapped in LE - the descriptors in memory for a P2P NAE descriptor has to be byteswapped in LE - the m_data pointer is already cacheline aligned, so the unnecessary m_adj to cacheline size can be removed - fix mask used to obtain physical address from the Tx freeback descriptor - fix a compile error in code under #ifdef
Obtained from: Venkatesh J V <venkatesh.vivekanandan@broadcom.com>
|
245883 |
24-Jan-2013 |
jchandra |
Fix credit configuration on Broadcom XLP CMS
The CMS output queue credit configuration register is 64 bit, so use a 64 bit variable while updating it. Obtained from: Venkatesh J V <venkatesh.vivekanandan@broadcom.com>
|
245881 |
24-Jan-2013 |
jchandra |
Broadcom XLP network driver update for XLP 8xx B1 rev
Update MDIO reset code to support Broadcom XLP B1 revisions. Update nlm_xlpge_ioctl, nlm_xlpge_port_enable need not be called after nlm_xlpge_init.
Obtained from: Venkatesh J V <venkatesh.vivekanandan@broadcom.com>
|
245880 |
24-Jan-2013 |
jchandra |
Minor updates to the Broadcom XLP NAE driver
Remove unnecessary SGMII initialization code from nae.c. While there clean up some prints and whitespace.
|
245879 |
24-Jan-2013 |
jchandra |
Broadcom XLP updates for the new firmware
Support few more versions of board firmware. In case the security block is disabled, enable it at boot. Also increase the excluded memory region to cover the area used by the firmware to initialize devices.
|
245877 |
24-Jan-2013 |
jchandra |
Little-endian fix for PCI on Broadcom XLP.
Update the function xlp_pcib_hardware_swap_enable() to do nothing when BYTE_ORDER is not BIG_ENDIAN. PCIe hardware swap is not requred in little-endian mode as the endianness matches that of CPU.
|
245373 |
13-Jan-2013 |
rwatson |
Partially merge Perforce changeset 219938 to head:
Write FDT attachment for the Terasic MTL (multitouch LCD) driver. Exploit the fact that FDT allows multiple memory ranges to be assigned to a device, giving us a cleaner description than device.hints does.
Portions of this changeset that remove mtl from BERI device.hints and add to DTS will be merged separately.
Sponsored by: DARPA, AFRL
|
245367 |
13-Jan-2013 |
rwatson |
Merge Perforce changeset 219922 to head:
Update nexus parts in copied DE4LED attachment to use FDT.
Sponsored by: DARPA, AFRL
|
245365 |
13-Jan-2013 |
rwatson |
Merge Perforce changeset 219918 to head:
Naive first cut at an FDT bus attachment for the Altera JTAG UART.
Sponsored by: DARPA, AFRL
|
245337 |
12-Jan-2013 |
alc |
Define VM_KMEM_SIZE_MAX as a fraction of the kernel address space size rather than a constant so that VM_KMEM_SIZE_MAX will scale automatically with the kernel address space size. This is particularly important for MIPS because the same definition is used by both 32- and 64-bit kernels.
Tested by: jchandra
|
245332 |
12-Jan-2013 |
rwatson |
Merge Perforce changeset 219925 to head:
Provided a bus_space implementation for FDT, modelled on bus_space_generic, but with a local version of the map address routine that does a P->V translation, as is the case with NLM's similar routine for XLP. It's not clear to me that this is the right solution -- possibly this belongs in simplebus -- however, it is sufficient to get the DE4 LED driver working.
Sponsored by: DARPA, AFRL
|
245331 |
12-Jan-2013 |
rwatson |
Merge Perforce chance 219924 to head:
In a sign of weakness, replicate the MIPS bus_space_generic.c to produce a new FDT version, which will perform necessary address space translation for bus_space -- the solution used in NLM's MIPS FDT support, but possibly not quite the right thing. This is inconsistent with regular I/O via the nexus and the generic bus_space, which instead perform translation via pmap_mapdev() when a resource is activated. However, it will work while I attempt to identify what the right way to reconcile possible approaches.
(Another approach might be to make simplebus use Nexus's activate routine instead of a generic one?)
Sponsored by: DARPA, AFRL
|
245330 |
12-Jan-2013 |
rwatson |
Merge Perforce change @219948 to head:
Add code so that the BERI boot process can ask the kernel linker for DTB blobs that may have been left for it by the boot loader, as done on PowerPC and ARM. This will require both a more mature boot loader, and more mature boot loader argument passing mechanism, than currently supported on BERI.
Sponsored by: DARPA, AFRL
|
245329 |
12-Jan-2013 |
rwatson |
Merge Perforce change @219935 to head:
Initialise Openfirmware/FDT code earlier in the FreeBSD/beri boot, so that the results will be available for configuring the console UART (eventually).
Suggested by: thompsa
Sponsored by: DARPA, AFRL
|
245112 |
06-Jan-2013 |
monthadar |
Mips Atheros AR71XX: make PCI base slot configurable through hints.
* Mikrotik RouterBoard 433AH have PCI slot 18 wired to INT0 on the PCI Bus. This is different from e.g. Atheros PB42 and Ubiquiti boards. * Check for hint hint.pcib.0.baseslot=X, where X is number of base slot; * If hint not supplied print a warning and use default AR71XX_PCI_BASE_SLOT;
PR: kern/174978 Approved by: adrian (mentor)
|
244984 |
02-Jan-2013 |
jmallett |
Add basic support for the Ubiquiti EdgeRouter Lite.
Note that USB does not currently work, and the flash is connected via USB, so local storage is not working.
|
244942 |
01-Jan-2013 |
rwatson |
Merge @219932 from Perforce:
FDT headers can't be included if the kernel is compiled without FDT support, due to dependence on generated kobj headers. BERI supports both FDT and non-FDT kernels.
Spotted by: bz
|
244899 |
31-Dec-2012 |
rwatson |
If FDT is compiled into a FreeBSD/beri kernel, initialise OpenFirmware.
Sponsored by: DARPA, AFRL
|
244417 |
19-Dec-2012 |
alc |
Eliminate some definitions that haven't been used in a decade or more.
|
243882 |
05-Dec-2012 |
glebius |
Mechanically substitute flags from historic mbuf allocator with malloc(9) flags within sys.
Exceptions:
- sys/contrib not touched - sys/mbuf.h edited manually
|
243470 |
24-Nov-2012 |
jmallett |
Use bootverbose to control debug printfs from the Cavium Simple Executive code. Also remove an unnecessary CVMX_ENABLE_DEBUG_PRINTS conditional around what is already a cvmx_dprintf.
|
243469 |
24-Nov-2012 |
jmallett |
o) Add support for specifying a model of Octeon to target at compile-time, reducing the number of runtime checks done by the SDK code. o) Group board/CPU information at early startup by subject matter, so that e.g. CPU information is adjacent to CPU information and board information is adjacent to board information.
|
243264 |
19-Nov-2012 |
jmallett |
Prevent hang on ATCA-7220 when transmitting packets < 60 bytes.
|
243263 |
19-Nov-2012 |
jmallett |
Remove redundant printf of SDK version which already appears earlier in boot.
|
243255 |
19-Nov-2012 |
jmallett |
Add basic support for the Radisys-specific PCI console mechanism found on the Radisys ATCA-7220.
|
243253 |
19-Nov-2012 |
jmallett |
o) Do boot descriptor parsing before console setup so that we can use a console other than UART 0 from the outset. o) Print board information from sysinfo after consoles have been initialized rather than doing it during boot descriptor parsing. o) Use cvmx_safe_printf and platform_reset rather than panic when doing very early boot descriptor parsing before the console is set up. o) Get rid of the global octeon_bootinfo.
|
243203 |
17-Nov-2012 |
jmallett |
Remove one wholly-unused and buggy routine and some nearby alternative symbols.
While here, also correct a comment that seems to imply that this file is NetBSD's all-singing, all-dancing locore.S, rather than our conservative set of assembly support routines.
|
243180 |
17-Nov-2012 |
adrian |
Ensure hwpmc support is correctly included.
|
243179 |
17-Nov-2012 |
adrian |
Make MIPS24k PMC optional on "hwpmc_mips24k."
Requested by: juli
|
243177 |
17-Nov-2012 |
adrian |
Migrate the AR71xx UART (an 8250 derivative) to hide behind uart_ar71xx.
The AR9330/AR9331 UART is a totally different thing, so having it included with 'uart' is not going to work out.
|
243040 |
14-Nov-2012 |
kib |
Flip the semantic of M_NOWAIT to only require the allocation to not sleep, and perform the page allocations with VM_ALLOC_SYSTEM class. Previously, the allocation was also allowed to completely drain the reserve of the free pages, being translated to VM_ALLOC_INTERRUPT request class for vm_page_alloc() and similar functions.
Allow the caller of malloc* to request the 'deep drain' semantic by providing M_USE_RESERVE flag, now translated to VM_ALLOC_INTERRUPT class. Previously, it resulted in less aggressive VM_ALLOC_SYSTEM allocation class.
Centralize the translation of the M_* malloc(9) flags in the single inline function malloc2vm_flags().
Discussion started by: "Sears, Steven" <Steven.Sears@netapp.com> Reviewed by: alc, mdf (previous version) Tested by: pho (previous version) MFC after: 2 weeks
|
243030 |
14-Nov-2012 |
alc |
The function pmap_alloc_direct_page() unconditionally zeroes the returned page. Therefore, it is really inappropriate for use by the function uma_small_alloc(). The effect of using it was that every page was zeroed at least once and possibly twice if M_ZERO was passed as a "wait" flag.
|
242955 |
13-Nov-2012 |
jmallett |
Add preliminary Octeon PCI console support. Radisys-specific PCI console support may follow soon (it uses a proprietary memory layout, but operation looks pretty trivial.)
|
242953 |
13-Nov-2012 |
jmallett |
Add some useful options to consider.
|
242724 |
07-Nov-2012 |
adrian |
Update AP96 to directly attach an arswitch.
|
242718 |
07-Nov-2012 |
ray |
Hint miibus to attach arswitch on AP91, AP93 and RSPRO boards.
Submitted by: Luiz Otavio O Souza Approved by: adrian (menthor)
|
242534 |
03-Nov-2012 |
attilio |
Rework the known rwlock to benefit about staying on their own cache line in order to avoid manual frobbing but using struct rwlock_padalign.
Reviewed by: alc, jimharris
|
242466 |
02-Nov-2012 |
adrian |
Drop this from 500 to 128, to save a little space on memory constrained platforms.
|
242465 |
02-Nov-2012 |
adrian |
Free the dma map -after- it's checked, not before. Or you'll be potentially referencing already-freed memory.
|
242454 |
01-Nov-2012 |
jmallett |
Don't disable PCIe just because the host is not a PCI host; the latter flag only applies to non-PCIe systems. If PCIe is in target mode, it will simply and gracefully fail to attach of its own accord.
|
242390 |
31-Oct-2012 |
jmallett |
Fix longstanding misprint.
|
242389 |
31-Oct-2012 |
jmallett |
If the CF physical base is 0, attach no CF devices. This fixes a warning about a 0 passed to cvmx_phys_to_ptr on systems without a CF interface, such as the RSYS4GBE.
|
242346 |
30-Oct-2012 |
jmallett |
Actually check board type rather than using a specialized octeon_is_simulation function.
|
242345 |
30-Oct-2012 |
jmallett |
Remove oct_read64 and oct_write64 and use their equivalents from the Simple Executive, which are used everywhere else in the Octeon port. While here, remove other unused things from octeon_pcmap_regs.h.
|
242344 |
30-Oct-2012 |
jmallett |
Remove stale declarations.
|
242342 |
30-Oct-2012 |
jmallett |
Speed feature tests and initialize helper configuration that some CPUs require.
|
242302 |
29-Oct-2012 |
jmallett |
Add a sysctl to change the LED display.
|
242276 |
29-Oct-2012 |
jmallett |
Wrap some long lines and display board serial numbers at boot.
|
242273 |
29-Oct-2012 |
jmallett |
Use Simple Executive LED display routines, which correctly use the LED base address passed from the bootloader, rather than using a hard-coded value.
Make FreeBSD announce itself on the LED display similar to other kernels.
Remove uses of the previous LED routines, which were under-used and only used in drivers for what seem like debugging purposes, despite those drivers being widely-tested.
Remove several inlines for accessing memory that duplicate other functions which are now used instead, as they are now entirely unused.
|
242201 |
27-Oct-2012 |
jmallett |
Add missing return that broke 8-bit CF support in refactoring in r222671. Tested on a Cavium CN5860-EVB-NIC4. This was broken for over a year.
|
242193 |
27-Oct-2012 |
alc |
Eliminate a redundant TLB invalidation from pmap_pv_reclaim().
|
242104 |
26-Oct-2012 |
jmallett |
Add support for Radisys as a vendor of Octeon hardware. Add some preliminary support for what their boot loader refers to as the "RSYS4GBE", of which there are two instances ("Data Processing Blocks") on the Radisys ATCA-7220.
|
242103 |
26-Oct-2012 |
jmallett |
Don't attach if the bootloader has not indicated that we're a PCI host. This fixes booting on systems which are PCI targets.
|
241970 |
23-Oct-2012 |
thompsa |
Fix spelling of NFSCL option.
|
241964 |
23-Oct-2012 |
imp |
Turns out the nvram env was common, so move it back up to get PB92 working.
|
241942 |
23-Oct-2012 |
imp |
Add RT305x specific devices here.
|
241892 |
22-Oct-2012 |
andre |
Remove ZERO_COPY_SOCKETS from kernel configuration as the current COW based approach is not safe and should not be used in production.
|
241844 |
22-Oct-2012 |
eadler |
remove duplicate semicolons where possible.
Approved by: cperciva MFC after: 1 week
|
241636 |
17-Oct-2012 |
attilio |
Disconnect non-MPSAFE NTFS from the build in preparation for dropping GIANT from VFS. This code is particulary broken and fragile and other in-kernel implementations around, found in other operating systems, don't really seem clean and solid enough to be imported at all. If someone wants to reconsider in-kernel NTFS implementation for inclusion again, a fair effort for completely fixing and cleaning it up is expected.
In the while NTFS regular users can use FUSE interface and ntfs-3g port to work with their NTFS partitions.
This is not targeted for MFC.
|
241520 |
14-Oct-2012 |
alc |
Correct an error in pmap_pv_reclaim(). It can legitimately encounter wired mappings. If it does, it should just skip them.
|
241374 |
09-Oct-2012 |
attilio |
Add an unified macro to deny ability from the compiler to reorder instruction loads/stores at its will. The macro __compiler_membar() is currently supported for both gcc and clang, but kernel compilation will fail otherwise.
Reviewed by: bde, kib Discussed with: dim, theraven MFC after: 2 weeks
|
241313 |
07-Oct-2012 |
alc |
Optimize the TLB invalidations performed by pmap_protect(). Use the new range-based invalidation function instead of performing per-page invalidations. Don't bother invalidating mappings that don't have PTE_D set, since they don't allow write access.
|
241287 |
06-Oct-2012 |
alc |
In general pmap implementations do not set the wired attribute on the temporary mappings that are used to implement operations like pmap_zero_page(). There is no reason for the MIPS pmap to deviate from that practice.
|
241276 |
06-Oct-2012 |
alc |
Correct two pessimizations in pmap_extract_and_hold(). Test the PTE for having PTE_RO set instead of PTE_D. This avoids some unnecessary failures by pmap_extract_and_hold() that will have to be handled by a call to vm_fault_hold(). Testing the PTE for both being non-zero and having PTE_V set is redundant. The latter suffices.
|
241217 |
05-Oct-2012 |
alc |
Eliminate a stale and a duplicated comment.
|
241156 |
03-Oct-2012 |
alc |
Reimplement pmap_qremove() using the new TLB invalidation function for efficiently invalidating address ranges.
|
241123 |
02-Oct-2012 |
alc |
Introduce a new TLB invalidation function for efficiently invalidating address ranges, and use this function in pmap_remove().
Tested by: jchandra
|
241082 |
01-Oct-2012 |
hselasky |
Inherit USB mode from RootHUB port where the USB device is connected. Only RootHUB ports can be dual mode. Disallow OTG ports on external HUBs. This simplifies some checks in the USB controller drivers.
MFC after: 1 week
|
241020 |
28-Sep-2012 |
alc |
Eliminate a stale comment. It describes another use case for the pmap in Mach that doesn't exist in FreeBSD.
|
240539 |
15-Sep-2012 |
ed |
Prefer __containerof() above member2struct().
The first does proper checking of the argument types, while the latter does not.
|
240317 |
10-Sep-2012 |
alc |
Simplify pmap_unmapdev(). Since kmem_free() eventually calls pmap_remove(), pmap_unmapdev()'s own direct efforts to destroy the page table entries are redundant, so eliminate them.
Don't set PTE_W on the page table entry in pmap_kenter{,_attr}() on MIPS. Setting PTE_W on MIPS is inconsistent with the implementation of this function on other architectures. Moreover, PTE_W should not be set, unless the pmap's wired mapping count is incremented, which pmap_kenter{,_attr}() doesn't do.
MFC after: 10 days
|
240244 |
08-Sep-2012 |
attilio |
userret() already checks for td_locks when INVARIANTS is enabled, so there is no need to check if Giant is acquired after it.
Reviewed by: kib MFC after: 1 week
|
240241 |
08-Sep-2012 |
alc |
pmap_remove:
Avoid re-walking the page table from the root for every PTE examined.
Tidy up some of pmap_remove()'s helper functions.
pmap_enter:
Set PV_TABLE_REF whenever the physical page being mapped is managed, not just when it is writeable.
Only call pmap_update_page() when the old mapping was valid. If there was no prior valid mapping, then pmap_update_page() serves no useful purpose. However, it will interrupt every processor that has the pmap active.
pmap_enter_quick_locked:
Always set PTE_RO.
pmap_emulate_modified:
Don't set PV_TABLE_REF.
Eliminate a nonsensical comment.
|
240185 |
07-Sep-2012 |
alc |
Eliminate unnecessary NULL checks.
|
240177 |
06-Sep-2012 |
jhb |
Dynamically allocate the S/G lists passed to callback routines rather than allocating them on the stack of various bus_dmamap_load*() functions. The S/G lists are stored in the DMA tags. This matches the implementation on all other platforms.
Discussed with: scottl, gibbs Tested by: stas (arm@)
|
240139 |
05-Sep-2012 |
brooks |
Don't hardcode paths to MFS_IMAGE in the kernel config. When they don't exist they don't cause "make tinderbox" to fail.
Reported by: jhb
|
240126 |
05-Sep-2012 |
alc |
Rename {_,}pmap_unwire_pte_hold() to {_,}pmap_unwire_ptp() and update the comment describing them. Both the function names and the comment had grown stale. Quite some time has passed since these pmap implementations last used the page's hold count to track the number of valid mapping within a page table page. Also, returning TRUE from pmap_unwire_ptp() rather than _pmap_unwire_ptp() eliminates a few instructions from callers like pmap_enter_quick_locked() where pmap_unwire_ptp()'s return value is used directly by a conditional statement.
|
240000 |
02-Sep-2012 |
alc |
Calculate the new PTE value in pmap_enter() before acquiring any locks.
Move an assertion to the beginning of pmap_enter().
|
239964 |
01-Sep-2012 |
alc |
Introduce a new software PTE flag that indicates whether the mapping is for a managed page.
Tested by: jchandra
|
239911 |
30-Aug-2012 |
adrian |
The DIR-825 cal data is in an odd spot. I don't know why it's here.
(This works on my board because I wrote new caldata into this spot; but this obviously won't work for stock DIR-825 units out there.)
|
239888 |
29-Aug-2012 |
adrian |
More attempts at space saving.
* add cam as a module to build - but build in scbus/da for now, as "cam" as a module includes all cam devices. Hardly space saving. * Don't build FFS snapshot support.
|
239799 |
29-Aug-2012 |
adrian |
Bring over a configuration for the Atheros AP91 reference board.
This has an AR7240 SoC with an AR9285 wireless NIC on-board.
Since the kernel partition on the 4MiB flash is 960KiB, quite a bit is disabled to try and squeeze the build into that. Even lzma'ed, it's still quite large.
|
239795 |
28-Aug-2012 |
adrian |
* Don't compile in sysctl descriptions * random is fine as a module
|
239768 |
28-Aug-2012 |
adrian |
oops, make cfg read-write.
|
239765 |
28-Aug-2012 |
adrian |
This is an initial board configuration for the D-Link DIR-825 dual-band 802.11n router.
The flash layout defaults to a 1 MiB section for the kernel so I'm trying very hard to squeeze a minimialistic (LZMA compressde) kernel image into that.
I've verified that it boots through to single user mode fine.
Issues:
* USB doesn't yet work as a module - I need to add something else to the USB AR71xx build before that will work. * There's no switch PHY support - but for now it quite happily behaves as a useful dumb switch out of the box. Phew. * Since a previous flash attempt trashed my radio configuration block, I haven't yet verified whether the wireless works correctly. I'll test that out shortly (read: once I re-calibrate the board somehow.)
Thanks to ray@ and the zrouter project for doing some of the initial hard work in figuring out how to bring this board up.
|
239759 |
27-Aug-2012 |
adrian |
Convert AP93 to use the new AR724X_BASE configuration file.
|
239758 |
27-Aug-2012 |
adrian |
Slim down the default AR724X build.
The AR724X boards tend to come with minimal RAM/flash.
|
239757 |
27-Aug-2012 |
adrian |
Convert to using ulzma.
|
239713 |
26-Aug-2012 |
rwatson |
Expose DE4 buttons and switches via a de4bsw device, implemented using altera_avgen(4).
Fix white space nit that must have arisen during the merge from Perforce.
Submitted by: brooks Sponsored by: DARPA, AFRL
|
239709 |
26-Aug-2012 |
rwatson |
Add terasic_de4led, a led(4) driver for the on-board 8-element LED on the Terasic DE-4 board. Allow LED configuration to be set using loader tunables, not just from userspace, and preconfigure LED 8 as a kernel heartbeat. For now, this is a Nexus-attached, BERI-only driver, but it could be used with other hard and soft cores on Altera FPGAs as well, in principle.
Sponsored by: DARPA, AFRL
|
239706 |
26-Aug-2012 |
adrian |
Ensure that BAR(0) is set for the PCI slot before the ath(4) PCI registers are written out.
This allows EEPROM-less NICs on the AR7241 PCIe bus to be correctly initialised.
Tested:
* AP91 (AR7240+AR9285) - the existing board support didn't break; * AP99 (AR7241+AR9287) - this fixed the configuration of the AR9287 PCI.
|
239705 |
26-Aug-2012 |
adrian |
Create a skeleton AR724x SoC board configuration for use by AR724x devices.
|
239691 |
25-Aug-2012 |
rwatson |
Add terasic_mtl(4), a device driver for the Terasic Multi-Touch LCD, used with Terasic's DE-4 and other similar FPGA boards. This display is 800x480 and includes a capacitive touch screen, multi-touch gesture recognition, etc. This device driver depends on a Cambridge- provided IP core that allows the MTL device to be hooked up to the Altera Avalon SoC bus, and also provides a VGA-like text frame buffer.
Although it is compiled as a single device driver, it actually implements a number of different device nodes exporting various aspects of this multi-function device to userspace:
- Simple memory-mapped driver for the MTL 24-bit pixel frame buffer. - Simple memory-mapped driver for the MTL control register set. - Simple memory-mapped driver for the MTL text frame buffer. - syscons attachment for the MTL text frame buffer.
This driver attaches directly to Nexus as is common for SoC device drivers, and for the time being is considered BERI-specific, although in principle it might be used with other hard and soft cores on Altera FPGAs.
Control registers, including touchscreen input, are simply memory mapped; in the future it would be desirable to hook up a more conventional device node that can stream events, support kqueue(2)/ poll(2)/select(2), etc.
This is the first use of syscons on MIPS, as far as I can tell, and there are some loose ends, such as an inability to use the hardware cursor. More fundamentally, it appears that syscons(4) assumes that either a host is PC-like (i386, amd64) *or* it must be using a graphical frame buffer. While the MTL supports a graphical frame buffer, using the text frame buffer is preferable for console use. Fixing this issue in syscons(4) requires non-trivial changes, as the text frame buffer support assumes that direct memory access can be done to the text frame buffer without using bus accessor methods, which is not the case on MIPS. As a workaround for this, we instead double-buffer and pretend to be a graphical frame buffer exposing text accessor methods, leading to some quirks in syscons behaviour.
Sponsored by: DARPA, AFRL
|
239685 |
25-Aug-2012 |
brooks |
Add isf(4), a driver for the Intel StrataFlash family of NOR flash parts.
The driver attempts to support all documented parts, but has only been tested with the 512Mbit part on the Terasic DE4 FPGA board. It should be trivial to adapt the driver's attach routine to other embedded boards using with any parts in the family.
Also import isfctl(8) which can be used to erase sections of the flash.
Sponsored by: DARPA, AFRL
|
239684 |
25-Aug-2012 |
rwatson |
Add MD syscons header file for MIPS.
Sponsored by: DARPA, AFRL
|
239683 |
25-Aug-2012 |
brooks |
Don't include syscons in the config just yet. We haven't imported the touchscreen driver yet.
|
239681 |
25-Aug-2012 |
alc |
Retire PV_TABLE_MOD. When we destroy or write protect a dirty mapping, we call vm_page_dirty(). Maintaining the PV_TABLE_MOD flag, in addition, serves no useful purpose.
|
239679 |
25-Aug-2012 |
rwatson |
Add reference kernel configurations for FreeBSD/beri in simulation, on the Terasic DE-4, and Terasic tPad Altera-based boards.
Sponsored by: DARPA, AFRL
|
239676 |
25-Aug-2012 |
rwatson |
Add altera_jtag_uart(4), a device driver for Altera's JTAG UART soft core, which presents a UART-like interface over the Avalon bus that can be addressed over JTAG. This IP core proves extremely useful, allowing us to connect trivially to the FreeBSD console over JTAG for FPGA-embedded hard and soft cores. As interrupts are optionally configured for this soft core, we support both interrupt-driven and polled modes of operation, which must be selected using device.hints. UART instances appear in /dev as ttyu0, ttyu1, etc.
However, it also contains a number of quirks, which make it difficult to tell when JTAG is connected, and some buffering issues. We work around these as best we can, using various heuristics.
While the majority of this device driver is not only not BERI-specific, but also not MIPS-specific, for now add its defines in the BERI files list, as the console-level parts are aware of where the first JTAG UART is mapped on Avalon, and contain MIPS-specific address translation, to use before Newbus and device.hints are available.
Sponsored by: DARPA, AFRL
|
239671 |
25-Aug-2012 |
rwatson |
Add preliminary support for the SRI International / University of Cambridge Bluespec Extensible RISC Implementation (BERI) processor. BERI is a 64-bit MIPS ISA soft CPU core that can be synthesised to Altera and Xilinx FPGAs, and is being used for CPU and OS research at several institutions.
Sponsored by: DARPA, AFRL
|
239670 |
25-Aug-2012 |
rwatson |
Provide basic glue to allow syscons to be used on MIPS, modelled on PowerPC support. This was clearly not something syscons was designed to do (very specific assumptions about the nature of VGA consoles on PCs), but fortunately others have long since blazed the way on making it work regardless of that.
Sponsored by: DARPA, AFRL
|
239669 |
25-Aug-2012 |
rwatson |
On MIPS, when printing page fault information for an unexpected exception type, explicitly print out "unknown" rather than the empty string, and include the exception type number for ease of debugging.
Sponsored by: DARPA, AFRL
|
239625 |
23-Aug-2012 |
ray |
Remove duplicated GEOM_PART_* options.
PR: 170931 Approved by: adrian
|
239487 |
21-Aug-2012 |
jchandra |
Add correct range parameter in XLP DTS
r239274 added support for ranges. Update XLP DTS to provide the correct range parameter for the XLP SoC bus. Also fix bus_space_map method for XLP bus space.
Submitted by: Sreekanth M. <sreekanth.molagavalli@broadcom.com>
|
239413 |
20-Aug-2012 |
jchandra |
Define and exclude DRAM regions used by hardware/bootloder on XLP
Fix xlp_mem_init() - remove the ad-hoc code for excluding memory regions and use an array of regions.
|
239361 |
17-Aug-2012 |
alc |
Eliminate another vestige of page coloring.
|
239352 |
17-Aug-2012 |
alc |
Fix two problems with pmap_clear_modify().
First, pmap_clear_modify() is write protecting all mappings to the specified page, not just clearing the modified bit. Specifically, it sets PTE_RO on the PTE, which is wrong. Moreover, it is calling vm_page_dirty(), which is not the expected behavior for pmap_clear_modify(). Generally speaking, the machine-independent VM layer masks these mistakes. For example, setting PTE_RO will result in additional soft faults, but not a catastrophe.
Second, pmap_clear_modify() may not clear the modified bits because it only iterates over the PV list when the page has the PV_TABLE_MOD flag set and elsewhere the pmap clears the PV_TABLE_MOD flag anytime a modified mapping is write protected or destroyed. However, the page may still have other mappings with the modified bit set.
Eliminate a stale comment.
|
239351 |
17-Aug-2012 |
rpaulo |
The GPIO drivers were initialising their mutexes with type of MTX_NETWORK_LOCK. This is wrong since these mutexes have nothing to do with networking.
|
239321 |
16-Aug-2012 |
alc |
Eliminate an unused parameter from init_pte_prot().
Eliminate stray whitespace within init_pte_prot().
Eliminate a gratuitous variable initialization from pmap_enter().
|
239317 |
15-Aug-2012 |
alc |
Replace all uses of the vm page queues lock by a r/w lock that is private to this pmap.
Tidy up the #include's.
Remove the (now) unused #define PMAP_SHPGPERPROC. (This should have been removed in r239236.)
Tested by: jchandra
|
239236 |
13-Aug-2012 |
alc |
Port the new PV entry allocator from amd64/i386. This allocator has two advantages. First, PV entries are roughly half the size. Second, this allocator doesn't access the paging queues, and thus it will allow for the removal of the page queues lock from this pmap.
Fix a rather serious bug in pmap_remove_write(). After removing write access from the specified page's first mapping, pmap_remove_write() then used the wrong "next" pointer. Consequently, the page's second, third, etc. mappings were not write protected.
Tested by: jchandra
|
239170 |
10-Aug-2012 |
alc |
Merge r134393 from amd64/i386: The machine-independent parts of the virtual memory system always pass a valid pmap to the pmap functions that require one. Remove the checks for NULL. (These checks have their origins in the Mach pmap.c that was integrated into BSD. None of the new code written specifically for FreeBSD included them.)
|
239152 |
09-Aug-2012 |
alc |
Merge r132141 and r111272 from amd64/i386: Reduce the size of a PV entry by eliminating pv_ptem. There is no need to store a pointer to the page table page in the PV entry because it is easily computed during the walk down the page table.
Eliminate the ptphint from the pmap. Long, long ago, page table pages belonged to a vm object, and we would look up page table pages based upon their offset within this vm object. In those days, this hint may have had tangible benefits.
Tested by: jchandra
|
239126 |
07-Aug-2012 |
imp |
Fix obvious problem with emulate_fp sysctl.
Submitted by: Paul Ambrose <ambrosehua@gmail.com>
|
238861 |
28-Jul-2012 |
rwatson |
Merge FreeBSD/beri Perforce change @211945 to head:
Modify MIPS page table entry (PTE) initialisation so that cachability bits are set only once, using is_cacheable_mem() to determine what caching properties are required, rather than also unconditionally setting PTE_C_CACHE in init_pte_prot(). As PTE_C_CACHE | PTE_C_UNCACHED == PTE_C_CACHE, this meant that all userspace memory mappings of device memory (incorrectly) used caching TLB entries.
This is arguably not quite what we want, even though it is (more) consistent with the MIPS pmap design: PTE caching properties should be derived from machine-independent page table attributes, but this is a substantially more complex change as the MIPS pmap doesn't yet know about page attributes, causing it to ignore requests by device drivers that want uncached userspace memory mappings as they describe memory-mapped FIFOs or shared memory with a device not participating in the cache coherence scheme.
This fixes cacheability issues (specifically, undesired and unrequested caching) seen in userspace memory mappings of Avalon SoC bus device memory on BERI MIPS.
Discussed with: jmallett, alc Sponsored by: DARPA, AFRL MFC after: 3 days
|
238561 |
18-Jul-2012 |
alc |
Move what remains of vm/vm_contig.c into vm/vm_pageout.c, where similar code resides. Rename vm_contig_grow_cache() to vm_pageout_grow_cache().
Reviewed by: kib
|
238293 |
09-Jul-2012 |
jchandra |
Support Netlogic XLP 8xx B1 revisions in xlpge.
Updates to the MDIO access code for the new revision of the XLP chip.
|
238290 |
09-Jul-2012 |
jchandra |
Identify Netlogic XLP 8xx B1 chip revisions
Add functions to check for 8xx B0 and 3xx Ax revisions which will be used in network block initialization.
|
238289 |
09-Jul-2012 |
jchandra |
Fix PCIe hardware swap configuration for Netlogic XLP
The last 12 bits of the limit registers have to be set to 1. These bits are not significant in bridge BARs and are 0 on read, but the bits are valid in the swap limit register and needs to be set.
|
237687 |
28-Jun-2012 |
imp |
octeon_uart_class was removed some time ago everywhere but here.
|
237566 |
25-Jun-2012 |
gonzo |
Handle case when result of pmap_pte is NULL. This issue was uncovered by r237367
|
237517 |
24-Jun-2012 |
andrew |
Make the wchar_t type machine dependent.
This is required for ARM EABI. Section 7.1.1 of the Procedure Call for the ARM Architecture (AAPCS) defines wchar_t as either an unsigned int or an unsigned short with the former preferred.
Because of this requirement we need to move the definition of __wchar_t to a machine dependent header. It also cleans up the macros defining the limits of wchar_t by defining __WCHAR_MIN and __WCHAR_MAX in the same machine dependent header then using them to define WCHAR_MIN and WCHAR_MAX respectively.
Discussed with: bde
|
237433 |
22-Jun-2012 |
kib |
Implement mechanism to export some kernel timekeeping data to usermode, using shared page. The structures and functions have vdso prefix, to indicate the intended location of the code in some future.
The versioned per-algorithm data is exported in the format of struct vdso_timehands, which mostly repeats the content of in-kernel struct timehands. Usermode reading of the structure can be lockless. Compatibility export for 32bit processes on 64bit host is also provided. Kernel also provides usermode with indication about currently used timecounter, so that libc can fall back to syscall if configured timecounter is unknown to usermode code.
The shared data updates are initiated both from the tc_windup(), where a fast task is queued to do the update, and from sysctl handlers which change timecounter. A manual override switch kern.timecounter.fast_gettime allows to turn off the mechanism.
Only x86 architectures export the real algorithm data, and there, only for tsc timecounter. HPET counters page could be exported as well, but I prefer to not further glue the kernel and libc ABI there until proper vdso-based solution is developed.
Minimal stubs neccessary for non-x86 architectures to still compile are provided.
Discussed with: bde Reviewed by: jhb Tested by: flo MFC after: 1 month
|
237430 |
22-Jun-2012 |
kib |
Reserve AT_TIMEKEEP auxv entry for providing usermode the pointer to timekeeping information.
MFC after: 1 week
|
237168 |
16-Jun-2012 |
alc |
The page flag PGA_WRITEABLE is set and cleared exclusively by the pmap layer, but it is read directly by the MI VM layer. This change introduces pmap_page_is_write_mapped() in order to completely encapsulate all direct access to PGA_WRITEABLE in the pmap layer.
Aesthetics aside, I am making this change because amd64 will likely begin using an alternative method to track write mappings, and having pmap_page_is_write_mapped() in place allows me to make such a change without further modification to the MI VM layer.
As an added bonus, tidy up some nearby comments concerning page flags.
Reviewed by: kib MFC after: 6 weeks
|
236966 |
12-Jun-2012 |
des |
auth.conf is dead.
|
235941 |
24-May-2012 |
bz |
MFp4 bz_ipv6_fast:
in_cksum.h required ip.h to be included for struct ip. To be able to use some general checksum functions like in_addword() in a non-IPv4 context, limit the (also exported to user space) IPv4 specific functions to the times, when the ip.h header is present and IPVERSION is defined (to 4).
We should consider more general checksum (updating) functions to also allow easier incremental checksum updates in the L3/4 stack and firewalls, as well as ponder further requirements by certain NIC drivers needing slightly different pseudo values in offloading cases. Thinking in terms of a better "library".
Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems
Reviewed by: gnn (as part of the whole) MFC After: 3 days
|
235898 |
24-May-2012 |
mav |
MFprojects/zfsd: Generalize and unify ses device description.
|
235661 |
19-May-2012 |
adrian |
Enable the AR8316 switch on the routerstation pro board.
The configuration is:
* RGMII, both ports * arge0 - connected to PHY4 as a dedicated port (CPU port) * arge1 - connected to the switch ports
I've verified this on my routerstation pro board.
|
235351 |
12-May-2012 |
adrian |
Remove duplicate config bits.
Submitted by: juli
|
235346 |
12-May-2012 |
adrian |
Revert this - I disabled it whilst hwpmc is/was broken.
|
235345 |
12-May-2012 |
adrian |
Flip on WN1043ND switch PHY support.
* Add the i2c bitbang bus; * Add the etherswitch/rtl8366rb drivers; * "fix" the USB GPIO configuration so USB actually works.
Submitted by: Stefan Bethke <stb@lassitu.de>
|
235324 |
12-May-2012 |
adrian |
Now that there's a hint for it, add a "I'm an AR7240 switch!" hint.
|
235320 |
12-May-2012 |
adrian |
Add in the AP93 configuration file.
The AP93 has:
* AR7240 - mips24k processor with integrated 10/100 switch and various other peripherals; * AR9283 - 2x2 2.4GHz 802.11n (with calibration data in flash); * 64MB RAM; * 16MB SPI flash.
The switch code detects as an AR8216 at the present moment, which isn't _entirely_ strictly true. However, the MII/MDIO routing in AP93.hints works - the arge0 MAC connects to PHY4 in the switch, but via the switch internal MDIO bus. The switch connects to arge0's MDIO bus, but only to export the switch registers.
Thanks to stb and ray for the switch work, and ray for helping determine what the correct switch hints should be for this thing.
|
235290 |
11-May-2012 |
adrian |
Add switch support to AP96.
|
235118 |
07-May-2012 |
jmallett |
Add basic SMP support for GXemul. Ideally we would have some way to override some of the IPI mechanisms used by the common MIPS SMP code so we could use the multicast IPI facilities, on GXemul as well as on several real hardware platforms, and the ability to have multiple hard IPI types.
|
235117 |
07-May-2012 |
jmallett |
Add a trivial driver for the GXemul Ethernet device. Probably quite buggy and certainly non-optimal, but enough for basic networking use.
Requested by: rwatson
|
235073 |
06-May-2012 |
jmallett |
Add a driver for the GXemul test machine's disk controller and disk devices. Prefer it to using an md device in the GXEMUL kernel configuration.
Requested by: rwatson, theraven
|
235070 |
06-May-2012 |
jmallett |
Get the memory size from the gxemul mp device. Don't dump the environment if it is not present.
|
234992 |
04-May-2012 |
adrian |
Disable setting the MII port speed.
This seems to break at least my test board here (AR71xx + AR8316 switch PHY). Since I do have a whole sleuth of "normal" PHY boards (with an AR71xx on a normal PHY port), I'll do some further testing with those to determine whether this is a general issue, or whether it's limited to the behaviour of the "fake" dedicated PHY port mode on these atheros switches.
|
234945 |
03-May-2012 |
adrian |
In the new world order, multiphy is now when the phymask is 0x0.
This makes the TP-WN1043ND (ar913x based) work again.
|
234941 |
03-May-2012 |
adrian |
Fix a totally bone-headed, last minute bounds check snafu that somehow I must've missed when booting a test kernel.
This has been validated on the AR7161.
|
234928 |
02-May-2012 |
bz |
Catch-up with r232853 and remove platform APIs which are not used by any code and which had only stub implementations or no implementation on all platforms. Makes gxemul compile.
Hinted by: rwatson MFC after: 3 weeks X-MFC by: rwatson:
|
234926 |
02-May-2012 |
rwatson |
mips/mips64eb became mips/mips64 while I wasn't looking (whoops), so update GXEMUL kernel config for the new world order.
Spotted by: bz MFC after: 3 weeks
|
234921 |
02-May-2012 |
rwatson |
Clean up various aspects of the MIPS generic busspace implementation:
1) Always implement missing bus space methods using a panic() stub rather than a NULL pointer. This appeared not to trip up any existing device drivers, but due to the nature of the devices I'm supporting locally, I'm making use of some of the more obscure busspace methods, and panic() is a preferred failure mode. For example, do this for the setregion methods.
2) Hook up several existing busspace method implementations that were provided in the file, but not actually present in the methods structure. Especially, single-byte bus I/O routines. This should allow bugs to be fixed in the Atheros 802.11 driver.
There are still some remaining unimplemented methods that would be desirable to implement -- especially, 64-bit I/O calls that would observably accelerate device performance on FPGA-based soft CPU cores that are typically clocked an order of magnitude slower than conventional hard core CPUs, but that remains for another day.
MFC after: 3 weeks Discussed with: jmallett, scottl Sponsored by: DARPA, AFRL
|
234920 |
02-May-2012 |
rwatson |
Merge a rudimentary gxemul "oldtestmips" port. This consists almost entirely of one machdep file lifted from the MALTA port, as well as a low-level console and tty driver for the gxemul debugging console device (the emulators stdio). As with many low-level embedded and hypervisor console devices, it is polled only, so we drive TTY I/O from a callout; we are perhaps a bit too aware of the MIPS physical maps in order to attach the console before newbus comes to life.
The sample kernel configuration depends on an MD-based root file system, which is not provided. However, any 64-bit, big-endian userspace image (such as one generated for MALTA) should work.
This will hopefully be supplemented by additional device drivers for gxemul-specific hardware simulations from Juli Mallett. We have found oldtestmips quite useful for testing and improving aspects of the MIPS port, so it's worth supporting better in FreeBSD.
Requested by: theraven, jmallett Sponsored by: DARPA, AFRL MFC after: 3 weeks
|
234919 |
02-May-2012 |
adrian |
Implement PLL configuration override support, similar to what openwrt implements.
|
234918 |
02-May-2012 |
adrian |
Disable the pll_1000 hint for now, the upcoming work enables it and it breaks without the switch PHY code.
|
234911 |
02-May-2012 |
adrian |
* Force the ethernet MII configuration to be RGMII * Populate the "pll_1000" field, which will soon be used to override the PLL configuration from the default value.
Obtained from: Linux OpenWRT
|
234910 |
02-May-2012 |
adrian |
Allow the MII mode to be overridden via 'hint.arge.X.miimode'.
It takes a number at the moment, rather than a string.
Some of the Linux board configurations specify the MII mode explicitly.
|
234909 |
02-May-2012 |
adrian |
Add a missing newline.
|
234907 |
02-May-2012 |
adrian |
Further ar71xx MII support improvements.
* Flesh out the PLL configuration fetch function, which will return the PLL configuration based on the unit number and speed. * Remove the PLL speed config logic from the AR71xx/AR91xx chip PLL config function - pass in a 'pll' value instead. * Modify arge_set_pll() to: + fetch the PLL configuration + write the PLL configuration + update the MII speed configuration.
This will allow if_arge to override the PLL configuration as required.
Obtained from: Linux/Atheros/OpenWRT
|
234906 |
02-May-2012 |
adrian |
MII related infrastructure changes.
* Add a new method to set the MII mode - GMII, RGMII, RMII, MII. + arge0 supports all four (two for non-Gige interfaces.) + arge1 only supports two (one for non-gige interfaces.) * Set the MII clock speed when changing the MAC PLL speed. + Needed for AR91xx and AR71xx; not needed for AR724x.
Tested:
* AR71xx only, I'll do AR913x testing tonight and fix whichever issues creep up.
TODO:
* Implement the missing AR7242 arge0 PLL configuration, but don't adjust the MII speed accordingly. * .. the AR7240/AR7241 don't require this, so make sure it's not set accidentally.
Bugs (not fixed here):
* Statically configured arge speeds are still broken - investigate why that is on the AP96 board. Autonegotiate is working fine, but there still seems to be an occasionally heavy packet loss issue.
Obtained from: Linux/Atheros/OpenWRT
|
234905 |
02-May-2012 |
adrian |
Introduce an enum which encapsulates the PHY interface types that can be configured.
|
234900 |
01-May-2012 |
adrian |
Add in the MII configuration parameters for the AR71xx.
Obtained from: Linux/OpenWRT
|
234863 |
01-May-2012 |
adrian |
Convert AP96 to use the mdioproxy and ARGE_MDIO option.
arge1 still works (it's the standalone PHY) but arge0 and the other switch ports don't work. They're enumerated though, demonstrating that the mdiobus abstraction is correctly working.
|
234862 |
01-May-2012 |
adrian |
Break out the arge MDIO bus code into an optional argemdio device.
This is only done if the ARGE_MDIO option is included.
* Shuffle the arge MDIO bus into a separate device, that needs to be probed early (use hint.argemdio.X.order=0) * hint.arge.X.mdio now specifies which miiproxy to rendezvous with. * Call MAC/MDIO bus init during MDIO attach, not arge attach.
This is done regardless:
* Shift the arge MAC and MDIO bus reset code into separate functions and call it early during MDIO bus attach. It's required for correct MDIO bus IO to occur on AR71xx/AR91xx devices.
* Remove the AR71xx/AR91xx centric assumption that there's only one MDIO bus. The initial code mapped miibus0(arge0) and miibus1(arge1) MII register operations to the MII0 (arge0) register space. The AR724x (and later, upcoming chipsets) have two MDIO busses and the second is very much in use.
TODO:
* since the multiphy behaviour has changed (where now a phymask of >1 PHY will still be enumerated), multiphy setups may be quite wrong. I'll go and fix these so they still have a chance of working, at least. until the switch PHY support appears in -HEAD.
Submitted by: Stefan Bethke <stb@lassitu.de>
|
234859 |
01-May-2012 |
adrian |
Migrate ARGE_DEBUG to opt_arge.h.
Submitted by: Stefan Bethke <stb@lassitu.de>
|
234785 |
29-Apr-2012 |
dim |
Add a convenience macro for the returns_twice attribute, and apply it to the prototypes of the appropriate functions (getcontext, savectx, setjmp, sigsetjmp and vfork).
MFC after: 2 weeks
|
234525 |
21-Apr-2012 |
adrian |
Allow for MIPS devices to have a specific probe/attach order.
The default priority is now '1000' rather than '0'. This may cause some unforseen regressions.
Submitted by: Stefan Bethke <stb@lassitu.de> Reviewed by: imp
|
234515 |
20-Apr-2012 |
adrian |
Allow for a default GPIO pin "high", which is required for some boards which tie the USB device enable to a GPIO line.
Submitted by: Stefan Bethke <stb@lassitu.de>
|
234485 |
20-Apr-2012 |
adrian |
Introduce the matching PCI ath(4) fixup code from ar71xx_pci into ar724x_pci.c.
* Move out the code which populates the firmware into ar71xx_fixup.c * Shuffle around the ar724x fixup code to match what the ar71xx fixup code does.
I've validated this on an AR7240 with AR9285 on-board NIC. It doesn't yet load, as the AR9285 EEPROM code needs to be made "flash aware."
TODO:
* Validate that I haven't broken AR71xx * Test AR9285/AR9287 onboard NICs, complete with EEPROM code changes * Port over the needed BAR hacks for AR7240, AR7241 and AR7242 from Linux OpenWRT. The current WAR has only been tested on the AR7240 and I'm not sure the way the BAR register is treated is "right". The "fixup" method here is right when setting the BAR for local access - ie, the BAR address is either 0xffff (AR7240) or 0x1000ffff (AR7241/AR7242), but the ath9k-fixup.c code (Linux OpenWRT) does this when setting the initial "fixup" BAR. It then restores the original BAR. I'll have to read the ar724x PCI bus glue to see what other special cases await.
|
234366 |
17-Apr-2012 |
adrian |
Style(9) and white space fixes.
|
234365 |
17-Apr-2012 |
adrian |
Protect the PCI space registers behind a mutex.
Obtained from: Linux/OpenWRT, Atheros
|
234327 |
15-Apr-2012 |
adrian |
Add in the AP96 phy configuration from openwrt.
* arge0 doesn't (yet) work via the switch PHY ports; I'm not sure why. * arge1 maps to the WAN port. That works.
TODO:
* The PLL register needs a different (non-default) value for Gigabit Ethernet. The board setup code needs to be extended a bit to allow for non-default pll_1000 values - right now, those values come out of hard-coded values in the per-chip set_pll_ge() routines.
Obtained from: Linux / OpenWRT
|
234326 |
15-Apr-2012 |
adrian |
The AR913x MII speed configuration matches the AR71xx MII configuration. So share the code.
Don't do it for the AR724x - that has a completely different set of PLL and MII configuration parameters.
|
234306 |
15-Apr-2012 |
adrian |
Fix the mask logic when reading PCI configuration space registers.
|
234235 |
13-Apr-2012 |
adrian |
Flesh out the rest of the AP96 board/config.
|
234232 |
13-Apr-2012 |
adrian |
* Enable ATH_EEPROM_FIRMWARE, now that it's a compile time option * Tidy up things a bit.
|
234220 |
13-Apr-2012 |
adrian |
These are uboot, so mark them as such or booting from flash will not work.
|
234219 |
13-Apr-2012 |
adrian |
Introduce configuration files for AP94 and AP96.
This uses the new firmware(9) method for squirreling away the EEPROM contents from SPI flash so ath(4) can get to them later.
It won't work out of the box just yet - you have to add this to if_ath_pci.c:
#define ATH_EEPROM_FIRMWARE
.. until I've added it as a configuration option and updated things.
|
234217 |
13-Apr-2012 |
adrian |
(ab)Use the firmware API to store away EEPROM calibration data for future use by the ath(4) driver.
These embedded devices put the calibration/PCI bootstrap data on the on board SPI flash rather than on an EEPROM connected to the NIC. For some boards, there's two NICs and two sets of EEPROM data in the main SPI flash.
The particulars:
* Introduce ath_fixup_size, which is the size of the EEPROM area in bytes. * Create a firmware image with a name based on the PCI device identifier (bus/slot/device/function). * Hide some verbose debugging behind 'bootverbose'.
ath(4) can then use this to load in the EEPROM data.
This requires AR71XX_ATH_EEPROM to be defined.
|
234205 |
13-Apr-2012 |
adrian |
Remove an unused variable. Grr.
|
234204 |
13-Apr-2012 |
adrian |
Sync this code against what's in OpenWRT trunk.
* the openwrt code doesn't treat 0/0/0 any differently from other bus/slot/func combinations. * A "local write" function writes to the LCONF area, and so I've added it. * The PCI workaround at attach time uses this LCONF code, which it already did .. * .. but it is a 4 byte write, not a 2 byte write. Even though it's PCIR_COMMAND which is a two byte PCI register.
Tested on: AR7161 TODO: The other two AR71xx derivatives TODO: More thoroughly stare at the datasheets I do have and if it indeed is incorrect, push fixes to both FreeBSD and Linux/OpenWRT.
Obtained from: Linux OpenWRT
|
233776 |
02-Apr-2012 |
jchandra |
Reinstate the XTLB handler for CPU_NLM and CPU_RMI
These platforms set the KX bit even when booted in 32 bit mode. So the XLTB handler is needed even when __mips_n64 is not defined.
|
233670 |
29-Mar-2012 |
jhb |
Use VM_MEMATTR_UNCACHEABLE for the constant for UC memory rather than VM_MEMATTR_UNCACHED. VM_MEMATTR_UNCACHEABLE is the constant other platforms use.
MFC after: 2 weeks
|
233657 |
29-Mar-2012 |
jchandra |
Remove unnecessary assembly code.
The compiler should generate lw/sw corresponding to register operations.
|
233644 |
29-Mar-2012 |
jmallett |
Assume a big-endian default on MIPS and drop the "eb" suffix from MACHINE_ARCH. This makes our naming scheme more closely match other systems and the expectations of much third-party software. MIPS builds which are little-endian should require and exhibit no changes. Big-endian TARGET_ARCHes must be changed: From: To: mipseb mips mipsn32eb mipsn32 mips64eb mips64
An entry has been added to UPDATING and some foot-shooting protection (complete with warnings which should become errors in the near future) to the top-level base system Makefile.
|
233639 |
29-Mar-2012 |
jmallett |
Turn on messages from the Simple Executive codebase, what few there are.
|
233638 |
29-Mar-2012 |
jmallett |
Disable FP instruction emulation by default on !o32 because of ABI concerns.
Note that in practice this isn't needed because we get a coprocessor unusable exception first, but that's actually something like a bug.
|
233637 |
29-Mar-2012 |
jmallett |
Supply endianness implied by the -m flag when compiling ucore code.
|
233636 |
29-Mar-2012 |
jmallett |
Fix little-endian built.
|
233628 |
28-Mar-2012 |
fabient |
Add software PMC support.
New kernel events can be added at various location for sampling or counting. This will for example allow easy system profiling whatever the processor is with known tools like pmcstat(8).
Simultaneous usage of software PMC and hardware PMC is possible, for example looking at the lock acquire failure, page fault while sampling on instructions.
Sponsored by: NETASQ MFC after: 1 month
|
233570 |
27-Mar-2012 |
jchandra |
Fix size of PCI softc.
|
233564 |
27-Mar-2012 |
jchandra |
Resource allocation for XLP SoC SDHCI slots
The on-chip SD slots do not have PCI BARs corresponding to them, so this has to be handled in the custom SoC memory allocation.
Provide memory resource for rids corresponding to BAR 0 and 1 in the custom allocation code.
|
233563 |
27-Mar-2012 |
jchandra |
Update memory and resource allocation code for SoC devices
The XLP on-chip devices have PCI configuration headers, but some of the devices need custom resource allocation code. - devices with no MEM/IO BARs with registers in PCIe extended reg space have to be handled in memory resource allocation - devices without INTPIN/INTLINE in PCI header can be supported by having these faked with a shadow register. - Some devices does not allow 8/16 bit access to the register space, he default bus space cannot be used for these.
Subclass pci and override attach and resource allocation methods to take care of this.
Remove earlier code which did this partially.
|
233556 |
27-Mar-2012 |
jchandra |
NOR flash driver for XLP.
The NOR interface on the SoC appears on the top level PCI bus. Add a simple driver for this.
|
233549 |
27-Mar-2012 |
jchandra |
XLP UART code udpate.
Move XLP PCI UART device to sys/mips/nlm/dev/ directory. Other drivers for the XLP SoC devices will be added here as well. Update uart_cpu_xlp.c and uart_pci_xlp.c use macros for uart port, speed and IO frequency.
|
233545 |
27-Mar-2012 |
jchandra |
xlpge : driver for XLP network accelerator
Features: - network driver for the four 10G interfaces and two management ports on XLP 8xx. - Support 4xx and 3xx variants of the processor. - Source code and firmware building for the 16 mips32r2 micro-code engines in the Network Accelerator. - Basic initialization code for Packet ordering Engine.
Submitted by: Prabhath Raman (prabhath at netlogicmicro com) [refactored and fixed up for style by jchandra]
|
233542 |
27-Mar-2012 |
jchandra |
Support for EEPROM and CPLD on XLP EVP boards.
On XLP evaluation platform, the board information is stored in an I2C eeprom and the network block configuration is available from a CPLD connected to the GBU (NOR flash bus). Add support for both of these.
|
233541 |
27-Mar-2012 |
jchandra |
Opencrypto driver for XLP Security and RSA/ECC blocks
Support for the Security and RSA blocks on XLP SoC. Even though the XLP supports many more algorithms, only the ones supported in OCF have been added.
Submitted by: Venkatesh J. V. (venkatesh at netlogicmicro com)
|
233540 |
27-Mar-2012 |
jchandra |
I2C support for XLP, add hints for I2C devices and update PCI resource allocation code.
|
233536 |
27-Mar-2012 |
jchandra |
XLP PCIe code update.
- XLP supports hardware swap for PCIe IO/MEM accesses. Since we are in big-endian mode, enable hardware swap and use the normal bus space. - move some printfs to bootverbose, and remove others. - fix SoC device resource allocation code - Do not use '|' while updating PCIE_BRIDGE_MSI_ADDRL - some style fixes
In collaboration with: Venkatesh J. V. (venkatesh at netlogicmicro com)
|
233535 |
27-Mar-2012 |
jchandra |
Update the L1D cache flush sequence when enabling threads.
Added more comments to the code.
|
233534 |
27-Mar-2012 |
jchandra |
Switch to interrupt based message handling for XLP 8xx B0.
Fixup some style issues in the file as well.
|
233533 |
27-Mar-2012 |
jchandra |
Support for XLP4xx and XLP 8xx B0 revision
- Add 4xx processor IDs, add workaround in CPU detection code. - Update frequency detection code for XLP 8xx. - Add setting device frequency code. - Update processor ID checking code.
|
233532 |
27-Mar-2012 |
jchandra |
Fixes to the XLP startup code.
Changes are: - Correct the order of calling init functions. - Fix up checking excluding reset area.
|
233417 |
24-Mar-2012 |
gonzo |
Remap PMC interrupt for all cores
|
233412 |
24-Mar-2012 |
gonzo |
Add DTrace-related part to machine-dependent code:
- DTrace trap handler - invop-related variables (unused on MIPS but still referenced from dtrace)
|
233381 |
23-Mar-2012 |
gonzo |
Fix pmap_kextract prototype to align it with pmap.c change
|
233336 |
23-Mar-2012 |
gonzo |
Add pseudo-device for handling PMC interrupts and link everything PMC-related to build
|
233331 |
23-Mar-2012 |
gonzo |
Setup fake MODINFO variables for octeon kernel
|
233319 |
22-Mar-2012 |
gonzo |
Rework MIPS PMC code:
- Replace MIPS24K-specific code with more generic framework that will make adding new CPU support easier - Add MIPS24K support for new framework - Limit backtrace depth to 1 for stability reasons and add option HWPMC_MIPS_BACKTRACE to override this limitation
|
233318 |
22-Mar-2012 |
gonzo |
Move PMC hook invocation to cpu_intr. The idea is the same as with ast() call but there is no reason to implement it in assembler.
|
233308 |
22-Mar-2012 |
jchandra |
Fix return type of mips pmap_kextract()
The return type should be vm_paddr_t, not vm_offset_t.
|
233278 |
21-Mar-2012 |
jmallett |
o) Don't keep drive parameters in a global, put them in the softc. o) Don't report a bogus stripesize. o) Eliminate a nearby gratuitous "proxy" indirection.
|
233271 |
21-Mar-2012 |
ed |
Remove pty(4) from our kernel configurations.
As of FreeBSD 8, this driver should not be used. Applications that use posix_openpt(2) and openpty(3) use the pts(4) that is built into the kernel unconditionally. If it turns out high profile depend on the pty(4) module anyway, I'd rather get those fixed. So please report any issues to me.
The pty(4) module is still available as a kernel module of course, so a simple `kldload pty' can be used to run old-style pseudo-terminals.
|
233104 |
18-Mar-2012 |
gonzo |
- Fix logic for detection if further processing of PMC should be performed. pmc_intr returns one if one of the counters actually triggered the IRQ - style(9) fixed
|
233082 |
17-Mar-2012 |
adrian |
style(9) changes.
|
233081 |
17-Mar-2012 |
adrian |
Begin fleshing out MII clock rate configuration changes.
These are needed for some particular port configurations where the default speed isn't suitable for all link speed types. (Ie, changing 10/100/1000MBit PLL rate requires a similar MII clock rate, rather than a fixed MII rate.)
This is:
* only currently implemented for the ar71xx; * isn't used anywhere (yet), as the final interface for this hasn't yet been determined.
|
233019 |
15-Mar-2012 |
gonzo |
Clean-up fake preload data generator: - Use macros to push scalar values - Fix type mismatch for module size
|
232998 |
15-Mar-2012 |
gonzo |
Fill out fake preload structure to let userland tools like pmc(3) know about kernel module base address and actual size
|
232916 |
13-Mar-2012 |
adrian |
Remove a now unneeded ARGE_UNLOCK().
Whilst I'm here, remove a couple blank lines.
|
232914 |
13-Mar-2012 |
adrian |
Fix link status handling on if_arge upon system boot to allow bootp/NFS to function.
From the submitter:
This patch fixes an issue I encountered using an NFS root with an ar71xx-based MikroTik RouterBoard 450G on -current where the kernel fails to contact a DHCP/BOOTP server via if_arge when it otherwise should be able to. This may be the same issue that Monthadar Al Jaberi reported against an RSPRO on 6 March, as the signature is the same:
%%%
DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 . . . DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 arge0: initialization failed: no memory for rx buffers DHCP/BOOTP timeout for server 255.255.255.255 arge0: initialization failed: no memory for rx buffers
%%%
The primary issue that I found is that the DHCP/BOOTP message that bootpc_call() is sending never makes it onto the wire, which I believe is due to the following:
- Last December, a change was made to the ifioctl that bootpc_call() uses to adjust the netmask around the sosend().
- The new ioctl (SIOCAIFADDR) performs an if_init when invoked, whereas the old one (SIOCSIFNETMASK) did not.
- if_arge maintains its own sense of link state in sc->arge_link_status.
- On a single-phy interface, sc->arge_link_status is initialized to 0 in arge_init_locked().
- sc->arge_link_status remains 0 until a phy state change notification causes arge_link_task to run, notice the link is up, and set it to 1.
- The inits caused by the ifioctls in bootpc_call are reinitializing the interface, but not the phy, so sc->arge_link_status goes to 0 and remains there.
- arge_start_locked() always sees sc->arge_link_status == 0 and returns without queuing anything.
The attached patch changes arge_init_locked() such that in the single-phy case, instead of initializing sc->arge_link_status to 0, it runs arge_link_task() to set it according to the current phy state. This change has allowed my setup to mount an NFS root successfully.
Submitted by: Patrick Kelsey <kelsey@ieee.org> Reviewed by: juli
|
232913 |
13-Mar-2012 |
jmallett |
Don't build kernel.tramp on Octeon. Probably building it should be opt-in not opt-out, but I don't know enough about which ports need it to get the defaults right.
|
232912 |
13-Mar-2012 |
adrian |
Correctly (I hope) deallocate the if_arge RX buffer ring on arge_stop().
I had some interesting hangs until I realised I should try flushing the DDR FIFO register and lo and behold, hangs stopped occuring.
I've put in a few DDR flushes here and there in case people decide to reuse some of these functions. It's very very likely they're almost all superflous.
To test:
* Connect to a network with a _lot_ of broadcast traffic * Do this: # while true; do ifconfig arge0 down; ifconfig arge0 up; done
This fixes the mbuf exhaustion that has been reported when the interface state flaps up/down.
|
232897 |
12-Mar-2012 |
jmallett |
Remove TARGET_BIG_ENDIAN which should have been removed previously.
|
232896 |
12-Mar-2012 |
jmallett |
o) Use ABI, not ISA_* options, to determine whether to compile bits if libkern required for the ABI the kernel is being built for. XXX This is implemented in a kind-of nasty way that involves including source files, but it's still an improvement. o) Retire ISA_* options since they're unused and were always wrong.
|
232887 |
12-Mar-2012 |
adrian |
Configuration changes/updates!
* enable ALQ and net80211/ath ALQ logging by default, to make it possible to get debug register traces. * Update some comments * Enable HWPMC for testing.
|
232881 |
12-Mar-2012 |
jmallett |
Use 64-bit bus space constants on 64-bit kernels.
|
232872 |
12-Mar-2012 |
jmallett |
Remove more unused stuff, primarily a set of (unused, thankfully) PIO functions.
Adjust nearby style of one assembly function END().
|
232855 |
12-Mar-2012 |
jmallett |
Remove more unused code and declarations, and add dire warnings to the 64-bit atomic ops used by 32-bit kernels.
|
232853 |
12-Mar-2012 |
jmallett |
Remove platform APIs which are not used by any code and which had only stub implementations or no implementation on all platforms.
Some of these functions might be good ideas, but their semantics were unclear given the lack of implementation, and an unlucky porter could be fooled into trying to implement them or, worse, being baffled when something like platform_trap_enter() failed to be called.
|
232847 |
12-Mar-2012 |
gonzo |
- Rename apb_intr to apb_filter since it's a filter handler - Pass interrupt trapframe for handlers dow the chain - Add PMC interrupt handler PMC interrupt is a special case, so we want handle it as soon as possible with minimum overhead. So we handle it apb filter routine.
|
232845 |
12-Mar-2012 |
adrian |
Begin modifying the PB92 config file to actually generate a flashable, bootable image.
The kernel has to fit inside an 896KiB area in a 4MB SPI flash. So a bunch of stuff can't be included (and more is to come), including (unfortunately) IPv6.
TODO:
* GPIO modules need to be created * Shrink the image a bit more by removing some of the CAM layer debugging strings.
|
232840 |
11-Mar-2012 |
jmallett |
We've supported 64-bit PTEs for some time.
|
232816 |
11-Mar-2012 |
jmallett |
Disable the Simple Executive's error decoding/reporting code.
|
232812 |
11-Mar-2012 |
jmallett |
Merge the Cavium Octeon SDK 2.3.0 Simple Executive code and update FreeBSD to make use of it where possible.
This primarily brings in support for newer hardware, and FreeBSD is not yet able to support the abundance of IRQs on new hardware and many features in the Ethernet driver.
Because of the changes to IRQs in the Simple Executive, we have to maintain our own list of Octeon IRQs now, which probably can be pared-down and be specific to the CIU interrupt unit soon, and when other interrupt mechanisms are added they can maintain their own definitions.
Remove unmasking of interrupts from within the UART device now that the function used is no longer present in the Simple Executive. The unmasking seems to have been gratuitous as this is more properly handled by the buses above the UART device, and seems to work on that basis.
|
232803 |
11-Mar-2012 |
jmallett |
Fix promiscuous mode with if_octm: o) The MAC set must occur before the multicast list is set up as the former will enable the CAM unconditionally, while promiscuous mode disables it, so if promiscuous mode is to be set this must occur after the MAC is programmed. o) The multicast list must be set up unconditionally as even if flags have not changed, if the interface has gone through a reinitialization, the state of the CAM as changed by the MAC initialization could be incorrect. o) Call octm_init when flags change, even if the interface is already running.
|
232801 |
10-Mar-2012 |
jmallett |
Remove some headers not used by kernel or world and which are not present in other ports.
|
232789 |
10-Mar-2012 |
jmallett |
Fix reversed logic in previous commit that broke build and earned me quite the pointy hat.
Submitted by: bz
|
232773 |
10-Mar-2012 |
jmallett |
Use ABI to determine bus_addr_t for cnMIPS.
|
232770 |
10-Mar-2012 |
jmallett |
o) Remove some CPU_CNMIPS-related magical thinking about the status register's contents for user programs. o) Conditionalize the installation of an XTLB handler on ABI, not CPU family.
|
232769 |
10-Mar-2012 |
jmallett |
Get rid of mainbus.c. The version in nexus.c is being used and is perfectly-sufficient and equally-crufty.
|
232768 |
10-Mar-2012 |
jmallett |
Don't truncate physical addresses to 32-bits.
|
232767 |
10-Mar-2012 |
jmallett |
Reduce diffs with freebsd32_sysarch.
|
232765 |
10-Mar-2012 |
jmallett |
o) Bump INTRCOUNT_COUNT to 256, since Octeon already has >128. XXX It would be good to use a better way to size intrcnt. o) Fix literal 4s that are supposed to be sizeof (u_long). XXX Why the * 2 here? Is this an artifact of a different system that this code came from? We seem to allocate twice as much space for intrcnt as we admit to in sintrcnt.
|
232720 |
09-Mar-2012 |
jmallett |
"Did you still want the not yet? I think we just arrived at yet."
Submitted by: thompsa
|
232718 |
09-Mar-2012 |
jmallett |
Enable COMPAT_FREEBSD32 for the Octeon kernel config by default.
|
232630 |
06-Mar-2012 |
jmallett |
Get rid of duplicated versions of the KSU bits.
|
232628 |
06-Mar-2012 |
ray |
Break long lines.
Approved by: adri (mentor)
|
232627 |
06-Mar-2012 |
ray |
Remove EoL whitespaces.
Approved by: adri (mentor)
|
232621 |
06-Mar-2012 |
jmallett |
Remove unused file.
|
232619 |
06-Mar-2012 |
attilio |
Disable the option VFS_ALLOW_NONMPSAFE by default on all the supported platforms. This will make every attempt to mount a non-mpsafe filesystem to the kernel forbidden, unless it is expressely compiled with VFS_ALLOW_NONMPSAFE option.
This patch is part of the effort of killing non-MPSAFE filesystems from the tree.
No MFC is expected for this patch.
|
232615 |
06-Mar-2012 |
jmallett |
At the risk of reducing source compatibility with old NetBSD and Sprite: o) Get rid of some unused macros related to features we don't intend to provide. o) Get rid of macro definitions for MIPS-I CPUs. We are not likely to support anything that predartes MIPS-III. o) Respell MIPS3_* macros as MIPS_*, which is how most of them were being used already. o) Eliminate a duplicate and mostly-unused set of exception vector macros.
There's still considerable duplication and lots more obsolete in our headers, but this reduces one of the larger files to a size where one could reckon about the correctness of its contents with a mere few hours of contemplation.
There is, of course, a question of whether we need definitions for fields, registers and configurations that we are unlikely to ever use or implement, even if they're not obsolete since 1991. FreeBSD is not a processor reference manual, and things that aren't used may be wrong, or may be duplicated because nobody could possibly actually know whether they're already defined.
|
232587 |
06-Mar-2012 |
jmallett |
Garbage collect some unused symbols.
|
232586 |
06-Mar-2012 |
jmallett |
Make the native sigreturn just wrap set_mcontext, much as freebsd32_sigreturn does.
|
232585 |
06-Mar-2012 |
jmallett |
Store TLS base in the sigframe just as is done in freebsd32_sendsig. Because the native sigreturn doesn't use set_mcontext like the COMPAT_FREEBSD32 version does, this wouldn't actually result in overwriting the TLS base. Probably it makes sense to restructure the native sigreturn to use set_mcontext for consistency, and to allow sigreturn to change the TLS base.
|
232584 |
06-Mar-2012 |
jmallett |
Fix two and a half oversights in COMPAT_FREEBSD32 related to contexts and TLS: o) The mc_tls field used to store the TLS base when doing context gets and restores was left a pointer and not converted to a 32-bit integer. This had the bug of not correctly capturing the TLS value desired by the user, and the extra nastiness of making the structure the wrong size. o) The mc_tls field was not being saved by sendsig. As a result, the TLS base would always be set to NULL when restoring from a signal handler.
Thanks to gonzo for helping track down a bunch of other TLS bugs that came out of tracking these down.
|
232583 |
06-Mar-2012 |
jmallett |
When emulating rdhwr for TLS, use the 32-bit offset under COMPAT_FREEBSD32.
|
232577 |
06-Mar-2012 |
gonzo |
Prepare for large TLS redo. Save pointer to the beginning of TLS area, and offset it only if requested by RDHWR handler. Otherwise things get overly complicated - we need to track whether address passsed in request for setting td_md.md_tls is already offseted or not.
|
232576 |
06-Mar-2012 |
jmallett |
In the trap messages that aid the primitive debugging environment of MIPS, include the tid as well, so it's easier to tell which thread of a process with multiple is responsible for a crash.
|
232478 |
04-Mar-2012 |
jmallett |
Fix tls base computation with COMPAT_FREEBSD32 on n64 kernels. The previous version was missing an else and would always use the n64 TP_OFFSET. Eliminate some duplication of logic here.
It may be worth getting rid of some of the ifdefs and introducing gratuitous SV_ILP32 runtime checks on n64 kernels without COMPAT_FREEBSD32 and on o32 kernels, similarly to how PowerPC works.
|
232452 |
03-Mar-2012 |
jmallett |
Unbreak n64 build without COMPAT_FREEBSD32 by fixing mismatched preprocessor conditionals.
|
232449 |
03-Mar-2012 |
jmallett |
o) Add COMPAT_FREEBSD32 support for MIPS kernels using the n64 ABI with userlands using the o32 ABI. This mostly follows nwhitehorn's lead in implementing COMPAT_FREEBSD32 on powerpc64. o) Add a new type to the freebsd32 compat layer, time32_t, which is time_t in the 32-bit ABI being used. Since the MIPS port is relatively-new, even the 32-bit ABIs use a 64-bit time_t. o) Because time{spec,val}32 has the same size and layout as time{spec,val} on MIPS with 32-bit compatibility, then, disable some code which assumes otherwise wrongly when built for MIPS. A more general macro to check in this case would seem like a good idea eventually. If someone adds support for using n32 userland with n64 kernels on MIPS, then they will have to add a variety of flags related to each piece of the ABI that can vary. That's probably the right time to generalize further. o) Add MIPS to the list of architectures which use PAD64_REQUIRED in the freebsd32 compat code. Probably this should be generalized at some point.
Reviewed by: gonzo
|
232410 |
02-Mar-2012 |
jmallett |
When creating a handle for a subregion, be sure to actually math out the new handle address, where we're using handles as raw addresses.
This fixes devices with subregions on Octeon PCI specifically, and likely also on MIPS more generally, where there isn't another bus_space in use that was doing the math already.
|
232409 |
02-Mar-2012 |
jmallett |
If an Atheros device is attached to an Octeon, it's going to be by PCI.
|
232402 |
02-Mar-2012 |
jmallett |
Unbreak SMP on stock Octeon systems -- copy the core_mask from bootinfo into sysinfo. This should have been done as part of replacing bootinfo with sysinfo.
|
232356 |
01-Mar-2012 |
jhb |
- Change contigmalloc() to use the vm_paddr_t type instead of an unsigned long for specifying a boundary constraint. - Change bus_dma tags to use bus_addr_t instead of bus_size_t for boundary constraints.
These allow boundary constraints to be fully expressed for cases where sizeof(bus_addr_t) != sizeof(bus_size_t). Specifically, it allows a driver to properly specify a 4GB boundary in a PAE kernel.
Note that this cannot be safely MFC'd without a lot of compat shims due to KBI changes, so I do not intend to merge it.
Reviewed by: scottl
|
232289 |
29-Feb-2012 |
gonzo |
Revert part of old logic of assigning MAC addressess:
- Reserver respective number of addresses for managment port - octm uses base address directly - other drivers get MACs on "first come first served" basis
Reviewed by: juli
|
232250 |
28-Feb-2012 |
gavin |
Correct capitalization of "Hz" in user-visible text (manpages, printf(), etc).
MFC after: 3 days
|
231987 |
22-Feb-2012 |
gonzo |
Refctor address assignment for Octeon's ethernet ports:
- Centralize address assignment - Make sure managment ports get first MAC address in pool - Properly propagate fail if address allocation failed
Submitted by: Andrew Duane <aduane@juniper.net>
|
231712 |
14-Feb-2012 |
rwatson |
When initialising the CP0 status register during boot on 64-bit MIPS, set all three of the kernel, supervisor, and user-mode 64-bit mode flags. While FreeBSD does not currently use the supervisor ring (and hence this is effectively a NOP on most systems), doing this avoids triggering an exception on 64-bit MIPS CPUs that don't support 32-bit compatibility mode, and therefore don't allow clearing the SX bit.
Reviewed by: gonzo MFC after: 3 days Sponsored by: DARPA, SRI International
|
231470 |
10-Feb-2012 |
gonzo |
- Reverse logic so base tls is fixed up with correct number
|
231406 |
10-Feb-2012 |
gonzo |
- Fix spelling of R_MIPS_RELGOT - Add R_MIPS_JALR relocation - Add TLS relocation types
Obtained from: NetBSD
|
231351 |
10-Feb-2012 |
gonzo |
Fix-up value passed by thr_new syscall to make it compatible with MIPS_TLS_GET/MIPS_TLS_SET sysarch API.
|
231314 |
09-Feb-2012 |
gonzo |
Fix n32 build breakage
|
231312 |
09-Feb-2012 |
gonzo |
- Emulate RDHWR instruction for TLS support
Reading register $29 with RDHWR is becoming the de-facto standard to implement TLS. According to linux-mips wiki, MIPS Technologies has reserved hardware register $29 for ABI use. Furthermore current GCC makes the following assumptions: - RDHWR is natively available or otherwise emulated by the kernel - Register $29 holds the TLS pointer
Submitted by: Robert Millan <rmh@debian.org>
|
230475 |
23-Jan-2012 |
das |
Add C11 macros describing subnormal numbers to float.h.
Reviewed by: bde
|
230405 |
20-Jan-2012 |
gonzo |
We use port_index field of struct octusb_qh to reference USB state of root HUB. Although it is initialized with port index of the device's parent hub, which is worng. So track the USB tree up to root HUB and initialize this filed ptroprly
Rename port_index to root_port_index in order to reflect its real semantics.
|
230366 |
20-Jan-2012 |
das |
Add parentheses where required. Without them, `sizeof LDBL_MAX' is a syntax error and shouldn't be, while `1 FLT_ROUNDS' isn't a syntax error and should be. Thanks to bde for the examples.
|
230229 |
16-Jan-2012 |
das |
Fix the value of float_t to match what is implied by FLT_EVAL_METHOD.
|
230199 |
16-Jan-2012 |
das |
Remove a confused comment and fix some minor bugs.
|
230195 |
16-Jan-2012 |
adrian |
Stop overloading opt_global.h.
|
230152 |
15-Jan-2012 |
adrian |
Build some more things (random, bridge/gif/gre, gpio, USB) as modules as well so some embedded platform builds can use these instead of a fully monolithic kernel.
|
230148 |
15-Jan-2012 |
adrian |
Some of the atheros based embedded devices use one or more PCI NICs on-board, glued to the AR71xx CPU. These may forgo separate WMAC EEPROMs (which store configuration and calibration data) and instead store it in the main board SPI flash.
Normally the NIC reads the EEPROM attached to it to setup various PCI configuration registers. If this isn't done, the device will probe as something different (eg 0x168c:abcd, or 0x168c:ff??.) Other setup registers are also written to which may control important functions.
This introduces a new compile option, AR71XX_ATH_EEPROM, which enables the use of this particular code. The ART offset in the SPI flash can be specified as a hint against the relevant slot/device number, for example:
hint.pcib.0.bus.0.17.0.ath_fixup_addr=0x1fff1000 hint.pcib.0.bus.0.18.0.ath_fixup_addr=0x1fff5000
TODO:
* Think of a better name; * Make the PCIe version of this fixup code also use this option; * Maybe also check slot 19; * This has to happen _before_ the SPI flash is set from memory-mapped to SPI-IO - so document that somewhere.
|
230094 |
13-Jan-2012 |
gonzo |
Fix backtrace for MIPS64: - Properly print 64-bit addresses - Get whole 64 bits of address using kdbpeekd - Make check for kernel address compatible with MIPS64
|
230046 |
13-Jan-2012 |
gonzo |
- Fix .rela case of R_MIPS_26 relocation. Addednds save diferently for .rel and .rela sections. It's shifted right two bits for former but saved as-is for latter.
|
229803 |
08-Jan-2012 |
gonzo |
Fix relocations for MIPS64: - Use Elf32_Addr as default, the only field that is 64 bitw wide is R_MIPS_64 - Add R_MIPS_HIGHER and R_MIPS_HGHEST handlers - Handle R_MIPS_HI16 and R_MIPS_LO16 for both .rel and .rela sections
|
229798 |
08-Jan-2012 |
gonzo |
Fix DDB x/i addr[,count] command for count > 1 case
|
229765 |
07-Jan-2012 |
adrian |
Fix the ar724x shift calculation when writing to the PCI config space.
This was preventing the ath driver from being loaded at runtime. It worked fine when compiled statically into the kernel but not when kldload'ed after the system booted.
The root cause was that PCIR_INTLINE (register 60) was being overwritten by zeros when register 62 was being written to. A subsequent read of this register would return 0, and thus the rest of the PCI glue assumed an IRQ resource had already been allocated. This caused the device to fail to attach at runtime as the device itself didn't contain any IRQ resources.
TODO: go back over the ar71xx and ar724x PCI config read/write code and ensure it's correct.
|
229677 |
06-Jan-2012 |
gonzo |
- Add better COP2 (crypto coprocessor) context handler for Octeon. Keep COP2 disabled and lazily allocate COP2 context structure in exception handler. Keep kernel and userland contexts separated.
|
229561 |
05-Jan-2012 |
adrian |
This isn't required any longer - it turns out the flash has ~ 1.7MB of space for a kernel. There's thus plenty of space for a full, non-module kernel.
|
229556 |
05-Jan-2012 |
adrian |
Use geom_uncompress now, rather than geom_uzip.
This results in a much smaller rootfs image and it easily fits in the 8MB flash.
|
229496 |
04-Jan-2012 |
andreast |
Apply the same change as in r229494.
Requested by: ed
|
229408 |
03-Jan-2012 |
gonzo |
- Octeon-SDK strictly requires multi_count to be zero for full and low speed devices.
|
229168 |
01-Jan-2012 |
gonzo |
- Properly set IRQ handlers for all USB ports
|
229162 |
31-Dec-2011 |
adrian |
This particular work around isn't required any longer, now that the 11n radio backends are also added into the RF linker set.
This saves around 7k from the kernel binary.
|
229161 |
31-Dec-2011 |
gonzo |
- struct clocktime sets different ranges for DOW and month comparing to struct timeval. for clocktime they should be 1..7 and 1..12 respectively
- CAPK-0100ND uses RTC without centruy bit (DS1307) so set it 21st
|
229126 |
31-Dec-2011 |
adrian |
Oops - this was referencing a local file, which I've done away with.
|
229072 |
31-Dec-2011 |
gonzo |
- Pass proper endpoint number (without direction flag) to cvmx_usb_open_pipe
|
228988 |
30-Dec-2011 |
adrian |
Add a configuration file for the Atheros PB47 reference board. This is an AR71xx based board with 8MB flash, 64MB RAM, a Mini-PCI+ slot (see below) and a single 10/100/1000baseT ethernet port. It also has two USB ports.
This is an easier board than most to add as it doesn't have a switch PHY on-board. This made it (mostly) trivial to craft a working configuration.
Things to note:
* This, like most other reference boards, use uboot rather then redboot. It means that you typically have to manually flash both the kernel and rootfs partitions.
* Since there's currently no (nice) way to extract out the ethernet MAC and RAM from the uboot environment, the RAM will default to 32mb and the MAC will be something very incorrect. I'll try to fix this up in a subsequent commit or two, even if it's just some hard-coded nonsense in ar71xx_machdep.c for now.
* The board is designed for a specific model of mini-PCI+ NIC which never made it into production. Normal mini-PCI NICs will work fine; if you happen to have the NIC in question then it will work fine with this board.
|
228987 |
30-Dec-2011 |
adrian |
Add a couple of missing wlan modules.
|
228982 |
30-Dec-2011 |
marcel |
Remove trailing white-space.
|
228962 |
29-Dec-2011 |
jhb |
Use curthread rather than PCPU_GET(curthread). 'curthread' uses special-case optimizations on several platforms and is preferred.
Reported by: dim (indirectly) MFC after: 2 weeks
|
228945 |
29-Dec-2011 |
adrian |
Flesh out the RSPRO GPIO config, including the RF LED.
|
228944 |
29-Dec-2011 |
adrian |
Break out the AR71XX config file into _BASE and board specific bits.
The ROUERSTATION and RSPRO variants contain:
* the board specific bits (eg the RTC for RSPRO, later on it'll include the GPIO/LED definitions); * the boot specific bits (eg, on-board flash, usb flash, etc).
For now the AR71XX_BASE file contains the common board config, drivers and net80211/ath wireless drivers.
I'll follow this up with config files for the other boards I have (eg the Ubiquiti LSSR71, as well as some Mikrotik boards that use the AR71XX and atheros reference boards) which will be quite easy to do now.
|
228925 |
28-Dec-2011 |
gonzo |
- Add generic GPIO driver for Cavium Octeon. At the moment pin definition is hardcoded but will be changed later with more flexible way to define them.
|
228872 |
24-Dec-2011 |
gonzo |
- Initialize compact_flash_attribute_base_addr from bootinfo structure
|
228853 |
23-Dec-2011 |
gonzo |
- Set CF physical address base in sysinfo structure
|
228725 |
20-Dec-2011 |
adrian |
Remove these locks - they aren't strictly needed and cause measurable performance issues.
* Access to the GPIO bus is already locked by requesting and releasing the bus - thus the lock isn't really needed for each GPIO pin change. * Don't lock and unlock the GPIO bus for -each- i2c access - the i2c bus code is already doing this by calling the upper layer callback to request/release the bus. This thus locks the bus for the entirety of the transaction.
TODO:
* Further verify that everything is correctly requesting/ releasing the GPIO bus. * Look at how to lock the GPIO pin configuration stuff, potentially by locking/unlocking the bus at the gpiobus layer.
|
228640 |
17-Dec-2011 |
bz |
Unbreak the OCTEON1 kernel build after r228483 removing the left over declaration.
MFC after: 11 days
|
228631 |
17-Dec-2011 |
avg |
kern cons: introduce infrastructure for console grabbing by kernel
At the moment grab and ungrab methods of all console drivers are no-ops.
Current intended meaning of the calls is that the kernel takes control of console input. In the future the semantics may be extended to mean that the calling thread takes full ownership of the console (e.g. console output from other threads could be suspended).
Inspired by: bde MFC after: 2 months
|
228519 |
15-Dec-2011 |
adrian |
* Add in the gpio/gpioled drivers into AR91XX_BASE. * Add in a default GPIO section for AR91XX_BASE.hints, which doesn't define the GPIO function masks or any GPIO pines. * Add in the GPIO line definitions for LEDs and GPIO pins for the TP-WR1043nd.
I've verified the LEDs work fine using gpioset.
|
228518 |
15-Dec-2011 |
adrian |
Re-jiggle the GPIO code a little to remove the hard-coded AR71xx GPIO config and function mask setup.
* "gpiomask" now specifies which GPIO pins to enable, for devices to bind to. * "function_set" allows bits in the function register to be set at GPIO setup. * "function_clear" allows bits in the function register to be cleared at GPIO setup.
The function_set/function_clear bits allow for individual GPIO pins to either drive a GPIO line or an alternate function - eg USB, JTAG, etc. This allows for things like CS1/CS2 be enabled for those boards w/ >1 SPI device connected, or disabling JTAG for the AR7240 (which is apparently needed ..)
I've verified this on the AR71xx.
|
228483 |
14-Dec-2011 |
hselasky |
Implement better support for USB controller suspend and resume.
This patch should remove the need for kldunload of USB controller drivers at suspend and kldload of USB controller drivers at resume.
This patch also fixes some build issues in avr32dci.c
MFC after: 2 weeks
|
228469 |
13-Dec-2011 |
ed |
Replace __signed by signed.
The signed keyword is an integral part of the C syntax. There's no need to use __signed.
|
228450 |
13-Dec-2011 |
adrian |
Style(9) changes.
|
228273 |
05-Dec-2011 |
jchandra |
Disable KDB/DDB options for XLP N32 compile.
n32 abi is not supported in KDB/DDB yet, disable the option in XLPN32 conf.
Reported by: gonzo, bz
|
228272 |
05-Dec-2011 |
jchandra |
Fix N32 compilation again for XLP.
Disable DDB/KDB related options for N32, and add back a cast that was lost during the last set of updates.
Reported by: gonzo, bz
|
228271 |
05-Dec-2011 |
jchandra |
Fix XLP compilation.
Add definitions of LSU_DEBUG_ADDR and LSU_DEBUG_DATA0, the code that uses it was added in r227799
Reported by: gonzo
|
228091 |
28-Nov-2011 |
gonzo |
- Fix backtrace for MIPS64 platform
|
228088 |
28-Nov-2011 |
gonzo |
- Copy base MAC address from bootinfo descriptor to sysinfo struct
Reviewed by: Andrew Duane
|
228064 |
28-Nov-2011 |
ray |
Simplify arge_flush_ddr to use updated ar71xx_device_flush_ddr_ge(unit).
Approved by: adrian (mentor)
|
228050 |
28-Nov-2011 |
glebius |
Fix build, fininshing r228018.
|
228018 |
27-Nov-2011 |
ray |
Join chip depended methods for arge0 and arge1 into single call with unit.
Approved by: adrian (mentor)
|
228005 |
26-Nov-2011 |
marius |
Change another instance of amd(4) to esp(4) missed in r227006.
Submitted by: Garrett Cooper MFC after: 3 days
|
227938 |
24-Nov-2011 |
adrian |
I've had verification that the second-last 64k is actually used by the tplink firmware to store configuration data.
It's safe to overwrite it.
|
227926 |
24-Nov-2011 |
adrian |
Now that I've brought up FreeBSD via flash, I've discovered that the second-last 64k seems to be the default firmware board configuration area.
Since I have no idea whether uboot uses it or not - and it's prefixed with an atheros eeprom signature (0xaa55), I figure the safest thing to do is mark it as read-only.
I've modified my local tplink firmware building program to generate a board configuration section - which is separate to this partition. It's located in the 64k _before_ this particular 64k.
The firmware build program from OpenWRT never initialises those values and the firmware images from tplink also leave it 0x0, so I don't currently know what the exact, correct details should be.
|
227925 |
24-Nov-2011 |
adrian |
Flip on AR71XX_ENV_UBOOT so the environment variables are properly processed. (Which is to say they're currently ignored.)
|
227924 |
24-Nov-2011 |
adrian |
Introduce a new (global, sorry!) option which controls whether the ar71xx platform code should assume a uboot or redboot environment.
The current code gets very confused (and just crashes) on a uboot environment, where each attribute=value pair is in a single entry. Redboot on the other hand stores it as "attribute", "value", "attribute", "value", ...
This allows the kernel to boot on a TP-LINK TL-WR1043ND from flash, where the uboot environment gets setup. This didn't show up during a netboot as "tftpboot" and "go" don't setup the uboot environment variables.
|
227921 |
24-Nov-2011 |
adrian |
Flesh out a geom_map setup, so the kernel can be squeezed _onto_ the device.
The default flash layout gives only 1 megabyte for the kernel, gzipped. The uboot firmware running on this device only supports gzip, not lzma, so we actually _do_ have to try and slim the kernel down a bit.
But, since I can't actually do that at the present, I'm opting to:
* extend the kernel from 1mb to 2mb; * have rootfs fill the rest of that, save 64k; * eventually I'll hide a 64k config partition at the end, between the end of rootfs and the ART (radio configuration data.)
The uboot firmware doesn't care about the partition layout. It just expects the kernel application image to sit at 0xbf020000 (right after the 128k uboot image.) The uboot header isn't actually read either - it's "faked" from a "tplink" flash image header. So as long as the map configuration here matches what is being written out via the tplink firmware generator, everything is a-ok.
|
227920 |
24-Nov-2011 |
adrian |
Compile in the right bits so the AR9130 WMAC support functions correctly.
A previous commit disabled compiling the AR9130 support in the default HAL build in the kernel. Since the AR9130 support won't actually function without AH_SUPPORT_AR9130 (and that abomination needs to be undone at some point, in order to allow USB 11n NICs to also work), we now have to explicitly compile it in.
But since the 11n RF backends don't (currently) join the RF linker set, one has to compile in _an_ RF backend for the HAL to compile.
|
227919 |
24-Nov-2011 |
adrian |
Add a comment documenting where the WMAC hangs off of.
At some point it would be nice to correctly update the bus glue to make this "correct", including having the DDR flush occur in the right spot (ie, any AHB interrupt.)
|
227918 |
24-Nov-2011 |
adrian |
Flip on these debugging options by default. This is -HEAD after all.
|
227917 |
24-Nov-2011 |
adrian |
Slim the default build down a little:
* Disable the NFS client, it's not needed for booting off of flash. * Don't compile in softdep, snapshots, ufs acls and directory hashing.
|
227849 |
22-Nov-2011 |
hselasky |
Rename device_delete_all_children() into device_delete_children().
Suggested by: jhb @ and marius @ MFC after: 1 week
|
227843 |
22-Nov-2011 |
marius |
- There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
|
227799 |
21-Nov-2011 |
jchandra |
Do dcache flush on CPU core before enabling threads.
The dcache flush has to be done using the core control registers before splitting the L1D cache by enabling the hardware threads.
Also replace .word calls for mfcr/mtcr with a C macro.
In collaboration with: prabhath at netlogicmicro com
|
227783 |
21-Nov-2011 |
jchandra |
Merge XLP 3XX updates and related rework.
* Update message station (CMS) code, read queue ids from PCI header. * Use interrupts to wakeup message handling threads on 3XX * Update PIC code, read interrupt information from PCI header instead of using fixed values. * Update PCI interrupt handling for the PIC change. * Update code for getting chip frequency, new code support XLP 3XX * Misc style(9) fixes
In collaboration with: prabhath at netlogicmicro com (CMS/PIC) venkatesh at netlogicmicro.com (PCI)
|
227782 |
21-Nov-2011 |
jchandra |
XLP processors have the release 2 pagegrain register
Add accessors to cpufunc.h
Obtained from: prabhath at netlogicmicro com
|
227780 |
21-Nov-2011 |
adrian |
Always leave the -current kernel debugging options on.
|
227729 |
19-Nov-2011 |
jchandra |
Remove unused variable ubase.
This vaiable is initialized but not used.
|
227728 |
19-Nov-2011 |
jchandra |
Remvoe unused file
mips/nlm/uart_cpu_xlp.c has replaced uart_bus_xlp_iodi.c
|
227725 |
19-Nov-2011 |
jchandra |
Fix USB compilation, and add USB options to XLP conf
Remove obsolete header file included in usb_init.c
|
227724 |
19-Nov-2011 |
jchandra |
Fixup cache flush definitions for XLP
mco_icache_sync_range was earlier set to mipsNN_icache_sync_range_index_32 which is not necessary, revert this. Also, the data cache is coherent so write back is not really needed. This change is experimental.
|
227722 |
19-Nov-2011 |
jchandra |
Whitespace fixes in XLP HAL files.
Also fixup a macro in iomap.h
|
227663 |
18-Nov-2011 |
jchandra |
Rearrange XLP configuration files.
Create std.XLP for configuration options, which is included by the conf files. The files XLP, XLPN32 and XLP64 will have mostly ABI related options.
Also move uart and pci to mips/nlm/std.xlp since all XLP configurations needs these devices.
Obtained from: prabhath at netlogicmicro com (intial version)
|
227658 |
18-Nov-2011 |
jchandra |
Fix COP0 hazards for XLR and XLP
The XLR CPUs do not have any software visible hazards for COP0 operations. On XLP the hazard is a ehb, since it is mips64r2.
|
227623 |
17-Nov-2011 |
jchandra |
Do pmap update only on active CPUs.
The pmap update_page/invalidate_page/invalidate_all operations has to be done only on active cpus. In the simplest case, if the process is not active on any other CPUs, we can just do the operation on the current CPU.
This change replaces the call to smp_rendezvous() for these operations with smp_rendezvous_cpus() in case there more than one active CPU, or with a direct function call if there is just one active CPU.
This change give significant performance increase in fork/exec benchmarks on XLR/XLS/XLP with 32 cpus.
Reviewed by: alc
|
227333 |
08-Nov-2011 |
attilio |
Introduce the option VFS_ALLOW_NONMPSAFE and turn it on by default on all the architectures. The option allows to mount non-MPSAFE filesystem. Without it, the kernel will refuse to mount a non-MPSAFE filesytem.
This patch is part of the effort of killing non-MPSAFE filesystems from the tree.
No MFC is expected for this patch.
Tested by: gianni Reviewed by: kib
|
227309 |
07-Nov-2011 |
ed |
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.
The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
|
227012 |
02-Nov-2011 |
alc |
Add support for VM_ALLOC_WIRED and VM_ALLOC_ZERO to vm_page_alloc_freelist() and use these new options in the mips pmap.
Wake up the page daemon in vm_page_alloc_freelist() if the number of free and cached pages becomes too low.
Tidy up vm_page_alloc_init(). In particular, add a comment about an important restriction on its use.
Tested by: jchandra@
|
226607 |
21-Oct-2011 |
das |
People porting FreeBSD to new architectures ought not have to implement a deprecated FPU control interface in addition to the standard one. To make this clearer, further deprecate ieeefp.h by not declaring the function prototypes except on architectures that implement them already.
Currently i386 and amd64 implement the ieeefp.h interface for compatibility, and for fp[gs]etprec(), which doesn't exist on most other hardware. Powerpc, sparc64, and ia64 partially implement it and probably shouldn't, and other architectures don't implement it at all.
|
226545 |
19-Oct-2011 |
jchandra |
Keep FDT options commented until dtc is build by default for mips
Otherwise automated builds will fail for XLP and XLP64
|
226517 |
18-Oct-2011 |
jchandra |
Fix wakeup latency when sleeping with 'wait'
If we handle an interrupt just before the 'wait' and the interrupt schedules some work, we need to skip the 'wait' call. The simple solution of calling sched_runnable() with interrupts disabled immediately before wait still leaves a window after the call and before 'wait' in which the same issue can occur.
The solution implemented is to check the EPC in the interrupt handler, and if it is in a region before the 'wait' call, to fix up the EPC to skip the wait call.
Reported/analysed by: adrian Fix suggested by: kib
Reviewed by: jmallett, imp
|
226513 |
18-Oct-2011 |
jchandra |
Fix XLP compile failure on n32 abi.
Reported by: bz@
|
226501 |
18-Oct-2011 |
jchandra |
Support for booting XLP using FDT.
- update xlp_machdep.c to read arguments from FDT if FDT support is compiled in. - define rmi_uart_bus_space, and use it as fdtbus_bs_tag - update conf files for FDT support - add default dts file xlp-basic.dts
|
226496 |
18-Oct-2011 |
jchandra |
FDT support for MIPS.
Add architecture specific files needed to compile MIPS with flattened device tree support.
|
226478 |
17-Oct-2011 |
yongari |
Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock.
Reported by: Karim (fodillemlinkarimi <> gmail dot com)
|
226459 |
17-Oct-2011 |
jchandra |
Fix for crash on MIPS /dev/mem read.
Reading /dev/mem in 64 bit kernel crashes. This is because the page used to call uiomove_fromphys() from memrw() does not have md.pv_list initialized correctly.
The fix is to call pmap_page_init() on the page to initialize it.
|
226436 |
16-Oct-2011 |
eadler |
- change "is is" to "is" or "it is" - change "the the" to "the"
Approved by: lstewart Approved by: sahil (mentor) MFC after: 3 days
|
226112 |
07-Oct-2011 |
kib |
Remove unused define.
MFC after: 1 month
|
226065 |
06-Oct-2011 |
kib |
Convert MIPS to the syscallenter/syscallret system call sequence handlers. This was the last architecture used custom syscall entry sequence.
Reviewed, debugged, tested and approved by: jchandra MFC after: 1 month
|
226025 |
04-Oct-2011 |
marcel |
Add default address for FLASH mapping on the boot bus.
Reviewed by: jmallett, marcel Obtained from: Juniper Networks, Inc Author: Andrew Duane
|
226024 |
04-Oct-2011 |
marcel |
Remove octeon_bootinfo from all files except octeon_machdep.c. Use instead cvmx_sysinfo_get() consistently.
Reviewed by: jmallett, marcel Obtained from: Juniper Networks, Inc Author: Andrew Duane
|
226021 |
04-Oct-2011 |
marcel |
Remove bogus and wrong definition of BLKDEV_IOSIZE. Wrong in that it must be guarded (it's configurable) and bogus in that there's absolutely no rationale for it not default to a page size like all other archs.
|
226020 |
04-Oct-2011 |
marcel |
o Clean up some ID printfs, and put under bootverbose o Remove redundant lookups of base address in cf_identify o Fix some indenting issues o Fix an identification bug that uses DRQ to checlk for ident block returned. The correct spec is to look for BSY to be cleared.
Reviewed by: imp, marcel Obtained from: Juniper Networks, Inc Author: Andrew Duane
|
226018 |
04-Oct-2011 |
marcel |
Partially revert r224661: octeon_ap_boot is not a bitmask. It holds the CPU Id of the AP currently being started. As such there's no need to make it a 64-bit integral and we're not limited to 64 CPUs.
Reported by: jmallet Obtained from: Andre Duane
|
225892 |
01-Oct-2011 |
adrian |
Disable using wait in cpu_idle() until a better solution to timer and interrupt handling can be implemented.
|
225617 |
16-Sep-2011 |
kmacy |
In order to maximize the re-usability of kernel code in user space this patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls.
Reviewed by: rwatson Approved by: re (bz)
|
225482 |
11-Sep-2011 |
brueffer |
Fix a zyd(4) comment typo that was copy+pasted into most kernel config files.
PR: 160276 Submitted by: MATSUMIYA Ryo <matsumiya@mma.club.uec.ac.jp> Approved by: re (kib) MFC after: 1 week
|
225418 |
06-Sep-2011 |
kib |
Split the vm_page flags PG_WRITEABLE and PG_REFERENCED into atomic flags field. Updates to the atomic flags are performed using the atomic ops on the containing word, do not require any vm lock to be held, and are non-blocking. The vm_page_aflag_set(9) and vm_page_aflag_clear(9) functions are provided to modify afalgs.
Document the changes to flags field to only require the page lock.
Introduce vm_page_reference(9) function to provide a stable KPI and KBI for filesystems like tmpfs and zfs which need to mark a page as referenced.
Reviewed by: alc, attilio Tested by: marius, flo (sparc64); andreast (powerpc, powerpc64) Approved by: re (bz)
|
225394 |
05-Sep-2011 |
jchandra |
MIPS XLP platform code update.
* Update the hardware access register definitions and functions to bring them in line with other Netlogic software. * Update the platform bus to use PCI even for on-chip devices. Add a dummy PCI driver to ignore on-chip devices which do not need driver. * Provide memory and IRQ resource allocation code for on-chip devices which cannot get it from PCI config. * add support for on-chip PCI and USB interfaces. * update conf files, enable pci and retain old MAXCPU until we can support >32 cpus.
Approved by: re(kib), jmallett
|
224845 |
13-Aug-2011 |
attilio |
Fix a typo in cb_dumpdata() about wrongly calling wdog_kern_pat().
Submitted by: Andrew Boyer <aboyer at averesystems dot com> Approved by: re (kib)
|
224746 |
09-Aug-2011 |
kib |
- Move the PG_UNMANAGED flag from m->flags to m->oflags, renaming the flag to VPO_UNMANAGED (and also making the flag protected by the vm object lock, instead of vm page queue lock). - Mark the fake pages with both PG_FICTITIOUS (as it is now) and VPO_UNMANAGED. As a consequence, pmap code now can use use just VPO_UNMANAGED to decide whether the page is unmanaged.
Reviewed by: alc Tested by: pho (x86, previous version), marius (sparc64), marcel (arm, ia64, powerpc), ray (mips) Sponsored by: The FreeBSD Foundation Approved by: re (bz)
|
224661 |
05-Aug-2011 |
marcel |
Make octeon_ap_boot 64 bits to handle MAXCPU up to 64. Better construction of CPU mask in platform_cpu_mask(). Release cores still in reset when platform_start_ap() is called.
Reviewed by: imp, marcel Obtained from: Juniper Networks, Inc Author: Andrew Duane Approved by: re (kib)
|
224612 |
02-Aug-2011 |
attilio |
Fix for arm and mips case the size of storage for sintrcnt/sintrnames. It seems that "info as" is not much precise on what expect by pseudo-op .word, by the way.
No MFC is previewed for this patch.
Tested by: andreast, pluknet Approved by: re (kib)
|
224217 |
19-Jul-2011 |
attilio |
Bump MAXCPU for amd64, ia64 and XLP mips appropriately. From now on, default values for FreeBSD will be 64 maxiumum supported CPUs on amd64 and ia64 and 128 for XLP. All the other architectures seem already capped appropriately (with the exception of sparc64 which needs further support on jalapeno flavour).
Bump __FreeBSD_version in order to reflect KBI/KPI brekage introduced during the infrastructure cleanup for supporting MAXCPU > 32. This covers cpumask_t retiral too.
The switch is considered completed at the present time, so for whatever bug you may experience that is reconducible to that area, please report immediately.
Requested by: marcel, jchandra Tested by: pluknet, sbruno Approved by: re (kib)
|
224216 |
19-Jul-2011 |
attilio |
On 64 bit architectures size_t is 8 bytes, thus it should use an 8 bytes storage. Fix the sintrcnt/sintrnames specification.
No MFC is previewed for this patch.
Reported, reviewed and tested by: marcel Approved by: re (kib)
|
224207 |
19-Jul-2011 |
attilio |
Add the possibility to specify from kernel configs MAXCPU value. This patch is going to help in cases like mips flavours where you want a more granular support on MAXCPU.
No MFC is previewed for this patch.
Tested by: pluknet Approved by: re (kib)
|
224187 |
18-Jul-2011 |
attilio |
- Remove the eintrcnt/eintrnames usage and introduce the concept of sintrcnt/sintrnames which are symbols containing the size of the 2 tables. - For amd64/i386 remove the storage of intr* stuff from assembly files. This area can be widely improved by applying the same to other architectures and likely finding an unified approach among them and move the whole code to be MI. More work in this area is expected to happen fairly soon.
No MFC is previewed for this patch.
Tested by: pluknet Reviewed by: jhb Approved by: re (kib)
|
224143 |
17-Jul-2011 |
jchandra |
Comment out KDB/DDB related options for N32 kernel.
DDB files have warnings in this ABI which will break the kernel build unless Werror is ignored
Reported by: bz
|
224139 |
17-Jul-2011 |
bz |
Fix compilation of mips kernels adding apropriate #ifdefs after r224115.
Pointed out by: Luiz Otavio O Souza (lists.br gmail.com)
|
224115 |
16-Jul-2011 |
jchandra |
MIPS changes for Netlogic XLP support.
This patch adds support for the Netlogic XLP mips64 processors in the common MIPS code. The changes are :
- Add CPU_NLM processor type - Add cases for CPU_NLM, mostly were CPU_RMI is used. - Update cache flush changes for CPU_NLM - Add kernel build configuration files for xLP.
In collaboration with: Prabhath Raman <prabhathpr at netlogicmicro com>
Approved by: bz(re), jmallett, imp(mips)
|
224110 |
16-Jul-2011 |
jchandra |
Add MIPS platform files for Netlogic XLP SoC.
Processor, UART, PIC and Messaging Network code. Also add sys/mips/nlm/hal for on-chip device registers.
In collaboration with: Prabhath Raman <prabhathpr at netlogicmicro com>
Approved by: bz(re), jmallett, imp(mips)
|
224105 |
16-Jul-2011 |
jchandra |
Support compiling MIPS elf trampoline with a different ABI.
Allow changing the trampoline ABI with makeoptions, this will allow us to have a trampoline with a different ABI from the kernel. Useful in cases where we have to boot a 64 bit kernel from a bootloader which supports only 32 bit or vice versa.
Approved by: bz(re), jmallett, imp
|
224072 |
16-Jul-2011 |
adrian |
The i8259 controller is initialized incorrectly on MALTA. It writes mask bits to control register and control bits to mask register.
The former causes ICW1_RESET|ICW1_LTIM combination to be written to control register, which on QEMU results in "level sensitive irq not supported" error.
Submitted by: Robert Millan <rmh@debian.org>
|
224009 |
14-Jul-2011 |
ray |
Include device rt in RT305X config.
Approved by: adrian (mentor)
|
224008 |
14-Jul-2011 |
ray |
Revert it back. Too many changes for one commit.
Approved by: adrian (mentor)
|
224005 |
14-Jul-2011 |
ray |
Include device rt in RT305X config and little cleanup.
Approved by: adrian (mentor)
|
223758 |
04-Jul-2011 |
attilio |
With retirement of cpumask_t and usage of cpuset_t for representing a mask of CPUs, pc_other_cpus and pc_cpumask become highly inefficient.
Remove them and replace their usage with custom pc_cpuid magic (as, atm, pc_cpumask can be easilly represented by (1 << pc_cpuid) and pc_other_cpus by (all_cpus & ~(1 << pc_cpuid))).
This change is not targeted for MFC because of struct pcpu members removal and dependency by cpumask_t retirement.
MD review by: marcel, marius, alc Tested by: pluknet MD testing by: marcel, marius, gonzo, andreast
|
223732 |
02-Jul-2011 |
alc |
When iterating over a paging queue, explicitly check for PG_MARKER, instead of relying on zeroed memory being interpreted as an empty PV list.
Reviewed by: kib
|
223677 |
29-Jun-2011 |
alc |
Add a new option, OBJPR_NOTMAPPED, to vm_object_page_remove(). Passing this option to vm_object_page_remove() asserts that the specified range of pages is not mapped, or more precisely that none of these pages have any managed mappings. Thus, vm_object_page_remove() need not call pmap_remove_all() on the pages.
This change not only saves time by eliminating pointless calls to pmap_remove_all(), but it also eliminates an inconsistency in the use of pmap_remove_all() versus related functions, like pmap_remove_write(). It eliminates harmless but pointless calls to pmap_remove_all() that were being performed on PG_UNMANAGED pages.
Update all of the existing assertions on pmap_remove_all() to reflect this change.
Reviewed by: kib
|
223562 |
26-Jun-2011 |
kevlo |
Remove duplicate header includes
|
222813 |
07-Jun-2011 |
attilio |
etire the cpumask_t type and replace it with cpuset_t usage.
This is intended to fix the bug where cpu mask objects are capped to 32. MAXCPU, then, can now arbitrarely bumped to whatever value. Anyway, as long as several structures in the kernel are statically allocated and sized as MAXCPU, it is suggested to keep it as low as possible for the time being.
Technical notes on this commit itself: - More functions to handle with cpuset_t objects are introduced. The most notable are cpusetobj_ffs() (which calculates a ffs(3) for a cpuset_t object), cpusetobj_strprint() (which prepares a string representing a cpuset_t object) and cpusetobj_strscan() (which creates a valid cpuset_t starting from a string representation). - pc_cpumask and pc_other_cpus are target to be removed soon. With the moving from cpumask_t to cpuset_t they are now inefficient and not really useful. Anyway, for the time being, please note that access to pcpu datas is protected by sched_pin() in order to avoid migrating the CPU while reading more than one (possible) word - Please note that size of cpuset_t objects may differ between kernel and userland. While this is not directly related to the patch itself, it is good to understand that concept and possibly use the patch as a reference on how to deal with cpuset_t objects in userland, when accessing kernland members. - KTR_CPUMASK is changed and now is represented through a string, to be set as the example reported in NOTES.
Please additively note that no MAXCPU is bumped in this patch, but private testing has been done until to MAXCPU=128 on a real 8x8x2(htt) machine (amd64).
Please note that the FreeBSD version is not yet bumped because of the upcoming pcpu changes. However, note that this patch is not targeted for MFC.
People to thank for the time spent on this patch: - sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested several revision of the patches and really helped in improving stability of this work. - marius fixed several bugs in the sparc64 implementation and reviewed patches related to ktr. - jeff and jhb discussed the basic approach followed. - kib and marcel made targeted review on some specific part of the patch. - marius, art, nwhitehorn and andreast reviewed MD specific part of the patch. - marius, andreast, gonzo, nwhitehorn and jceel tested MD specific implementations of the patch. - Other people have made contributions on other patches that have been already committed and have been listed separately.
Companies that should be mentioned for having participated at several degrees: - Yahoo! for having offered the machines used for testing on big count of CPUs. - The FreeBSD Foundation for having sponsored my devsummit attendance, which has been instrumental. - Sandvine for having offered offices and infrastructure during development.
(I really hope I didn't forget anyone, if it happened I apologize in advance).
|
222671 |
04-Jun-2011 |
imp |
Add support for True IDE mode to the Octeon CF driver. This mode is signalled when the attribute address for the CF is 0 in the octeon sysinfo structure. In this mode, the DATA port is 16-bits, but the other ports are 8-bits, but on a 16-bit bus (so you have to access it a short at a time, but only believe the lower byte). See the code for more details on this slightly odd arrangement. I'm still not 100% happy with the abstractions here on many levels (starting with the globals for these settings, on down to no bus_space use, etc), but the driver had these problems before the change.
Also, clean up the code a bit to make this support easier, and the code a bit easier to read. I tried to follow existing style, but may have missed a few spots. Add some comments.
Fix probe/attach routine to return a proper error for the simulator.
With this change, my EBH5200 eval board now recognizes the CF well enough to boot to the login prompt. Before it would say it never became ready. My CN3010-EVB-HS5 still boots properly. My older CN3860-based board won't load the 64-bit kernel, either before or after the change, and I didn't chase that down.
|
222531 |
31-May-2011 |
nwhitehorn |
On multi-core, multi-threaded PPC systems, it is important that the threads be brought up in the order they are enumerated in the device tree (in particular, that thread 0 on each core be brought up first). The SLIST through which we loop to start the CPUs has all of its entries added with SLIST_INSERT_HEAD(), which means it is in reverse order of enumeration and so AP startup would always fail in such situations (causing a machine check or RTAS failure). Fix this by changing the SLIST into an STAILQ, and inserting new CPUs at the end.
Reviewed by: jhb
|
222234 |
23-May-2011 |
attilio |
Merge r221846 from largeSMP project branch: Fix arguments passing to _long() version of atomic function for mips.
The native implementation is bogus in that regard and offers the same problem solved for powerpc as r222198, but mips' guys just wanted a small and self-contained patch for mips rather than rewriting the whole support.
Reviewed by: art, imp Tested by: gonzo MFC after: 2 weeks
|
221855 |
13-May-2011 |
mdf |
Move the ZERO_REGION_SIZE to a machine-dependent file, as on many architectures (i386, for example) the virtual memory space may be constrained enough that 2MB is a large chunk. Use 64K for arches other than amd64 and ia64, with special handling for sparc64 due to differing hardware.
Also commit the comment changes to kmem_init_zero_region() that I missed due to not saving the file. (Darn the unfamiliar development environment).
Arch maintainers, please feel free to adjust ZERO_REGION_SIZE as you see fit.
Requested by: alc MFC after: 1 week MFC with: r221853
|
221753 |
11-May-2011 |
gonzo |
Use new option names for NFS client and NFS server
See UPDATING entry for 20110427
|
221518 |
06-May-2011 |
adrian |
Fix GPIO_MAXPINS calculation for the AR71xx, AR724x, AR913x SoC.
Submitted by: Luiz Otavio O Souza <loos.br@gmail.com>
|
221489 |
05-May-2011 |
adrian |
Add nvram2env (untested) and geom_map (tested) to PB92.
|
221407 |
03-May-2011 |
marius |
- Remove attempts to implement setting of BMCR_LOOP/MIIF_NOLOOP (reporting IFM_LOOP based on BMCR_LOOP is left in place though as it might provide useful for debugging). For most mii(4) drivers it was unclear whether the PHYs driven by them actually support loopback or not. Moreover, typically loopback mode also needs to be activated on the MAC, which none of the Ethernet drivers using mii(4) implements. Given that loopback media has no real use (and obviously hardly had a chance to actually work) besides for driver development (which just loopback mode should be sufficient for though, i.e one doesn't necessary need support for loopback media) support for it is just dropped as both NetBSD and OpenBSD already did quite some time ago. - Let mii_phy_add_media() also announce the support of IFM_NONE. - Restructure the PHY entry points to use a structure of entry points instead of discrete function pointers, and extend this to include a "reset" entry point. Make sure any PHY-specific reset routine is always used, and provide one for lxtphy(4) which disables MII interrupts (as is done for a few other PHYs we have drivers for). This includes changing NIC drivers which previously just called the generic mii_phy_reset() to now actually call the PHY-specific reset routine, which might be crucial in some cases. While at it, the redundant checks in these NIC drivers for mii->mii_instance not being zero before calling the reset routines were removed because as soon as one PHY driver attaches mii->mii_instance is incremented and we hardly can end up in their media change callbacks etc if no PHY driver has attached as mii_attach() would have failed in that case and not attach a miibus(4) instance. Consequently, NIC drivers now no longer should call mii_phy_reset() directly, so it was removed from EXPORT_SYMS. - Add a mii_phy_dev_attach() as a companion helper to mii_phy_dev_probe(). The purpose of that function is to perform the common steps to attach a PHY driver instance and to hook it up to the miibus(4) instance and to optionally also handle the probing, addition and initialization of the supported media. So all a PHY driver without any special requirements has to do in its bus attach method is to call mii_phy_dev_attach() along with PHY-specific MIIF_* flags, a pointer to its PHY functions and the add_media set to one. All PHY drivers were updated to take advantage of mii_phy_dev_attach() as appropriate. Along with these changes the capability mask was added to the mii_softc structure so PHY drivers taking advantage of mii_phy_dev_attach() but still handling media on their own do not need to fiddle with the MII attach arguments anyway. - Keep track of the PHY offset in the mii_softc structure. This is done for compatibility with NetBSD/OpenBSD. - Keep track of the PHY's OUI, model and revision in the mii_softc structure. Several PHY drivers require this information also after attaching and previously had to wrap their own softc around mii_softc. NetBSD/OpenBSD also keep track of the model and revision on their mii_softc structure. All PHY drivers were updated to take advantage as appropriate. - Convert the mebers of the MII data structure to unsigned where appropriate. This is partly inspired by NetBSD/OpenBSD. - According to IEEE 802.3-2002 the bits actually have to be reversed when mapping an OUI to the MII ID registers. All PHY drivers and miidevs where changed as necessary. Actually this now again allows to largely share miidevs with NetBSD, which fixed this problem already 9 years ago. Consequently miidevs was synced as far as possible. - Add MIIF_NOMANPAUSE and mii_phy_flowstatus() calls to drivers that weren't explicitly converted to support flow control before. It's unclear whether flow control actually works with these but typically it should and their net behavior should be more correct with these changes in place than without if the MAC driver sets MIIF_DOPAUSE.
Obtained from: NetBSD (partially) Reviewed by: yongari (earlier version), silence on arch@ and net@
|
221321 |
02-May-2011 |
adrian |
Add in the work-around for the AR8316 gige switch PHY.
This allows the ethernet to function on the PB92 board.
Submitted by: Luiz Otavio O Souza
|
221307 |
01-May-2011 |
adrian |
Some AR724x PCIe fixes, which should wrap up the first round of endian-ness issues with the AR724x.
From Luiz:
* Fix the bus space tag used so endian-ness is correctly handled; * Only do the workaround for the AR7240; AR7241/AR7242 (PB92) don't require this
From me:
* Add a read flush from openwrt
Submitted by: Luiz Otavio O Souza
|
221259 |
30-Apr-2011 |
adrian |
An example configuration file for the Atheros PB92.
TODO:
* pcie doesn't yet work properly, I'm working on it. * if_arge doesn't work - it's likely the phy mask is wrong; again I'm working on it.
|
221257 |
30-Apr-2011 |
adrian |
The AR724x SoC's require the irq status line to be acked/cleared.
This allows console IO to occur correctly once the kernel is in multi-user mode.
Submitted by: Luiz Otavio O Souza
|
221256 |
30-Apr-2011 |
adrian |
Call the DDR FIFO flush method when IP2 interrupts occur.
|
221255 |
30-Apr-2011 |
adrian |
Flip off debugging for now.
|
221254 |
30-Apr-2011 |
adrian |
Add some initial PCIe bridge support for the AR724x chipsets.
This is reported to work on the AR7240 based Ubiquiti Rocket M5 but I haven't tested it on that hardware. I also don't yet have it fully working on the AR7242 based development board here; probe/attach functions but the register space resource looks like the endian-ness is wrong (0x10000000 instead of 0x00001000).o
Further digging will be required.
Submitted by: Luiz Otavio O Souza
|
221252 |
30-Apr-2011 |
adrian |
In preparation for the AR724x PCIe bus code, make the AR71xx PCI bus glue require 'device ar71xx_pci' .
Users of the AR71xx board configs will now require this for functioning PCI:
device pci device ar71xx_pci
|
221240 |
30-Apr-2011 |
adrian |
Add a missing DDR FIFO method for the ar71xx.
|
221218 |
29-Apr-2011 |
jhb |
Change rman_manage_region() to actually honor the rm_start and rm_end constraints on the rman and reject attempts to manage a region that is out of range. - Fix various places that set rm_end incorrectly (to ~0 or ~0u instead of ~0ul). - To preserve existing behavior, change rman_init() to set rm_start and rm_end to allow managing the full range (0 to ~0ul) if they are not set by the caller when rman_init() is called.
|
221198 |
29-Apr-2011 |
adrian |
Tidy up the naming of the ip2 DDR flush routine, and add an inline accessor method (which is currently unused) in there.
|
221173 |
28-Apr-2011 |
attilio |
Add the watchdogs patting during the (shutdown time) disk syncing and disk dumping. With the option SW_WATCHDOG on, these operations are doomed to let watchdog fire, fi they take too long.
I implemented the stubs this way because I really want wdog_kern_* KPI to not be dependant by SW_WATCHDOG being on (and really, the option only enables watchdog activation in hardclock) and also avoid to call them when not necessary (avoiding not-volountary watchdog activations).
Sponsored by: Sandvine Incorporated Discussed with: emaste, des MFC after: 2 weeks
|
221164 |
28-Apr-2011 |
adrian |
Re-enable the wireless build parameters for the AR9130 WMAC.
* enable 11n * add ath_ahb so the AHB<->ath glue is linked in * disable descriptor order swapping, it isn't needed here * disable interrupt mitigation, it isn't supported here
|
221160 |
28-Apr-2011 |
adrian |
Add the IP2 DDR flush handlers.
These aren't yet used in the interrupt handler path but should be.
|
221071 |
26-Apr-2011 |
mav |
- Add shim to simplify migration to the CAM-based ATA. For each new adaX device in /dev/ create symbolic link with adY name, trying to mimic old ATA numbering. Imitation is not complete, but should be enough in most cases to mount file systems without touching /etc/fstab. - To know what behavior to mimic, restore ATA_STATIC_ID option in cases where it was present before. - Add some more details to UPDATING.
|
220982 |
24-Apr-2011 |
mav |
Switch the GENERIC kernels for all architectures to the new CAM-based ATA stack. It means that all legacy ATA drivers are disabled and replaced by respective CAM drivers. If you are using ATA device names in /etc/fstab or other places, make sure to update them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential numbers for each type in order of detection, unless configured otherwise with tunables, see cam(4)).
ataraid(4) functionality is now supported by the RAID GEOM class. To use it you can load geom_raid kernel module and use graid(8) tool for management. Instead of /dev/arX device names, use /dev/raid/rX.
|
220558 |
12-Apr-2011 |
hselasky |
We don't need to call EOWRITE4(sc, EHCI_USBINTR, 0) directly from each EHCI bus driver at detach, hence ehci_detach() does exactly this since r199718.
Submitted by: Luiz Otavio O Souza MFC after: 7 days Approved by: thompsa (mentor)
|
220357 |
05-Apr-2011 |
adrian |
if_arge has had a strange bug that only appears during high traffic levels. TX would hang, RX wouldn't. A bit of digging showed the interface send queue was full, but IFF_DRV_OACTIVE was clear and the hardware TX queue was empty.
It turns out that there wasn't a check to drain the interface send queue once hardware TX had completed, so if the interface send queue had filled up in the meantime, subsequent packets would be dropped by the higher layers and if_start (and thus arge_start()) would never be called.
The fix is simple - call arge_start_locked() in the software interrupt handler after the hardware TX queue has been handled or a TX underrun occured. This way the interface send queue gets drained.
|
220356 |
05-Apr-2011 |
adrian |
* Add some more debugging to if_arge * Make doubly sure that IFF_DRV_OACTIVE is set if the hardware TX queue is full
|
220355 |
05-Apr-2011 |
adrian |
Put the ARGE_DEBUG behind a kernel config option.
|
220354 |
05-Apr-2011 |
adrian |
Begin fleshing out a functioning debugging setup for if_arge.
I'm seeing TX hangs when doing large amounts of TX traffic; an interface reset fixes it. This will hopefully help me identify why.
|
220303 |
03-Apr-2011 |
hselasky |
- Correct EHCI interrupt disabling at detach.
Submitted by: Luiz Otavio O Souza MFC after: 7 days Approved by: thompsa (mentor)
|
220297 |
03-Apr-2011 |
adrian |
Import the initial CPU support for the MIPS RALink RT305x SoC. This is a MIPS4KC CPU with various embedded peripherals, including wireless and ethernet support.
This commit includes the platform, UART, ethernet MAC and GPIO support. The interrupt-driven GPIO code is disabled for now pending GPIO changes from the submitter.
Submitted by: Aleksandr Rybalko <ray@dlink.ua>
|
220296 |
03-Apr-2011 |
adrian |
Add in some missing flags in the EHCI initialisation code, needed to get USB working on the AR913x/AR724x.
|
220295 |
03-Apr-2011 |
adrian |
Commit configuration files for the AR913x SoC and the TP-Link WR-1043ND.
The AR91XX_BASE{,.hints} files define all the common parameters for the AR913x SoC systems.
The TP-1043ND config file adds local parameters.
|
220260 |
02-Apr-2011 |
adrian |
A handful of the openwrt devices use a MAC address that's at a hard-coded offset in the flash.
Some devices (eg the TPLink WR-1043ND) don't have a flash environment partition which can be queried for the current board settings.
This particular workaround allows for image creators to use a hint to set the base MAC address. For example:
hint.arge.0.eeprommac=0x1f01fc00
|
220185 |
31-Mar-2011 |
adrian |
Break out the ath PCI logic into a separate device/module.
Introduce the AHB glue for Atheros embedded systems. Right now it's hard-coded for the AR9130 chip whose support isn't yet in this HAL; it'll be added in a subsequent commit.
Kernel configuration files now need both 'ath' and 'ath_pci' devices; both modules need to be loaded for the ath device to work.
|
220180 |
31-Mar-2011 |
adrian |
Implement AR724x USB initialisation code.
This (again) still requires an offset for the AR913x/AR724x before USB will function.
Submitted by: Luiz Otavio O Souzau <loos.br@gmail.com>
|
220096 |
28-Mar-2011 |
adrian |
The previous commit didn't completely rename this to what it should be.
|
220056 |
27-Mar-2011 |
adrian |
Refactor out the ar71xx mac address code into something that's just for Redboot.
At some point we're going to need to build options for different boot environments - for example, the UBoot setups I've seen simply have the MAC address hard-coded at a fixed location in flash. The OpenWRT support simply yanks the if_arge MAC directly from that in code, rather than trying to find a uboot environment to pull it from.
|
220052 |
27-Mar-2011 |
adrian |
Add an option - AR71XX_REALMEM - which overrides the amount of memory detected from Redboot, or overrides the "otherwise" case if no Redboot information was found.
Some AR71XX platforms don't use Redboot (eg TP-LINK devices using UBoot; some later Ubiquiti devices which apparently also use UBoot) and at least one plain out lies - the Ubiquiti LS-SR71A Redboot says there's 16mb of RAM when in fact there's 32mb.
A more "clean" solution will be needed at a later date.
|
220051 |
27-Mar-2011 |
adrian |
Add some missing flags needed for AR913x/AR724x USB to correctly operate.
The AR913x/AR724x USB lives at a different offset to the AR71xx USB, so this needs to be either adjusted for in a subsequent commit, or updated in hints for kernels compiled for those platforms.
Submitted by: Luiz Otavio O Souzau <loos.br@gmail.com>
|
219775 |
19-Mar-2011 |
bz |
For now remove options FLOWTABLE from the remaining GENERIC kernel configurations and make it opt-in for those who want it. LINT will still build it.
While it may be a perfect win in some scenarios, it still troubles users (see PRs) in general cases. In addition we are still allocating resources even if disabled by sysctl and still leak arp/nd6 entries in case of interface destruction.
Discussed with: qingli (2010-11-24, just never executed) Discussed with: juli (OCTEON1) PR: kern/148018, kern/155604, kern/144917, kern/146792 MFC after: 2 weeks
|
219706 |
16-Mar-2011 |
jmallett |
o) Set MAC addresses starting at the MAC base for all management ports, not just the MR-730. o) Start MAC addresses for the non-management ports after the management ports.
Submitted by: Bhanu Prakash (with modifications)
|
219695 |
16-Mar-2011 |
jmallett |
o) Tear down receive interrupt on detach.
Submitted by: Bhanu Prakash
|
219694 |
16-Mar-2011 |
jmallett |
o) Clean up FPA pools on module unload. o) Allocate output buffer pool based on available output queues.
Submitted by: Bhanu Prakash (with modifications)
|
219693 |
16-Mar-2011 |
jmallett |
o) Properly size caches and TLB on Octeon. o) Make COP0_SYNC do nothing on Octeon, which is fully interlocked.
Submitted by: Bhanu Prakash (with modifications)
|
219592 |
13-Mar-2011 |
adrian |
* Add wireless MAC reset, in prep for bringing over AR9130 support. * Whilst I'm here, reformat to fit inside 80 characters.
|
219591 |
13-Mar-2011 |
adrian |
Add the missing AR724x DDR flush routines for if_arge0.
Submitted by: Luiz Otavio O Souza
|
219590 |
13-Mar-2011 |
adrian |
Fix the TX underrun status reset; remove a now unused variable.
Submitted by: Luiz Otavio O Souza
|
219589 |
13-Mar-2011 |
adrian |
Commit FIFO configuration fixes from OpenWRT. This fixes performance issues with if_arge on the AR913x and AR724x.
Reference: https://dev.openwrt.org/ticket/6754 Submitted by: Luiz Otavio O Souza
|
219405 |
08-Mar-2011 |
dchagin |
Extend struct sysvec with new method sv_schedtail, which is used for an explicit process at fork trampoline path instead of eventhadler(schedtail) invocation for each child process.
Remove eventhandler(schedtail) code and change linux ABI to use newly added sysvec method.
While here replace explicit comparing of module sysentvec structure with the newly created process sysentvec to detect the linux ABI.
Discussed with: kib
MFC after: 2 Week
|
219122 |
01-Mar-2011 |
jchandra |
Increase NKPT in case of n32 and n64 to support more physical memory.
On n32, vm_page_startup() needs more virtual mem to map vm_page structs. The new value of 256 will allow us to support 16GB RAM.
|
219121 |
01-Mar-2011 |
jchandra |
Use new thread's stack to invoke pmap_activate in cpu_switch()
Restore the SP from the new thread's PCB before calling pmap_activate. Remove some old FIXME comments.
|
219106 |
28-Feb-2011 |
jchandra |
Use correct types and fromats for physical address
- Use vm_paddr_t for pa in pmap_steal_memory() - Use uintmax_t and %jx to ensure that physical address are printed correctly in cpu_startup() and pmap_bootstrap()
|
219103 |
28-Feb-2011 |
jchandra |
Use vm_offset_t for virtual addresses.
The unsigned int type used now is incorrect in n64 compilation.
|
218909 |
21-Feb-2011 |
brucec |
Fix typos - remove duplicate "the".
PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
|
218773 |
17-Feb-2011 |
alc |
Remove pmap fields that are either unused or not fully implemented.
Discussed with: kib
|
218594 |
12-Feb-2011 |
jmallett |
The Lanner MR-730 uses the first two MACs at its MAC base for the 10/100 management ports, and gigabit ports start at an offset of 2 from the MAC base.
|
218591 |
12-Feb-2011 |
jmallett |
Allow the platform code to return a bitmask of running cores rather than just a number of cores, this allows for a sparse set of CPUs. Implement support for sparse core masks on Octeon.
XXX jeff@ suggests that all_cpus should include cores that are offline or running other applications/OSes, so the platform API should be further extended to allow us to set all_cpus to include all cores that are physically-present as opposed to only those that are running FreeBSD.
Submitted by: Bhanu Prakash (with modifications) Reviewed by: jchandra Glanced at by: kib, jeff, jhb
|
218383 |
06-Feb-2011 |
jmallett |
o) Cavium Octeon doesn't need nop barriers. o) Have mips_wblush just do syncw, not sync on Cavium Octeon. o) Add support for reading and writing some Octeon-specific registers. NB: Some of these are not entirely Octeon-specific.
Submitted by: Bhanu Prakash
|
218266 |
04-Feb-2011 |
tijl |
Replace __LP64__ with __mips_n64. This partly reverts r217147.
Requested by: jmallett, imp Approved by: kib (mentor)
|
218195 |
02-Feb-2011 |
mdf |
Put the general logic for being a CPU hog into a new function should_yield(). Use this in various places. Encapsulate the common case of check-and-yield into a new function maybe_yield().
Change several checks for a magic number of iterations to use should_yield() instead.
MFC after: 1 week
|
217944 |
27-Jan-2011 |
jchandra |
Implement sf_buf using direct map (XKPHYS) in MIPS n64.
- Provide trivial implementation of sf_buf_alloc(), sf_buf_free(), sf_buf_kva() and sf_buf_page() using direct map for n64. - uio_machdep.c - use macros so that the direct map will be used in case of n64.
Reviewed by: imp (earlier version) Obtained from: jmallett (user/jmallett/octeon)
|
217688 |
21-Jan-2011 |
pluknet |
Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize.
Submitted by: perryh pluto.rain.com (previous version) Reviewed by: jhb Approved by: kib (mentor) Tested by: universe
|
217665 |
20-Jan-2011 |
jmallett |
If there is no WQE available for a packet that needs segmentation, drop it and return.
|
217664 |
20-Jan-2011 |
jmallett |
Remove some compile-time options from the driver, particularly async IOBDMA support which is unused on FreeBSD and which complicates working on the code now, can easily be added back later by someone determined to use it.
|
217653 |
20-Jan-2011 |
imp |
Use simplified ldscripts rather than specific ones
|
217636 |
20-Jan-2011 |
jchandra |
Move 'cpu CPU_RMI' to std.xlr, this is common for all XLR cpus.
|
217630 |
20-Jan-2011 |
jchandra |
Re-format XLR configuartion files and remove obsolete options.
|
217626 |
20-Jan-2011 |
jchandra |
ldscript and conf cleanup for MIPS
- Remove sys/conf/ldscript.mips.64 and sys/conf/ldscript.mips.n32 and use ldscript.mips for all ABIs. The default OUTPUT_FORMAT of the toolchain is correct. - Remove LDSCRIPT_NAME entires from XLR n32 and n64 conf files. - Remove TARGET_BIG_ENDIAN from XLR conf files. - Fix machine entry in XLRN32
|
217625 |
20-Jan-2011 |
jchandra |
Fixes in the XLR platform code
- Fix bug in pic.h, assign reg variable, before return. - In xlr_pci.c, need to ignore the result of mmio read.
|
217620 |
20-Jan-2011 |
gonzo |
Fix build by changing format for size_t to %jd
|
217616 |
19-Jan-2011 |
mdf |
Introduce signed and unsigned version of CTLTYPE_QUAD, renaming existing uses. Rename sysctl_handle_quad() to sysctl_handle_64().
|
217607 |
19-Jan-2011 |
jmallett |
Fix format of physical addresses; this fixes the n32 build.
|
217573 |
19-Jan-2011 |
jmallett |
Don't do a device_identify to add uart0, it's already hinted.
Reported by: imp
|
217561 |
18-Jan-2011 |
kib |
For architectures not using direct map , and requiring real KVA page for sf buf allocation, use wakeup() instead of wakeup_one() to notify sf buffer waiters about free buffer.
sf_buf_alloc() calls msleep(PCATCH) when SFB_CATCH flag was given, and for simultaneous wakeup and signal delivery, msleep() returns EINTR/ERESTART despite the thread was selected for wakeup_one(). As result, we loose a wakeup, and some other waiter will not be woken up.
Reported and tested by: az Reviewed by: alc, jhb MFC after: 1 week
|
217519 |
17-Jan-2011 |
jkim |
Remove empty dev_mem_md_init() stubs.
|
217518 |
17-Jan-2011 |
imp |
Save the CPU model, the board and the CPU clock rate so they are reported by the approrpiate sysctl.
|
217517 |
17-Jan-2011 |
imp |
Kill redundant cpu line
|
217516 |
17-Jan-2011 |
imp |
Make cpu_model public (otherwise there's no way to set it) and bump it to 80 characters. Add hw.board to export board information, if known, from the mips kernel.
|
217515 |
17-Jan-2011 |
jkim |
Add reader/writer lock around mem_range_attr_get() and mem_range_attr_set(). Compile sys/dev/mem/memutil.c for all supported platforms and remove now unnecessary dev_mem_md_init(). Consistently define mem_range_softc from mem.c for all platforms. Add missing #include guards for machine/memdev.h and sys/memrange.h. Clean up some nearby style(9) nits.
MFC after: 1 month
|
217354 |
13-Jan-2011 |
jchandra |
Support for 64 bit PTEs on n32 and n64 compilation.
In n32 and n64, add support for physical address above 4GB by having 64 bit page table entries and physical addresses. Major changes are: - param.h: update PTE sizes, masks and shift values to support 64 bit PTEs. - param.h: remove DELAY(), mips_btop(same as atop), mips_ptob (same as ptoa), and reformat. - param.h: remove casting to unsigned long in trunc_page and round_page since this will be used on physical addresses. - _types.h: have 64 bit __vm_paddr_t for n32. - pte.h: update TLB LO0/1 access macros to support 64 bit PTE - pte.h: assembly macros for PTE operations. - proc.h: md_upte is now 64 bit for n32 and n64. - exception.S and swtch.S: use the new PTE macros for PTE operations. - cpufunc.h: TLB_LO0/1 registers are 64bit for n32 and n64. - xlr_machdep.c: Add memory segments above 4GB to phys_avail[] as they are supported now.
Reviewed by: jmallett (earlier version)
|
217345 |
13-Jan-2011 |
jchandra |
Cleanup physical address and PTE types on MIPS.
1. Use vm_paddr_t for physical addresses.
There are a few places in the MIPS platform code where vm_offset_t is used for physical addresses, change these to use vm_paddr_t: - phys_avail[], physmem_desc[] arrays - pmap_mapdev(), page_is_managed(), is_cacheable_mem() pmap_map() args - local variables of various pmap functions
2. Change init_pte_prot() return from int to pt_entry_t, as this can be 64 bit when using 64 bit TLB entries.
3. Update printing of pt_entry_t and of vm_paddr_t to use 'j' format with uintmax_t. This will be useful later if we plan to use 64bit phsical addr on 32 bit n32 compilation.
Reviewed by: imp
|
217304 |
12-Jan-2011 |
jchandra |
The message ring interrupt needs to be enabled for all cpus, not just the ones which run the message ring handler.
Some bits of the interrupt mask are part of the status register which is saved with the process context, and these bits are initialized from the cpu on which the process is created. This means that all the processes should have the same value for these interrupt mask bits, so that the interrupt mask remains the same regardless of what thread is scheduled on the cpu.
Submitted by: Sriram Gorti (srgorti at netlogicmicro dot com)
|
217265 |
11-Jan-2011 |
jhb |
Remove unneeded includes of <sys/linker_set.h>. Other headers that use it internally contain nested includes.
Reviewed by: bde
|
217254 |
11-Jan-2011 |
jmallett |
Initialize PCIe buses and add preliminary support for 64-bit BARs.
|
217244 |
10-Jan-2011 |
jmallett |
Count output bytes and packets.
|
217243 |
10-Jan-2011 |
jmallett |
Shorten device name so it fits into vmstat -i.
|
217222 |
10-Jan-2011 |
jmallett |
o) Free mbufs in error cases. o) Clear/acknowledge receive interrupt at end of thread. This gives the management interfaces performance on the order of 100Mbps rather than the previous level of 10Mbps on my MR-730.
|
217214 |
10-Jan-2011 |
jmallett |
o) Expand the CIU driver to be aware of newly-allocated parts of the IRQ range. o) Add 'octm', a trivial driver for the 10/100 management ports found on some Octeon systems. o) Make the Simple Executive's management port helper routines compile on FreeBSD (namely by not doing math on void pointers.) o) Add a cvmx_mgmt_port_sendm routine to the Simple Executive to send an mbuf so there is only one copy in the transmit path, rather than having to first copy the mbuf to an intermediate buffer and then copy that to the Simple Executive's transmit ring. o) Properly work out MII addresses of management ports on the Lanner MR-730. XXX The MR-730 also needs some patches to the MII read/write routines, but this is sufficient for now. Media detection will be fixed in the future when I can spend more time reading the vendor-supplied patches.
|
217212 |
09-Jan-2011 |
jmallett |
Now that we correctly enable rx interrupts on all cores, performance has gotten quite awful, because e.g. 4 packets will come in and get processed on 4 different cores at the same time, really battling with the TCP stack quite painfully. For now, just run one task at a time.
This gets performance up in most cases to where it was before the correctness fixes that got interrupts to run on all cores (except in high-load TCP transmit cases where all we're handling receive for is ACKs) and in some cases it's better now. What would be ideal would be to use a more advanced interrupt mitigation strategy and possibly to use different workqueue groups per port for multi-port systems, and so on, but this is a fine stopgap.
|
217210 |
09-Jan-2011 |
jmallett |
o) Remove some unused local definitions of IP protocol numbers. o) Use CPU_FOREACH rather than a miscrafted for loop with an off-by-one to enable workq interrupts on all cores.
|
217192 |
09-Jan-2011 |
kib |
Move repeated MAXSLP definition from machine/vmparam.h to sys/vmmeter.h. Update the outdated comments describing MAXSLP and the process selection algorithm for swap out.
Comments wording and reviewed by: alc
|
217184 |
09-Jan-2011 |
adrian |
Add missing ar91xx definition for the WMAC reset control.
|
217156 |
08-Jan-2011 |
tijl |
White space changes to align comments. The mips and powerpc _inttypes.h are now exactly the same.
Approved by: kib (mentor)
|
217155 |
08-Jan-2011 |
tijl |
Rename PRIreg helper macro to PRIptr to better reflect its use. Registers and pointers don't always have the same size, e.g. the __mips_n32 ABI (ILP32) has 64 bit registers but 32 bit pointers.
On mips introduce PRIptr to fix the format specifier for (u)intptr_t.
Prefix PRI64 and PRIptr with underscores because macro names starting with PRI[a-zX] are reserved for future use.
Approved by: kib (mentor)
|
217147 |
08-Jan-2011 |
tijl |
On mixed 32/64 bit architectures (mips, powerpc) use __LP64__ rather than architecture macros (__mips_n64, __powerpc64__) when 64 bit types (and corresponding macros) are different from 32 bit. [1]
Correct the type of INT64_MIN, INT64_MAX and UINT64_MAX.
Define (U)INTMAX_C as an alias for (U)INT64_C matching the type definition for (u)intmax_t. Do this on all architectures for consistency.
Suggested by: bde [1] Approved by: kib (mentor)
|
217146 |
08-Jan-2011 |
tijl |
On 32 bit architectures define (u)int64_t as (unsigned) long long instead of (unsigned) int __attribute__((__mode__(__DI__))). This aligns better with macros such as (U)INT64_C, (U)INT64_MAX, etc. which assume (u)int64_t has type (unsigned) long long.
The mode attribute was used because long long wasn't standardised until C99. Nowadays compilers should support long long and use of the mode attribute is discouraged according to GCC Internals documentation.
The type definition has to be marked with __extension__ to support compilation with "-std=c89 -pedantic".
Discussed with: bde Approved by: kib (mentor)
|
217145 |
08-Jan-2011 |
tijl |
Fix types of some values in machine/_limits.h.
On some architectures UCHAR_MAX and USHRT_MAX had type unsigned int. However, lacking integer suffixes for types smaller than int, their type should correspond to that of an object of type unsigned char (or short) when used in an expression with objects of type int. In that case unsigned char (short) are promoted to int (i.e. signed) so the type of UCHAR_MAX and USHRT_MAX should also be int.
Where MIN/MAX constants implicitly have the correct type the suffix has been removed.
While here, correct some comments.
Reviewed by: bde Approved by: kib (mentor)
|
217128 |
07-Jan-2011 |
tijl |
Remove unused support for 64 bit long on 32 bit architectures.
It was used mainly to discover and fix some 64-bit portability problems before 64-bit arches were widely available.
Discussed with: bde Approved by: kib (mentor)
|
217097 |
07-Jan-2011 |
kib |
Add AT_STACKPROT elf aux vector. Will be used to inform rtld about the initial stack protection set by the kernel image activator.
|
217072 |
06-Jan-2011 |
jhb |
Remove bogus usage of INTR_FAST. "Fast" interrupts are now indicated by registering a filter handler rather than a threaded handler. Also remove a bogus use of INTR_MPSAFE for a filter.
|
216972 |
04-Jan-2011 |
jmallett |
Correct an 8-year-old typo which reliably leads to typo after typo today:
The macros here for generating coprocessor 0 accessors are named like:
MIPS_RDRW32_COP0
That macro would produce mips_rd_<register>() and mips_wr_<register>() inlines to access the specified register by name from C. The problem is that the R and the W were swapped in the macros originally; it was meant to be named RDWR because it generated mips_rd_* and mips_wr_* functions, but was instead spelled RDRW, which nobody should be expected to get right by anything other than copy and paste.
It's too many consonants in a row to keep straight anyway, so just prefer e.g.:
MIPS_RW32_COP0
While here, add a missing #undef.
|
216969 |
04-Jan-2011 |
jmallett |
Remove OCTEON1-32. Since moving to the Cavium SDK, we've lost our support for running an o32 kernel safely, and would have to add interrupt disabling and reenabling to a bunch of macros in the Simple Executive sources to support it.
The only reason one would run an o32 kernel on Octeon would be to run o32 world, which is better worked towards by adding o32 binary compatibility to n64 kernels along with, eventually, supporting multilib systems so o32 binaries can run alongside n32 and n64 ones.
Discussed with: imp
|
216947 |
04-Jan-2011 |
jmallett |
o) Add MIPS_COP_0_EXC_PC accessors to <machine/cpufunc.h>. o) Make the octeon_wdog driver work on multi-CPU systems and to also print more information on NMI that may aid debugging. Simplify and clean up internal API and structure.
|
216946 |
04-Jan-2011 |
jmallett |
o) Unmask Central Interrupt Unit interrupts on APs, too. o) There's no good reason to make the low bits of the ebase the core number. While per-CPU exception bases would be nice, for now we just need to make ebase the same on all cores.
|
216862 |
01-Jan-2011 |
jmallett |
o) When trying to determine whether the pcpu pointer is a managed address, check not just that it is greater than the minimal kernel virtual address, but also that it is less than the maximal kernel virtual address. On n64 kernels, the pcpup comes out of a direct-mapped address that, with an unsigned compare, is rather greater than the minimal kernel virtual address. o) Turn the panic if interrupts are disabled in cpu_idle into a KASSERT since on other architectures it's behind INVARIANTS anyway. o) Add a check that not all interrupts are masked, too. o) Add cpu_idleclock() and cpu_activeclock() use to cpu_idle as is done on other architectures.
|
216773 |
28-Dec-2010 |
jmallett |
When allocating memory from bootmem for the kernel to use, try to leave about 2MB of memory in the bootmem allocator for the SDK to use internally at a later point. It'd be nice if there were some functions we could call before allocating memory to let various facilities reserve some memory, but for now this seems sufficient. Previously some unfortunate systems could give up all (or at least most) of their memory to the kernel from bootmem, and then allocating command queues for packet output and the like would fail later in the boot process (which in turn would lead to crashes even later.)
Reported by: kan
|
216671 |
22-Dec-2010 |
nwhitehorn |
Include std.sentry5 from the SENTRY5 kernel configuration. This was apparently missed in r215270.
|
216476 |
16-Dec-2010 |
jmallett |
o) Add support for the Lanner MR-321X/MR-325, which is just a modified MR-320. o) On the Lanner MR-730, disable PCIe lane swap, per vendor.
|
216475 |
16-Dec-2010 |
gonzo |
- include argument should be in quotes
|
216474 |
16-Dec-2010 |
jchandra |
Make the ELF trampoline binary ELF executable (and do some cleanup).
- Remove the -shared flag for the trampoline binary, generate an ELF executable instead of a shared object. - No need to generate tmphack.S, move the code to sys/mips/mips/inckern.S - No need generate opt_kernname.h, KERNNAME can be passed with -D
Reviewed by: gonzo, imp
|
216410 |
13-Dec-2010 |
jchandra |
Updates for I2C devices on XLR engg boards.
- ds1374u : use multi-byte write. - at24co2n, max6657: remove mutex, iicbus has the necessary locking.
Submitted by: Sreekanth M. S. (kanthms at netlogicmicro com)
|
216408 |
13-Dec-2010 |
avg |
fix mips build breakage introduced in r216375: atomic_store_int doesn't exists
1) 32-bit assignment are expected to always be atomic. 2) Release/acquire memory barrier semantics doesn't seem to be needed here. So a simple assignment can be used.
Remove unused port_set_counter() while here, it also used to mis-use atomic_set_int().
Reported by: jhb Pointyhat to: avg MFC after: 3 weeks
|
216390 |
12-Dec-2010 |
jchandra |
I2C drivers for XLR/XLS processors.
- Major update to xlr_i2c.c: do multi-byte ops correctly, remove unnecessary code, add mutex to protect bus operations, style(9) fixes. - Drivers for I2C devices on XLR/XLS engineering boards, ds1374u RTC, max6657 temparature sensor and at24co2n EEPROM.
Submitted by: Sreekanth M. S. (kanthms at netlogicmicro com)
|
216375 |
11-Dec-2010 |
avg |
fix atomic_set_xxx misuse in rge
It seems that atomic_set_xxx and atomic_store_xxx were confused.
Reviewed by: jhb (general issue) MFC after: 3 weeks
|
216324 |
09-Dec-2010 |
jchandra |
Fix compilation when DEBUG option is enabled.
- remove unused code in mips/rmi/xlr_pci.c - remove unused variable in mips/rmi/dev/nlge/if_nlge.c - fix reference to old function in mips/mips/pmap.c
Reported by: Prabhath Raman (prabhath at netlogicmicro com)
|
216320 |
09-Dec-2010 |
gonzo |
- dump_avail layout should be sequence of [start, end) pairs, not <start, size>.
Spotted by: alc@
|
216318 |
09-Dec-2010 |
gonzo |
- Populate dump_avail with proper values from phys_avail
|
216317 |
09-Dec-2010 |
jchandra |
swi_vm() for mips.
|
216315 |
09-Dec-2010 |
jchandra |
UMA_MD_SMALL_ALLOC for mips.
Implement uma_small_alloc() and uma_small_free() for mips that allocates pages from direct mapped memory. Uses the same mechanism as the page table page allocator, so that we allocate from KSEG0 in 32 bit, and from XKPHYS on 64 bit.
Reviewed by: alc, jmallett
|
216227 |
06-Dec-2010 |
kevlo |
Fix double ;;
|
216157 |
03-Dec-2010 |
jchandra |
1. Fix off by one errors in calls to MIPS_DIRECT_MAPPABLE, reported by alc@ 2. Remove unnecessary #defines from vmparam.h
Submitted by: alc (2) Reviewed by: alc (1)
|
216148 |
03-Dec-2010 |
jchandra |
Fixup for r216141, dump_add_page needs to be non-static now. Add it to sys/mips/include/md_var.h, make dump_drop_page non-static too for completeness.
|
216143 |
03-Dec-2010 |
brucec |
Revert r216134. This checkin broke platforms where bus_space are macros: they need to be a single statement, and do { } while (0) doesn't work in this situation so revert until a solution can be devised.
|
216134 |
02-Dec-2010 |
brucec |
Disallow passing in a count of zero bytes to the bus_space(9) functions.
Passing a count of zero on i386 and amd64 for [I386|AMD64]_BUS_SPACE_MEM causes a crash/hang since the 'loop' instruction decrements the counter before checking if it's zero.
PR: kern/80980 Discussed with: jhb
|
216092 |
01-Dec-2010 |
jmallett |
Add interrupt describing and binding to CIU.
|
216071 |
30-Nov-2010 |
jmallett |
Run all poll requests through a single function that can either do the generic link state polling or media-specific ones, while avoidiing changing link state on interfaces that use miibus; this substantially speeds up link time on interface (re)initialization.
|
216069 |
30-Nov-2010 |
jmallett |
Display some Octeon 2 features and a feature for distinguishing between PCIe implementations.
|
216064 |
29-Nov-2010 |
jmallett |
Don't free the work queue entry that we're using to hold the scatter-gather list on exit from the transmit path. The scatter-gather list itself can be asynchronously DMAed to the transmit hardware, and we could actually lock up the transmitter if any of a number of races around this were lost.
Instead, let the PKO free the scatter-gather list when it is done with it, and use the "i" bit in each segment of the packet to avoid having them go into the FPA.
This fixes an unrecoverable transmit stall under transmit load.
MFC after: 3 days
|
215990 |
28-Nov-2010 |
jmallett |
Merge Cavium Octeon SDK 2.0 Simple Executive; this brings some fixes and new facilities as well as support for the Octeon 2 family of SoCs.
XXX Note that with our antediluvian assembler, we can't support some Octeon 2 instructions and fall back to using the old ones instead.
|
215989 |
28-Nov-2010 |
gonzo |
- Add watchdog driver for Cavium Octeon. At the moment only UP systems are supported.
|
215974 |
28-Nov-2010 |
jmallett |
o) Remove some commented out or unimplemented code. o) Remove some options that are configurable on Linux but not FreeBSD. o) Centralize open/poll/stop routines for XAUI and SGMII and use the common uninit routine directly rather than providing a wrapper for it. The init functions for these interfaces are now identical and the common init routine could merge in setting those function pointers except that some hardware seems to use no open/poll/stop method?
|
215973 |
28-Nov-2010 |
jchandra |
Fix issue noted by alc while reviewing r215938: The current implementation of vm_page_alloc_freelist() does not handle order > 0 correctly. Remove order parameter to the function and use it only for order 0 pages.
Submitted by: alc
|
215971 |
28-Nov-2010 |
jmallett |
Set MACHINE_ARCH based on ABI and endianness.
Reviewed by: imp
|
215959 |
28-Nov-2010 |
jmallett |
Remove unused and broken code to implement POW send and POW-only devices; a separate POW driver makes more sense, generally.
|
215957 |
27-Nov-2010 |
jmallett |
Use if_transmit to avoid ifq locking in transmit path.
|
215939 |
27-Nov-2010 |
jchandra |
Use if_transmit method instead of if_start, this avoids the interface queue lock. Use the hardware IP checksum verification on receive.
Submitted by: Sriram Gorti (srgorti at netlogicmicro dot com)
|
215701 |
22-Nov-2010 |
dim |
After some off-list discussion, revert a number of changes to the DPCPU_DEFINE and VNET_DEFINE macros, as these cause problems for various people working on the affected files. A better long-term solution is still being considered. This reversal may give some modules empty set_pcpu or set_vnet sections, but these are harmless.
Changes reverted:
------------------------------------------------------------------------ r215318 | dim | 2010-11-14 21:40:55 +0100 (Sun, 14 Nov 2010) | 4 lines
Instead of unconditionally emitting .globl's for the __start_set_xxx and __stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu sections are actually defined.
------------------------------------------------------------------------ r215317 | dim | 2010-11-14 21:38:11 +0100 (Sun, 14 Nov 2010) | 3 lines
Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout the tree.
------------------------------------------------------------------------ r215316 | dim | 2010-11-14 21:23:02 +0100 (Sun, 14 Nov 2010) | 2 lines
Add macros to define static instances of VNET_DEFINE and DPCPU_DEFINE.
|
215317 |
14-Nov-2010 |
dim |
Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout the tree.
|
215270 |
13-Nov-2010 |
imp |
Remove the 'machine mips' from DEFAULTS. Put the proper 'machine mips mipsel' or 'machine mips mipseb' into the config file (with a few 64's tossed in for good measure). This will let us build the proper kernels with different worlds as part of make universe.
|
215085 |
10-Nov-2010 |
jchandra |
Switch to the new network driver nlge, the old rge driver is deprecated now.
|
215068 |
10-Nov-2010 |
imp |
rename SWARM_COMMON to std.SWARM so universe doesn't try to build it standalone
|
215054 |
09-Nov-2010 |
jhb |
- Remove <machine/mutex.h>. Most of the headers were empty, and the contents of the ones that were not empty were stale and unused. - Now that <machine/mutex.h> no longer exists, there is no need to allow it to override various helper macros in <sys/mutex.h>. - Rename various helper macros for low-level operations on mutexes to live in the _mtx_* or __mtx_* namespaces. While here, change the names to more closely match the real API functions they are backing. - Drop support for including <sys/mutex.h> in assembly source files.
Suggested by: bde (1, 2)
|
215034 |
09-Nov-2010 |
brucec |
Fix typos.
PR: bin/148894 Submitted by: olgeni
|
214965 |
08-Nov-2010 |
gonzo |
- Provide more registers for GDB
|
214903 |
07-Nov-2010 |
gonzo |
- Add minidump support for FreeBSD/mips
|
214835 |
05-Nov-2010 |
jhb |
Adjust the order of operations in spinlock_enter() and spinlock_exit() to work properly with single-stepping in a kernel debugger. Specifically, these routines have always disabled interrupts before increasing the nesting count and restored the prior state of interrupts after decreasing the nesting count to avoid problems with a nested interrupt not disabling interrupts when acquiring a spin lock. However, trap interrupts for single-stepping can still occur even when interrupts are disabled. Now the saved state of interrupts is not saved in the thread until after interrupts have been disabled and the nesting count has been increased. Similarly, the saved state from the thread cannot be read once the nesting count has been decreased to zero. To fix this, use temporary variables to store interrupt state and shuffle it between the thread's MD area and the appropriate registers.
In cooperation with: bde MFC after: 1 month
|
214766 |
03-Nov-2010 |
jmallett |
Don't attach the PCI bus driver if the board we're being run on has PCIe. The two are mutually-exclusive on Octeon.
|
214708 |
02-Nov-2010 |
jmallett |
Declare the CF GEOM class so that g_modevent will get called, the class will be recorded, etc. This fixes libgeom on Octeon.
|
214107 |
20-Oct-2010 |
jchandra |
Network driver updates - Fix network driver issue on a XLS eval board (major# 8). - Fix issue uncovered by r213475 in check for XGMII
Submitted by: Sriram Gorti (srgorti at netlogicmicro dot com)
|
214106 |
20-Oct-2010 |
jchandra |
On uniprocessor, warn and fixup hardware cpu mask if more than on CPU is enabled by the bootloader.
|
213894 |
15-Oct-2010 |
marius |
Converted the remainder of the NIC drivers to use the mii_attach() introduced in r213878 instead of mii_phy_probe(). Unlike r213893 these are only straight forward conversions though.
Reviewed by: yongari
|
213893 |
15-Oct-2010 |
marius |
Convert the PHY drivers to honor the mii_flags passed down and convert the NIC drivers as well as the PHY drivers to take advantage of the mii_attach() introduced in r213878 to get rid of certain hacks. For the most part these were: - Artificially limiting miibus_{read,write}reg methods to certain PHY addresses; we now let mii_attach() only probe the PHY at the desired address(es) instead. - PHY drivers setting MIIF_* flags based on the NIC driver they hang off from, partly even based on grabbing and using the softc of the parent; we now pass these flags down from the NIC to the PHY drivers via mii_attach(). This got us rid of all such hacks except those of brgphy() in combination with bce(4) and bge(4), which is way beyond what can be expressed with simple flags.
While at it, I took the opportunity to change the NIC drivers to pass up the error returned by mii_attach() (previously by mii_phy_probe()) and unify the error message used in this case where and as appropriate as mii_attach() actually can fail for a number of reasons, not just because of no PHY(s) being present at the expected address(es).
Reviewed by: jhb, yongari
|
213807 |
13-Oct-2010 |
jmallett |
Keep polling at 50hz as long as link state is changing.
|
213762 |
13-Oct-2010 |
jmallett |
o) Make it possible to attach a PHY directly to an octe device rather than using miibus, since for some devices that use multiple addresses on the bus, going through miibus may be unclear, and for devices that are not standard MII PHYs, miibus may throw a fit, necessitating complicated interfaces to fake the interface that it expects during probe/attach. o) Make the mv88e61xx SMI interface in octe attach a PHY directly and fix some mistakes in the code that resulted from trying too hard to present a nice interface to miibus. o) Add a PHY driver for the mv88e61xx. If attached (it is optional in kernel compiles so the default behavior of having a dumb switch is preserved) it will place the switch in a VLAN-tagging mode such that each physical port has a VLAN associated with it and interfaces for the VLANs can be created to address or bridge between them. XXX It would be nice for this to be part of a single module including the SMI interface, and for it to fit into a generic switch configuration framework and for it to use DSA rather than VLANs, but this is a start and gives some sense of the parameters of such frameworks that are not currently present in FreeBSD. In lieu of a switch configuration interface, per-port media status and VLAN settings are in a sysctl tree. XXX There may be some minor nits remaining in the handling of broadcast, multicast and unknown destination traffic. It would also be nice to go through and replace the few remaining magic numbers with macros at some point in the future. XXX This has only been tested with the MV88E6161, but it should work with minimal or no modification on related switches, so support for probing them was included.
Thanks to Pat Saavedra of TELoIP and Rafal Jaworowski of Semihalf for their assistance in understanding the switch chipset.
|
213484 |
06-Oct-2010 |
jchandra |
PCI fix for XLR C revision chips, limit DMA address to the first 2GB physical address. Adds a dma tag to the XLR/XLS pci bus with the lowaddr if the CPU happens to be a XLR C rev.
Submitted by: Sreekanth M. S. (kanthms at netlogicmicro dot com))
|
213475 |
06-Oct-2010 |
jchandra |
XLR/XLS network driver (nlge) updates:
- nlge_ioctl handles IFF_UP and IFF_PROMISC flags - Translate table code, to enable flow based CPU assignment added disabled by default (can be enabled by a tunable). - Changed signature of nlge_port_disable to make it consistent with nlge_port_enable - Removed TXCSUM and VLAN_HW_TAGGING from i/f capabilities.
Submitted by: Sriram Gorti (srgorti at netlogicmicro dot com)
|
213474 |
06-Oct-2010 |
jchandra |
Fix n64 compile.
|
213448 |
05-Oct-2010 |
jchandra |
Network driver support for more XLR/XLS chip versions.
Obtained from: Sriram Gorti (srgorti at netlogicmicro dot com)
|
213443 |
05-Oct-2010 |
jchandra |
Clear any pending interrupts after disabling FMN interrupts. Add debugging sysctl and counters for message ring threads (intial version). Update watermark values, and and decrease the maximum threads to 3 (this will leave a few CPUs for other processes)
Minor comment fix in nlge.
|
213441 |
05-Oct-2010 |
jchandra |
Fix asm for XKPHYS read for o32, constriants needed for input registers that are clobbered. Fixes a crash when compiled without DEBUG
|
213377 |
03-Oct-2010 |
jchandra |
Update message ring handling code for XLR/XLS
- Wakeup multiple threads per core using message ring watermark interrupts. - Update message ring handler registration, use the real device station id for registering interrupts. - rge/nlge: update for the new message ring registration code. - rge/nlge: use 2 message ring stations for incoming packets, this will allow more messages to be queued. - nlge: comment fixes, remove unused variable - style and whitespace fixes
|
213346 |
02-Oct-2010 |
jmallett |
o) Allow devices to override the MDIO read and write functions presented to the miibus attached to octe interfaces. o) Add an SMI/MDIO interface to the MV88E61XX and use it for the switch PHY on the Lanner MR-320. An actual driver for the switch PHY will come later. Note that for now it intercepts and fakes MII_BMSR reads to prevent the miibus from talking to anything but the switch itself.
|
213345 |
02-Oct-2010 |
jmallett |
Rather than shifting offsets by three, set register offset to 3. All our bus interface does that's special here now is to use a 64-bit register size. In theory, uart(4) ought to support a regsz as well as regshft and support 64-bit registers directly.
Also use the UART class's range rather than a hand-coded 1024 for the address range.
|
213342 |
02-Oct-2010 |
jmallett |
Use ABI-aware macros for setting up a fake frame.
|
213341 |
02-Oct-2010 |
jmallett |
Remove extra cpu setting and commented-out devices, some of which don't exist.
|
213340 |
02-Oct-2010 |
jmallett |
Make the OCTEON1 configuration look like a normal GENERIC configuration. In particular, add PCI and USB buses and most devices. Also move to using ULE, adding INET6, turning on WITNESS by default, etc.
|
213286 |
29-Sep-2010 |
gonzo |
- Fix values of CS1_EN and CS2_EN flags - Unbreak kernel build by fixing naming convention of GPIO_FUNC flags
Spotted by: Luiz Otavio O Souza, Andrew Thompson
|
213278 |
29-Sep-2010 |
gonzo |
AR71XX_GPIO_* defines were introduced by adrian@ a while ago, remove duplicated.
|
213240 |
28-Sep-2010 |
gonzo |
Add GPIO bus to config and hints. Also add sample gpioled device.
|
213239 |
28-Sep-2010 |
gonzo |
Add AR71XX GPIO bus driver.
|
213230 |
27-Sep-2010 |
jmallett |
Give devices lots of time to settle around programming BARs and command registers. Without this, the settings do not seem to stick for Atheros NICs in the PCI slot of the Lanner MR-320.
|
213228 |
27-Sep-2010 |
jmallett |
o) Program the Lanner MR-320 for 32-bit mode, too. o) Give a virtual address for I/O ports on n64. o) On the Portwell CAM-0100, return the right IRQ for the on-board SATA. o) Except on bridges, only set PORTEN and MEMEN on devices that have I/O or memory BARs respectively. o) Disable PORTEN and MEMEN while reprogramming BARs. o) On the Lanner MR-955, set the Tx DMA power register for the on-board Promise SATA controller.
|
213199 |
27-Sep-2010 |
jchandra |
XLS B0 revision PCI support and related changes.
- XLS B0 and later revision chips have PCIe link 2 & 3 mapped to different PIC interrupts. Update pic.h, board.h and xlr_pci.c to reflect this. - remove debug prints in xlr_pci.c - add more processor IDs to board.h, add function xlr_is_xls_b0() - some style(9) and whitespace fixes
|
213156 |
25-Sep-2010 |
jmallett |
o) Send mbufs to BPF listeners from within cvm_oct_xmit(). o) Pin receive threads when they're running since we do access some core-local resources.
|
213150 |
25-Sep-2010 |
jmallett |
Handle link updates in a task.
|
213140 |
24-Sep-2010 |
jmallett |
Make the vast majority of Simple Executive files standard. Perhaps some of these could be made dependent on either of the octusb or octe options, but making them standard fixes a number of option combinations that were previously broken.
|
213090 |
24-Sep-2010 |
jmallett |
o) Add bus_teardown_intr for pci and ciu. This allows the Promise SATA driver to try to switch interrupt handlers at setup. It's not a very good implementation of bus_teardown_intr, though. o) Set cache line size and latency timers for PCI devices per Linux.
|
213089 |
24-Sep-2010 |
jmallett |
Flesh out PCI bus support some: o) Reset and configure the bus from scratch rather than expecting U-Boot to do it for us. Values and configuration from Linux, U-Boot and comments in the Cavium Simple Executive sources. o) Do a resource assignment and bus numbering pass in the absence of a PCI BIOS or firmware that will do it for us. XXX This has to be the third or fourth instance of this in FreeBSD and it would be nice to have it become part of the PCI bus driver itself, like it is on Linux. o) Fix interrupt mapping for and adjust bus configuration for the Lanner MR-955, based on information provided by Lanner.
|
212989 |
22-Sep-2010 |
neel |
Enforce that 'pmap_kenter()' is only used to establish cacheable mappings.
Mappings with other cacheability attributes can be established, if needed, by using 'pmap_kenter_attr()'.
Suggested by: jchandra, imp
|
212957 |
21-Sep-2010 |
jchandra |
n32 fixes for nlge.
Use correct define (__mips_n64) for n64 compilation and use correct parameter type for xlr_paddr_lw() in n32.
|
212896 |
20-Sep-2010 |
jchandra |
Add 64 bit support to nlge, and additional fixes
- 64 bit fixes for ifnlge.c - Use m_nextpkt to save mbuf vaddr on 64 bit, we cannot store the 64 bit vaddr in the 40bit freeback field. - remove unused code and unnecessary variables. - use xlr_io_mmio macro instead of adding io base address - rewrite GPIO related code to fixup nlge using xlr_write_reg and DELAY - support for engg boards major num 11 and 12 - add xlr_paddr_lw() to load 32bit value from physical address, fix inline assembly - style fixes
|
212843 |
19-Sep-2010 |
jmallett |
Fix to specify generic bus_add_child.
|
212842 |
19-Sep-2010 |
jmallett |
Don't use memory that can't be direct-mapped on !n64.
|
212809 |
18-Sep-2010 |
jmallett |
Fix octusb build.
|
212790 |
17-Sep-2010 |
jchandra |
Fixes for XLR network accelerator driver (nlge).
- Process some tx done messages in the transmit path, to ensure that the XLR NA tx done FIFO does not overflow. - Add a message ring handler API to process atmost a given number of messages from a specified bucket mask. This will be used to process the tx done messages - Add a callout to restart transmit in the case transmit gets blocked. - Update enable_msgring_int() and disable_msgring_int(), remove unused args and make static.
Obtained from: Sriram Gorti (srgorti at netlogicmicro dot com)
|
212777 |
17-Sep-2010 |
neel |
Get rid of the unnecessary redirection of 'is_cacheable_mem()' to 'is_physical_memory()' through a macro.
Implement 'is_cacheable_mem()' directly instead.
|
212776 |
17-Sep-2010 |
neel |
Get rid of unused macros.
|
212775 |
17-Sep-2010 |
thompsa |
Make a note of which platforms the mac strings come from.
Suggested by: adrian
|
212774 |
17-Sep-2010 |
thompsa |
Use getenv to find the mac address since it could be in the bootloader environment or command line and under different names.
|
212763 |
16-Sep-2010 |
jchandra |
RMI security accelerator driver update.
- Compile fixes for 9.0, the previous version of this driver was for FreeBSD 6. - Add virtual address field in OperationDescriptor_t, we cannot use MIPS_PHYS_TO_KSEG0 on physical address. - Fixes for new message ring API - Remove unused sys/mips/rmi/dev/sec/stats.h - Whitespace fixes
|
212759 |
16-Sep-2010 |
jchandra |
Update rge.h for r212758 - stats incremented using xlr_ldaddwu should be unsigned int.
|
212758 |
16-Sep-2010 |
jchandra |
Network driver updates.
- Move RMI MIPS extension to atomic increment word (LDADDWU) to common header file sys/mips/rmi/rmi_mips_exts.h - Fix xlr_ldaddwu() for 64 bit, it is a 32 bit operation, use unsigned int* instead of unsigned long* argument - Provide dummy xlr_enable_kx/xlr_restore_kx for n32 and n64. - Provide xlr_paddr_ld() instead of xlr_paddr_lw(), so that the descriptor formats are same for 32 and 64 bit - update nlge and rge for the changes
These changes are also needed by the security driver which will be added later.
|
212634 |
15-Sep-2010 |
neel |
Add 64-bit SWARM board kernel configs.
|
212633 |
15-Sep-2010 |
neel |
Factor out the common parts of the swarm board in SWARM_COMMON and start including that in SWARM and SWARM_SMP kernel configs.
|
212632 |
15-Sep-2010 |
neel |
Make the meaning of the 'mask' argument to 'set_intr_mask(mask)' consistent with the meaning of IM bits in the status register.
Reviewed by: jmallett, jchandra
|
212593 |
14-Sep-2010 |
neel |
Port r212559 to mips.
Do not explicitly enable interrupts in smp_init_secondary() because it renders any spinlock protected code after that point to run with interrupts enabled. This is because the processor is executing in the context of idlethread whose 'md_spinlock_count' is already set to 1.
Instead just let sched_throw() re-enable interrupts when it releases the spinlock.
The original powerpc commit log for r212559 is available here: http://svn.freebsd.org/viewvc/base?view=revision&revision=212559
|
212589 |
14-Sep-2010 |
neel |
Enforce that pmap_mapdev() always returns uncacheable mappings.
Reviewed by: imp, jchandra, jmallett
|
212560 |
13-Sep-2010 |
imp |
TARGET_64BIT isn't needed anymore, GC it (partial merge from tbemd).
|
212553 |
13-Sep-2010 |
jchandra |
sys/mips/rmi/msgring.h - fixes and clean up.
- Remove sync from msgrng_send, sync needs to be called just once before sending. - Fix retry logic - don't reload registers when retrying in message_send, also fix check for send pending fail. - remove unused message_send_block_fast() - merge message_receive_fast() to message_receive - style(9) fixes, and comments - rge and nlge updated for the sys/mips/rmi/msgring.h changes
|
212550 |
13-Sep-2010 |
jchandra |
bus_add_child method is needed now.
|
212541 |
13-Sep-2010 |
mav |
Refactor timer management code with priority to one-shot operation mode. The main goal of this is to generate timer interrupts only when there is some work to do. When CPU is busy interrupts are generating at full rate of hz + stathz to fullfill scheduler and timekeeping requirements. But when CPU is idle, only minimum set of interrupts (down to 8 interrupts per second per CPU now), needed to handle scheduled callouts is executed. This allows significantly increase idle CPU sleep time, increasing effect of static power-saving technologies. Also it should reduce host CPU load on virtualized systems, when guest system is idle.
There is set of tunables, also available as writable sysctls, allowing to control wanted event timer subsystem behavior: kern.eventtimer.timer - allows to choose event timer hardware to use. On x86 there is up to 4 different kinds of timers. Depending on whether chosen timer is per-CPU, behavior of other options slightly differs. kern.eventtimer.periodic - allows to choose periodic and one-shot operation mode. In periodic mode, current timer hardware taken as the only source of time for time events. This mode is quite alike to previous kernel behavior. One-shot mode instead uses currently selected time counter hardware to schedule all needed events one by one and program timer to generate interrupt exactly in specified time. Default value depends of chosen timer capabilities, but one-shot mode is preferred, until other is forced by user or hardware. kern.eventtimer.singlemul - in periodic mode specifies how much times higher timer frequency should be, to not strictly alias hardclock() and statclock() events. Default values are 2 and 4, but could be reduced to 1 if extra interrupts are unwanted. kern.eventtimer.idletick - makes each CPU to receive every timer interrupt independently of whether they busy or not. By default this options is disabled. If chosen timer is per-CPU and runs in periodic mode, this option has no effect - all interrupts are generating.
As soon as this patch modifies cpu_idle() on some platforms, I have also refactored one on x86. Now it makes use of MONITOR/MWAIT instrunctions (if supported) under high sleep/wakeup rate, as fast alternative to other methods. It allows SMP scheduler to wake up sleeping CPUs much faster without using IPI, significantly increasing performance on some highly task-switching loads.
Tested by: many (on i386, amd64, sparc64 and powerc) H/W donated by: Gheorghe Ardelean Sponsored by: iXsystems, Inc.
|
212532 |
13-Sep-2010 |
jchandra |
The functions in sys/mips/mips/psraccess.S can be implemented with mips_rd_status/mips_wr_status. Implement them in mips/include/cpufunc.h, and remove psraccess.S.
Reviewed by: neel, imp
|
212413 |
10-Sep-2010 |
avg |
bus_add_child: change type of order parameter to u_int
This reflects actual type used to store and compare child device orders. Change is mostly done via a Coccinelle (soon to be devel/coccinelle) semantic patch. Verified by LINT+modules kernel builds.
Followup to: r212213 MFC after: 10 days
|
212409 |
10-Sep-2010 |
jchandra |
Compilation fix - when INVARIANTS are turned off.
|
212366 |
09-Sep-2010 |
jchandra |
Clean up and update sys/mips/rmi/rmi_mips_exts.h
- Provide 64 bit implementations for some macros. On n64 and n32, don't split 64 bit values. - No need for 32 bit ops for control registers. - Fix few bugs (write control reg, write_c0_register64). - Re-write EIRR/EIMR/CPUID operations using read_c0_registerXX, no need of inline assembly. - rename control reg access functions to avoid phnx, update callers. - stlye/whitespace fixes.
|
212347 |
09-Sep-2010 |
jchandra |
Minor clean up for nlge - nlna_submit_rx_free_desc() can use the same desc every time. Also merge couple of one-line functions into their caller.
|
212324 |
08-Sep-2010 |
jchandra |
nlge (alternate XLR GMAC driver) updates:
- Updates for the message ring clean up in r212321. - Instead of dropping Tx packet on credit fail, retry send until it succeeds. - Fix freeing mbufs in case of P2P descriptors: We cannot free the mbuf when the P2P descriptor freeback is received. The mbuf may be still in use by the GMAC, since the P2P freeback indicates that it read the P2D descriptors in the P2P message. Now we free just the P2P descriptor when the P2P freeback message is received. Another freeback P2D message has been added to the end of the packet descriptors, the mbuf will be freed only when we received this.
The P2P descriptor issue was reported by srgorti at netlogicmicro dot com.
|
212321 |
08-Sep-2010 |
jchandra |
Clean up fast message ring code for XLR.
Fix message ring send path: - define msgrng_access_enable() which disables local interrupts and enables message ring access. Also define msgrng_restore() which restores interrupts - remove all other msgrng enable/disable macros, no need of critical_enter and other locking here. - message_send() fixup: re-read status until pending bit clears - message_send_retry() fixup: retry only few times with interrupts disabled - Fix up message_send/message_send_retry callers - call msgrng_access_enable() and msgrng_restore() correctly so that interrupts are not disabled for long. - removed unused and obsolete code from sys/mips/rmi/msgring.h - some style fixes - more later
rge.c (XLR GMAC driver): - updated for the message ring changes - remove unused message_send_block() - retry on credit failure, this is not a permanent failure when credits are configured correctly. Add panic if credits are not available to send for a long time.
|
212285 |
07-Sep-2010 |
jchandra |
PCIe updates for XLS.
Fix interrupt routing so that the irq returned is correct for XLR and XLS. This also updates the MSI hack we had earlier - we still don't really support MSI, but we support some drivers that use MSI, by providing support for allocating one MSI per pci link - this MSI is directly mapped to the link IRQ.
|
212284 |
07-Sep-2010 |
jchandra |
Whitespace fixes - indent with tabs instead of spaces. Few other style(9) changes.
|
212283 |
07-Sep-2010 |
jchandra |
On boards with >512MB memory, the result of vtophys cannot be converted to KSEG1 address - use pmap_mapdev/pmap_unmapdev instead.
Remove unused variable maxphys.
|
212248 |
06-Sep-2010 |
jchandra |
XLR/XLS hardware interrupts should be programmed level triggered at the PIC. This should fix the interrupt releated issues seen after the interrupt handling re-write for SMP.
|
212102 |
01-Sep-2010 |
jchandra |
Updates for the RMI MIPS platform code - set cache_coherent_dma flag in cpuinfo for XLR, this will make sure that BUS_DMA_COHERENT flag is handled correctly in busdma_machdep.c - iodi.c, call device_get_name() just once - clear RMI specific EIRR while intializing CPUs - remove debug print in intr_machdep.c
|
212045 |
31-Aug-2010 |
jchandra |
Add the workaround for 4xx lite boards after it was lost in the last board.c update.
|
211996 |
30-Aug-2010 |
jchandra |
Move debug.h to the the rge driver directory. rge.c is the only user of debug.h. Remove debug.h references from other files.
|
211994 |
30-Aug-2010 |
jchandra |
Clean up header files in RMI platform code (sys/mips/rmi), and remove unused files.
- remove clock.c and clock.h, these are not used after the new timer code was added. - remove duplicated include files, fix header file ordering, remove some unneeded includes. - rename mips/rmi/shared_structs.h which contains the RMI boot loader interface to mips/rmi/rmi_boot_info.h. Remove unused files mips/rmi/shared_structs_func.h and sys/mips/rmi/shared_structs_offsets.h - merge mips/rmi/xlrconfig.h and mips/rmi/rmi_mips_exts.h, and remove duplicated functions. - nlge - minor change to remove unneeded argument. - Add FreeBSD svn keyword for headers
|
211991 |
30-Aug-2010 |
jchandra |
Remove misleading comment in pte.h. MIPS PTE entries are software managed and does not need atomics.
Submitted by: alc
|
211958 |
29-Aug-2010 |
jchandra |
Apply MIPS pmap clean up patch from alc@ (with minor change to KASSERT):
PMAP_DIAGNOSTIC was eliminated from amd64/i386, and, in fact, the non-MIPS parts of the kernel, several years ago. Any of the interesting checks were turned into KASSERT()s. Basically, the motivation was that lots of people run with INVARIANTS but no one runs with DIAGNOSTIC.
panic strings needn't and shouldn't have a terminating newline.
Finally, there is one functional change. The sched_pin() in pmap_remove_pages() is an artifact of the way we temporarily map page table pages on i386. (The mappings are processor private. We don't do a system-wide shootdown.) It isn't needed by MIPS.
Tested by: jchandra
Submitted by: alc
|
211946 |
28-Aug-2010 |
jchandra |
New driver nlge for XLR/XLS Network Accelerator. This will support the XGMAC and XAUI 10G interfaces in addition RGMII/SGMII 1G interfaces. This driver is work in progress.
board.c and board.h expanded to include more info.
Only one of rge and nlge can be enabled at a time, rge will be deprecated when nlge stabilizes.
Submitted by: Sriram Gorti <srgorti at netlogicmicro com>
|
211923 |
28-Aug-2010 |
jchandra |
Initial code for XLR CompactFlash driver.
Submitted by: Sreekanth M. S. <kanthms at netlogicmicro com>
|
211893 |
27-Aug-2010 |
jchandra |
Revamp XLR interrupt handling, the previous scheme does not work well on SMP.
We used to route all PIC based interrupts to cpu 0, and used the per-CPU interrupt mask to enable/disable interrupts. But the interrupt threads can run on any cpu on SMP, and the interrupt thread will re-enable the interrupts on the CPU it runs on when it is done, and not on cpu0 where the PIC will still send interrupts to.
The fix is move the disable/enable for PIC based interrupts to PIC, we will ack on PIC only when the interrupt thread is done, and we do not use the per-CPU interrupt mask.
The changes also introduce a way for subsystems to add a function that will be called to clear the interrupt on the subsystem. Currently This is used by the PCI/PCIe for doing additional work during the interrupt handling.
|
211862 |
27-Aug-2010 |
jchandra |
Whitespace fixes in mips/include, remove unused 'struct tlb' from locore.h
PR: misc/147471
|
211814 |
25-Aug-2010 |
jchandra |
Provide timecounter based on XLR PIC timer.
- Use timer 7 in XLR PIC as a 32 counter - provide pic_init_timer(), pic_set_timer(), pic_timer_count32() and pic_timer_count() PIC timer operations. - register this timer as platform_timecounter on rmi platform.
|
211812 |
25-Aug-2010 |
jchandra |
XLR PIC code update. - Fix a bug in xlr_pic_init (use irq in PIC_IRQ_IS_EDGE_TRIGGERED) - use new macro PIC_INTR_TO_IRQ() and PIC_IRT_x() in xlr_pic_init
|
211811 |
25-Aug-2010 |
jchandra |
XLR PIC code update and style(9) fixes.
- style(9) fixes to mips/rmi platform files - update pic.h to add pic_setup_intr() and use pic_setup_intr() for setting up interrupts which are routed thru PIC. - remove rmi_spin_mutex_safe and haslock, and make sure that the functions are called only after mutexes are available.
|
211809 |
25-Aug-2010 |
jchandra |
Rename on_chip.c to fmn.c, as the file has just the fast messaging network code. The iodi.c has the bus for SoC devices, so the name on_chip.c is misleading.
|
211802 |
25-Aug-2010 |
jchandra |
RMI XLR platform code clean-up.
- move PIC code to xlr_machdep.c - move fast message ring code completely to on_chip.c - move memory initialization to a new function xlr_mem_init() - style fixes
|
211799 |
25-Aug-2010 |
jchandra |
Sync up XLR tick.c with the new MIPS tick.c
|
211511 |
19-Aug-2010 |
adrian |
Migrate if_arge to use the PLL cpuops.
This has been lightly tested on the AR7161 and AR9132.
|
211510 |
19-Aug-2010 |
adrian |
Implement PLL generalisation in preparation for use in if_arge.
* Add a function to write to the relevant PLL register * Break out the PLL configuration for the AR71XX into the CPU ops, lifted from if_arge.c. * Add the AR91XX PLL configuration ops, using the AR91XX register definitions.
|
211509 |
19-Aug-2010 |
adrian |
add the PLL set functions to cpuops
|
211504 |
19-Aug-2010 |
adrian |
Fix mistaken indenting.
|
211503 |
19-Aug-2010 |
adrian |
Add some initial AR724X chipset support.
This is untested but should at least allow an AR724X to boot.
The current code is lacking the detail needed to expose the PCIe bus. It is also lacking any NIC, PLL or flush/WB code.
|
211502 |
19-Aug-2010 |
adrian |
Add initial Atheros AR91XX support.
This works well enough to bring a system up to single-user mode using an MDROOT.
Known Issues:
* The EHCI USB doesn't currently work and will panic the kernel during attach. * The onboard ethernet won't work until the PLL routines have been fleshed out and shoe-horned into if_arge. * The WMAC device glue (and quite likely the if_ath support) hasn't yet been implemented.
|
211498 |
19-Aug-2010 |
adrian |
Add missing licence.
|
211497 |
19-Aug-2010 |
adrian |
style(9) pick from imp@ .
|
211482 |
19-Aug-2010 |
adrian |
Remove now unused 'reg'.
|
211481 |
19-Aug-2010 |
adrian |
Initialise the USB system using cpuops rather than the AR71XX specific method.
|
211480 |
19-Aug-2010 |
adrian |
Migrate the CPU reset path to use the new cpuops.
|
211479 |
19-Aug-2010 |
adrian |
Remove the now-unused DDR flush register value.
|
211478 |
19-Aug-2010 |
adrian |
Make the PCI initialisation path use the new cpuops rather than directly programming the reset register.
|
211477 |
19-Aug-2010 |
adrian |
Make if_arge use the new cpuops rather than hard coding the DDR flush registers.
|
211476 |
19-Aug-2010 |
adrian |
Preparation work for supporting the AR91xx and AR724x.
* Implement a SoC probe function, from Linux, which determines the SoC family, type and revision. This only probes the AR71xx series SoC and (currently) panics on others.
* Migrate some of the AR71XX specific hardware init (USB device, determining system frequencies) into using the cpuops introduced in an earlier commit. Other SoC specific hardware stuff (per-device flush/WB, GPIO pin wiring, Ethernet PLL setup, other things I've likely missed) will be introduced in subsequent commits.
Reviewed by: imp@ Obtained from: (partially) Linux
|
211453 |
18-Aug-2010 |
jchandra |
MIPS n64 support - continued...
1. On n64, use XKPHYS to map page table pages instead of KSEG0. Maintain just one freepages list on n64.
The changes are mainly to introduce MIPS_PHYS_TO_DIRECT(pa), MIPS_DIRECT_TO_PHYS(), which will use KSEG0 in 32 bit compilation and XKPHYS in 64 bit compilation.
2. Change macro based PMAP_LMEM_MAP1(), PMAP_LMEM_MAP2(), PMAP_LMEM_UNMAP() to inline functions.
3. Introduce MIPS_DIRECT_MAPPABLE(pa), which will further reduce the cases in which we will need to have a special case for 64 bit compilation.
4. Update CP0 hazard definitions for CPU_RMI - the cpu does not need any nops
Reviewed by: neel
|
211449 |
18-Aug-2010 |
adrian |
Add a DDR flush function, inspired by both Linux and if_arge.c.
|
211448 |
18-Aug-2010 |
adrian |
Add a further register definition for USB device initialisation.
Obtained from: Linux
|
211447 |
18-Aug-2010 |
adrian |
Bring over the first cut of the Atheros-specific SoC operations.
Each of these SoCs have different devices, different hardware initialisation methods and, quite likely, different quirks. These functions will abstract out the SoC differences and keep these differences out of the drivers (eg USB init, if_arge, etc.)
|
211445 |
18-Aug-2010 |
jchandra |
Make return statements style(9) compliant in MIPS pmap.c
Reported by: neel
Reviewed by: neel (earlier version)
|
211440 |
18-Aug-2010 |
adrian |
Import initial AR91XX and AR724X CPU register definitions.
Obtained from: Linux
|
211412 |
17-Aug-2010 |
kib |
Supply some useful information to the started image using ELF aux vectors. In particular, provide pagesize and pagesizes array, the canary value for SSP use, number of host CPUs and osreldate.
Tested by: marius (sparc64) MFC after: 1 month
|
211280 |
13-Aug-2010 |
jchandra |
Rename TARGET_XLR_XLS to CPU_RMI to match other CPU_xxx definitions. use CPU_RMI all XLR configurations. Update ident string for N32 and N64 kernels.
|
211218 |
12-Aug-2010 |
jchandra |
SMP support in n64.
- Enable KX and UX bits on CPU startup for non-boot CPUs - Keep the KX bit when in userspace - XTLB handler needs it to access PCPU data - revert r210638 partly - we don't need to enable KX on kernel entry now
Reviewed by: jmallett, imp
|
211217 |
12-Aug-2010 |
jchandra |
Implement pmap changes suggested by alc@:
1. Move dirty bit emulation code that is duplicted for kernel and user in trap.c to a function pmap_emulate_modified() in pmap.c.
2. While doing dirty bit emulation, it is not necessary to update the TLB entry on all CPUs using smp_rendezvous(), we can just update the TLB entry on the current CPU, and let the other CPUs update their TLB entry lazily if they get an exception.
Reviewed by: alc, neel
|
211216 |
12-Aug-2010 |
jchandra |
Optimization for pmap_kenter(), call pmap_update_page() only when necessary. On SMP, pmap_update_page() can be costly as it needs a a smp_rendezvous().
Reviewed by: alc, neel Obtained from: jmallett (http://svn.freebsd.org/base/user/jmallett/octeon)
|
211215 |
12-Aug-2010 |
jchandra |
Re-arrange the pmap calls that use smp_rendezvous() on SMP, so that their per-cpu variants are also available to be called. The per-cpu variants are needed for some later optimizations.
Also remove unnecessary casts, do some style fixes.
Reviewed by: alc, neel
|
211197 |
11-Aug-2010 |
jhb |
Update various places that store or manipulate CPU masks to use cpumask_t instead of int or u_int. Since cpumask_t is currently u_int on all platforms this should just be a cosmetic change.
|
211191 |
11-Aug-2010 |
jchandra |
Fix for 64 bit compile, with SMP enabled.
|
211167 |
11-Aug-2010 |
jchandra |
Fix compilation when DDB disabled. Adds 'ifdef DDB' around DB_SHOW_COMMAND definitions.
|
211159 |
11-Aug-2010 |
neel |
Add parentheses around the argument 'x' used in the __bswapXX(x) macros. Revert r211130 in favor of this more general fix.
This fixes a compilation error for mips 64-bit little endian build. libexec/rtld-elf/mips/reloc.c:196: warning: right shift count >= width of type
Suggested by: stefanf, jchandra, bde
|
211068 |
08-Aug-2010 |
jchandra |
loadandclear() for PTEs are not needed on MIPS. The PTEs are software managed and we already take pmap lock for PTE operations(see r210922)
Reviewed by: alc
|
210986 |
07-Aug-2010 |
neel |
- Consolidate the the cache coherence attribute definitions in a single place. Adapted from Juli's changes to pte.h in the octeon branch: http://svn.freebsd.org/viewvc/base/user/jmallett/octeon/sys/mips/include/pte.h
- Set the KX and UX bits in the status register for n64 kernels.
Reviewed by: jmallett
|
210939 |
06-Aug-2010 |
jhb |
Add a new ipi_cpu() function to the MI IPI API that can be used to send an IPI to a specific CPU by its cpuid. Replace calls to ipi_selected() that constructed a mask for a single CPU with calls to ipi_cpu() instead. This will matter more in the future when we transition from cpumask_t to cpuset_t for CPU masks in which case building a CPU mask is more expensive.
Submitted by: peter, sbruno Reviewed by: rookie Obtained from: Yahoo! (x86) MFC after: 1 month
|
210922 |
06-Aug-2010 |
jchandra |
Fix issue reported by alc :
MIPS doesn't really need to use atomic_cmpset_int() in situations like this because the software dirty bit emulation in trap.c acquires the pmap lock. Atomics like this appear to be a carryover from i386 where the hardware-managed TLB might concurrently set the modified bit.
Reviewed by: alc
|
210914 |
06-Aug-2010 |
jchandra |
Fix the issue reported by alc:
pmap_page_wired_mappings() counts the number of pv entries for the specified page that have the pv entry wired flag set to TRUE. pmap_enter() correctly initializes this flag. However, pmap_change_wiring() doesn't update the corresponding pv entry flag, only the PTE. So, the count returned by pmap_page_wired_mappings() will sometimes be wrong.
In the short term, the best fix would be to eliminate the pv entry flag and use only the PTE. That flag is wasting non-trivial memory.
Remove pv_wired flag, and use PTE flag to count the wired mappings.
Reviewed by: alc
|
210913 |
06-Aug-2010 |
neel |
Remove redundant declaration of 'pcib_driver' class from sb_zbpci.c. This causes a compilation error.
The declaration is provided by sys/dev/pci/pcib_private.h starting from r210864.
|
210911 |
06-Aug-2010 |
neel |
Use a signed integer to hold the address of a register.
This does the right thing by sign extending the address when compiling for the n64 abi.
|
210910 |
06-Aug-2010 |
neel |
uint64_t is 'unsigned long' in n64 build, so compiler is unhappy if the format specifier in printf is "%llu".
Use "%ju" instead.
|
210900 |
05-Aug-2010 |
gonzo |
- Add interrupts counter for PCI devices
|
210854 |
05-Aug-2010 |
neel |
Fix a race between clock_intr() and tick_ticker() when updating 'counter_upper' and 'counter_lower_last'. The race exists because interrupts are enabled even though tick_ticker() executes in a critical section.
Fix a bug in clock_intr() in how it updates the cached values of 'counter_upper' and 'counter_lower_last'. They are updated only when the COUNT register rolls over. More interestingly it will *never* update the cached values if 'counter_lower_last' happens to be zero.
Get rid of superfluous critical section in clock_intr(). There is no reason to do this because clock_intr() executes in hard interrupt context.
Switch back to using 'tick_ticker()' as the cpu ticker for Sibyte.
Reviewed by: jmallett, mav
|
210846 |
04-Aug-2010 |
jchandra |
Add 3 level page tables for MIPS in n64.
- 32 bit compilation will still use old 2 level page tables - re-arrange pmap code so that adding another level is easier - pmap code for 3 level page tables for n64 - update TLB handler to traverse 3 levels in n64
Reviewed by: jmallett
|
210845 |
04-Aug-2010 |
jchandra |
ithd_name no longer defined, use td_name. Fix compile with KTR enabled.
|
210699 |
31-Jul-2010 |
jchandra |
Use PTR_ADDU to change sp, so that it works for n64 too.
|
210698 |
31-Jul-2010 |
jchandra |
Use fuword32() to fetch instructions, this will work on both 32 and 64 bit compilation.
|
210644 |
30-Jul-2010 |
jchandra |
n64 support - enable UX bit in STATUS for kernel and userspace.
- enable UX in kernel start, and kernel entry - keep UX flag in cpu_fork and cpu_set_upcall - enable UX for userspace
|
210638 |
30-Jul-2010 |
jchandra |
MIPS n64 support - support kstack in XKSEG. - enable KX on entry from user-space, we need KX set to save to XKSEG addresses. - add MIPS_XKSEG_START to genassym.c - Add n64 case for swth.S
|
210630 |
29-Jul-2010 |
jchandra |
Update rge driver for 64 bit kernel. - stored virtual addresses should be 64bit - physical memory can be directly accessed using XKPHYS pointers in 64 bit. - no need to enable KX
|
210627 |
29-Jul-2010 |
jchandra |
Prepare for 3 level page tables for MIPS.
- Move page table second level shift and mask to param.h - rename SEGOFSET to SEGMASK - fix values for 64 bit maximum kernel and user addresses.
|
210626 |
29-Jul-2010 |
jchandra |
Add fuiword() in n64 for completeness.
|
210625 |
29-Jul-2010 |
jchandra |
MIPS 64 bit support. Define fuword64() for n64 compilation, fuword() should be fuword64() in 64 bit.
|
210606 |
29-Jul-2010 |
jchandra |
Update MIPS _stdint.h for 64 bit. Initial 64 bit changes for profile.h.
|
210605 |
29-Jul-2010 |
jchandra |
Fix RQB_FFS for 64 bit, we need to use ffsl() for 64bit.
Use 'ifdef __mips_n64' instead of 'if defined' to be consistant with other usage.
|
210596 |
29-Jul-2010 |
neel |
Fix build for o32 kernels.
The emulation of 'ld' and 'sd' instructions only works for ABIs that support 64-bit registers and the instructions 'ldl' and 'ldr' that operate on those registers.
Reviewed by: jmallett
|
210595 |
29-Jul-2010 |
jmallett |
o) Subtract 64K from the default userland stack pointer. GCC generate code that with a 32-bit ABI on a system with 64-bit registers can attempt to access an invalid (well, kernel) memory address rather than the intended user address for stack-relative loads and stores. Lowering the stack pointer works around this. [1] o) Make TRAP_DEBUG code conditional on the trap_debug variable. Make trap_debug default to 0 instead of 1 now but make it possible to change it at runtime using sysctl. o) Kill programs that attempt an unaligned access of a kernel address. Note that with some ABIs, calling useracc() is not sufficient since the register may be 64-bit but vm_offset_t is 32-bit so a kernel address could be truncated to what looks like a valid user address, allowing the user to crash the kernel. o) Clean up unaligned access emulation to support unaligned 16-bit and 64-bit accesses. (For 16-bit accesses it was checking for user access to too much memory (4 bytes) and there was no 64-bit support.) This still lacks support for unaligned load-linked and store-conditional.
Reviewed by: [1] gonzo
|
210550 |
27-Jul-2010 |
jhb |
Very rough first cut at NUMA support for the physical page allocator. For now it uses a very dumb first-touch allocation policy. This will change in the future. - Each architecture indicates the maximum number of supported memory domains via a new VM_NDOMAIN parameter in <machine/vmparam.h>. - Each cpu now has a PCPU_GET(domain) member to indicate the memory domain a CPU belongs to. Domain values are dense and numbered from 0. - When a platform supports multiple domains, the default freelist (VM_FREELIST_DEFAULT) is split up into N freelists, one for each domain. The MD code is required to populate an array of mem_affinity structures. Each entry in the array defines a range of memory (start and end) and a domain for the range. Multiple entries may be present for a single domain. The list is terminated by an entry where all fields are zero. This array of structures is used to split up phys_avail[] regions that fall in VM_FREELIST_DEFAULT into per-domain freelists. - Each memory domain has a separate lookup-array of freelists that is used when fulfulling a physical memory allocation. Right now the per-domain freelists are listed in a round-robin order for each domain. In the future a table such as the ACPI SLIT table may be used to order the per-domain lookup lists based on the penalty for each memory domain relative to a specific domain. The lookup lists may be examined via a new vm.phys.lookup_lists sysctl. - The first-touch policy is implemented by using PCPU_GET(domain) to pick a lookup list when allocating memory.
Reviewed by: alc
|
210549 |
27-Jul-2010 |
jchandra |
mips/rmi/bus_space_rmi_pci.c is needed even when PCI is disabled. This file really provides a bus that does byteswapping, and can be used by non-PCI components too.
|
210547 |
27-Jul-2010 |
jchandra |
The changes in r210542 moved setting counter_upper and counter_lower_last outside the critical section - fix that.
Reported by: mav
|
210542 |
27-Jul-2010 |
jchandra |
The count/compare values have to be tracked per CPU.
Reviewed by: mav
|
210528 |
27-Jul-2010 |
jchandra |
Fixup mips/rmi for the new mips timer code(r210403). This will get XLR booting again.
The code is a copy of the mips/mips/tick.c with minor modifications for XLR interrupt handling. Disable mips/rmi/clock.c for now, the PIC based timer code will be added later.
|
210460 |
25-Jul-2010 |
imp |
Get N64 building by defining VM_FREELIST_DIRECT to be VM_FREELIST_DEFAULT. I believe this is correct, since KX is set in n64, and thus all RAM can be direct mapped.
|
210404 |
23-Jul-2010 |
mav |
Add some comments.
|
210403 |
23-Jul-2010 |
mav |
Update MIPS timer code (except RMI) to utilize new MI event timer infrastructure.
Reviewed by: neel
|
210327 |
21-Jul-2010 |
jchandra |
Redo the page table page allocation on MIPS, as suggested by alc@.
The UMA zone based allocation is replaced by a scheme that creates a new free page list for the KSEG0 region, and a new function in sys/vm that allocates pages from a specific free page list.
This also fixes a race condition introduced by the UMA based page table page allocation code. Dropping the page queue and pmap locks before the call to uma_zfree, and re-acquiring them afterwards will introduce a race condtion(noted by alc@).
The changes are : - Revert the earlier changes in MIPS pmap.c that added UMA zone for page table pages. - Add a new freelist VM_FREELIST_HIGHMEM to MIPS vmparam.h for memory that is not directly mapped (in 32bit kernel). Normal page allocations will first try the HIGHMEM freelist and then the default(direct mapped) freelist. - Add a new function 'vm_page_t vm_page_alloc_freelist(int flind, int order, int req)' to vm/vm_page.c to allocate a page from a specified freelist. The MIPS page table pages will be allocated using this function from the freelist containing direct mapped pages. - Move the page initialization code from vm_phys_alloc_contig() to a new function vm_page_alloc_init(), and use this function to initialize pages in vm_page_alloc_freelist() too. - Split the function vm_phys_alloc_pages(int pool, int order) to create vm_phys_alloc_freelist_pages(int flind, int pool, int order), and use this function from both vm_page_alloc_freelist() and vm_phys_alloc_pages().
Reviewed by: alc
|
210317 |
20-Jul-2010 |
jmallett |
Remove unused file. Replaced by tlb.c.
|
210312 |
20-Jul-2010 |
jmallett |
o) Add the "octusb" controller which supports the first port of the Octeon on-board USB controller. It is not currently enabled because there are known problems with device communication and until those are fixed I am not certain that it won't destabilize the system. [1] o) Add the "cryptocteon" opencrypto device based on the OCF device written by David McCullough. It is not currently enabled because until support for saving/restoring coprocessor 2 state on context switch is available, it runs with interrupts disabled, which tends to pessimize performance over using a software crypto facility. Tests using this driver which are not negatively affected by it running with interrupts disabled show it to be substantially faster than software for large blocks.
Submitted by: hps [1]
|
210311 |
20-Jul-2010 |
jmallett |
Update the port of FreeBSD to Cavium Octeon to use the Cavium Simple Executive library: o) Increase inline unit / large function growth limits for MIPS to accommodate the needs of the Simple Executive, which uses a shocking amount of inlining. o) Remove TARGET_OCTEON and use CPU_CNMIPS to do things required by cnMIPS and the Octeon SoC. o) Add OCTEON_VENDOR_LANNER to use Lanner's allocation of vendor-specific board numbers, specifically to support the MR320. o) Add OCTEON_BOARD_CAPK_0100ND to hard-wire configuration for the CAPK-0100nd, which improperly uses an evaluation board's board number and breaks board detection at runtime. This board is sold by Portwell as the CAM-0100. o) Add support for the RTC available on some Octeon boards. o) Add support for the Octeon PCI bus. Note that rman_[sg]et_virtual for IO ports can not work unless building for n64. o) Clean up the CompactFlash driver to use Simple Executive macros and structures where possible (it would be advisable to use the Simple Executive API to set the PIO mode, too, but that is not done presently.) Also use structures from FreeBSD's ATA layer rather than structures copied from Linux. o) Print available Octeon SoC features on boot. o) Add support for the Octeon timecounter. o) Use the Simple Executive's routines rather than local copies for doing reads and writes to 64-bit addresses and use its macros for various device addresses rather than using local copies. o) Rename octeon_board_real to octeon_is_simulation to reduce differences with Cavium-provided code originally written for Linux. Also make it use the same simplified test that the Simple Executive and Linux both use rather than our complex one. o) Add support for the Octeon CIU, which is the main interrupt unit, as a bus to use normal interrupt allocation and setup routines. o) Use the Simple Executive's bootmem facility to allocate physical memory for the kernel, rather than assuming we know which addresses we can steal. NB: This may reduce the amount of RAM the kernel reports you as having if you are leaving large temporary allocations made by U-Boot allocated when starting FreeBSD. o) Add a port of the Cavium-provided Ethernet driver for Linux. This changes Ethernet interface naming from rgmxN to octeN. The new driver has vast improvements over the old one, both in performance and functionality, but does still have some features which have not been ported entirely and there may be unimplemented code that can be hit in everyday use. I will make every effort to correct those as they are reported. o) Support loading the kernel on non-contiguous cores. o) Add very conservative support for harvesting randomness from the Octeon random number device. o) Turn SMP on by default. o) Clean up the style of the Octeon kernel configurations a little and make them compile with -march=octeon. o) Add support for the Lanner MR320 and the CAPK-0100nd to the Simple Executive. o) Modify the Simple Executive to build on FreeBSD and to build without executive-config.h or cvmx-config.h. In the future we may want to revert part of these changes and supply executive-config.h and cvmx-config.h and access to the options contained in those files via kernel configuration files. o) Modify the Simple Executive USB routines to support getting and setting of the USB PID.
|
210161 |
16-Jul-2010 |
imp |
Move common macros into asm.h. Replace MIPS_CPU_NOP_DELAY with HAZARD_DELAY. Move HAZARD_DELAY and ITLBNOPFIX into asm.h, for possible later optimization...
Reviewed by: jmallet, jchandra
|
210159 |
16-Jul-2010 |
imp |
This file appears not to be used.
|
210158 |
16-Jul-2010 |
imp |
Use #define for get_cyclecount rather than inline function. mips_rd_count() isn't defined in userland, and cpu.h is included there in alias_scpt.h (maybe they don't need it in the first place).
|
210142 |
15-Jul-2010 |
imp |
Better description of this file
|
210126 |
15-Jul-2010 |
jchandra |
Fix for 64 bit compilation.
RMI bootloader passes argv[] and envp[] as an array of 32 bit pointers. Convert the pointers to correct pointer type before use.
|
210105 |
15-Jul-2010 |
imp |
Move TLB definitions to tlb.h
|
210104 |
15-Jul-2010 |
imp |
This file has been unused for a while now...
|
210100 |
15-Jul-2010 |
imp |
Remove unused stuff from cpu.h. Move inappropriate stuff in cpu.h elsewhere: {s,g}et_intr_mask -> md_var.h num_tlbentries -> tlb.h Remove #define clockframe trapframe and fix clock, which was the only place this was used. All the rest of this stuff was unused.
# we're not quite minimal yet, since we duplicate a few status register things # here...
Inspired by: bde@
|
210099 |
15-Jul-2010 |
imp |
We don't need sys/cdefs.h for __CONCAT here.
|
210098 |
15-Jul-2010 |
imp |
Remove i386-ish sysctls. Also, make the bootinfo sysctl OID_AUTO.
|
210096 |
15-Jul-2010 |
imp |
Remove one layer of indirection. No need to call cpu_throw which then calls mips_cpu_call via an obfuscated assembler call. Instead, delete the current cpu_throw, and rename mips_cpu_throw to cpu_throw. This is nicer to the cache on each context switch (since fixed jumps can be prefected, while jumps through a register can't). Incidentally, it also saves about 5 or 6 instructions.
Reviewed by: jmallet@
|
210041 |
14-Jul-2010 |
imp |
Use cpuregs.h spellings over the cpu.h spellings.
|
210039 |
14-Jul-2010 |
imp |
Remove the unused part of cpu.h now that the rest of the tree has been transitioned to use cpuregs.h spellings. Now we're only 4x too big, according to the bde-ometer.
|
210038 |
14-Jul-2010 |
imp |
Prefer the cpuregs.h spellings of register and bit names over cpu.h.
|
210029 |
13-Jul-2010 |
imp |
union cpuprid is also unused now
|
210028 |
13-Jul-2010 |
imp |
Add INFO config register from mips32/64 land
|
210027 |
13-Jul-2010 |
imp |
Remove redunant machine/cpuregs.h include. Also, spell things like in machine/cpuregs.h instead of machine/cpu.h.
|
210026 |
13-Jul-2010 |
imp |
Temp hack to N32 kernel: turn off debugger since n32 is too weird for ddb
|
210009 |
13-Jul-2010 |
imp |
Define break value for ddb. Use int32/intptr casts for exception vector names. Define MIPS_SR_INT_MASK again Change MIPS_XKPHYS_CCA_* to MIPS_CCA_* since we can use them in many contexts Minor gratuitous whitespace churn
|
210007 |
13-Jul-2010 |
imp |
Use the cpuregs.h spellings for these registers rather than the cpu.h spelling.
|
209996 |
13-Jul-2010 |
imp |
cpu_id and fpu_id are unused, except to be set early in the boot code. The problem with setting it there is that the last CPU to come up wins, it seems. This also removes one more ifdef in locore.S, a noble goal too. Since they are unused, and pollute cpu.h, remove them.
Submitted by: bde.h (cpu.h pollution) Approved in theory by: jmallet@
|
209994 |
13-Jul-2010 |
imp |
Remove obsolete define "COPY_SIGCODE". This is unused in FreeBSD.
Submitted by: bde@
|
209935 |
12-Jul-2010 |
jchandra |
Merge jmallett@'s n64 work into HEAD
Initial set of ddb changes to support n64
Reviewed by: imp Obtained from: jmallett (http://svn.freebsd.org/base/user/jmallett/octeon)
|
209930 |
12-Jul-2010 |
jchandra |
Merge jmallett@'s n64 work into HEAD.
Merge changes for initial n64 support in pmap.c. Use direct mapped (XKPHYS) access for a lot of operations that earlier needed temporary mapping. Add support for using XKSEG for kernel mappings.
Reviewed by: imp Obtained from: jmallett (http://svn.freebsd.org/base/user/jmallett/octeon)
|
209929 |
12-Jul-2010 |
jchandra |
Merge jmallett@'s n64 work into HEAD
64 bit TLB definitions in pte.h
Reviewed by: imp Obtained from: jmallett (http://svn.freebsd.org/base/user/jmallett/octeon)
|
209928 |
12-Jul-2010 |
jchandra |
Move KSEG address definitions from cpu.h to cpuregs.h with the other definitions, add some XKPHYS related definitions for n64.
Reviewed by: imp
|
209815 |
08-Jul-2010 |
jchandra |
Fix XLR64, the previous version had the contents of file duplicated.
|
209814 |
08-Jul-2010 |
jchandra |
64 bit ld script for mips, and configuration file for 64 bit compilation on XLR
Approved by: rrs
|
209811 |
08-Jul-2010 |
jchandra |
Use 64 bit type for rqb_word_t in n64 kernel.
Reviewed by: imp Approved by: rrs
|
209810 |
08-Jul-2010 |
jchandra |
Enable KX bit, which is needed for 64 bit access, in status register for XLR. Update exception handlers and other functions which set/change status registers to preserve this.
Approved by: rrs
|
209809 |
08-Jul-2010 |
adrian |
Add TX-path aligned/unaligned stats for if_arge.
|
209808 |
08-Jul-2010 |
jchandra |
64 bit compilation support XLR platform code. Mostly changes to make casting between int and pointer and printing 64bit values safe for 32 and 64 bit compile.
Approved by: rrs
|
209807 |
08-Jul-2010 |
adrian |
Address PR kern/148307 - fix if_ath TX mbuf alignment/size constraint checks
The existing code only checked the alignment of the first mbuf and didn't enforce the size constraints.
This commit introduces a simple function to check the alignment and size of all mbufs in the list. This fixes the initial issue in the PR.
PR: kern/148307 Reviewed by: gonzo@
|
209806 |
08-Jul-2010 |
jchandra |
Fix minor issue in sys/mips/mips/cache_mipsNN.c, using int type for virtual addr will break on 64 bit, change to vm_offset_t.
Reviewed by: imp@ Approved by: rrs (mentor)
|
209805 |
08-Jul-2010 |
jchandra |
Merge jmallett@'s n64 work into HEAD - changeset 8
Updated PTE/PDE macros from http://svn.freebsd.org/base/user/jmallett/octeon Introduce pmap_segshift() macro, use pmap_segmap() in place of pmap_pde, and remove pmap_pde().
Approved by: rrs (mentor) Obtained from: jmallett@
|
209802 |
08-Jul-2010 |
adrian |
Introduce a sysctl block for if_arge and, for now, a blank debug sysctl placeholder for later.
Add in a missing FreeBSD ID string.
|
209769 |
07-Jul-2010 |
adrian |
Fix the CS line definitions. These bits are for the CS2/CS1 lines rather than CS1/CS0.
This has been tested on the Ubiqiti Routerstation Pro board.
|
209646 |
02-Jul-2010 |
jchandra |
Add support for XLS 108 chips - update board.c/board.h to setup GMAC driver parameters correctly.
Approved by: rrs (mentor) Obtained from: Sriram Gorti <srgorti@netlogicmicro.com>
|
209645 |
02-Jul-2010 |
jchandra |
Remove save/restore of PageMask in tlb.c functions introduced in r209243. If we save/restore the PageMask, the value set by the bootloader will persist, and will cause problems later in TLB exception handler. This caused a crash in AR71xx boards.
Also fixes the EntryHi mask in pte.h
Reported by: Luiz Otavio O Souza <lists.br@gmail.com> Tested by: Luiz Otavio O Souza <lists.br@gmail.com>
Approved by: rrs (mentor)
|
209613 |
30-Jun-2010 |
jhb |
Move prototypes for kern_sigtimedwait() and kern_sigprocmask() to <sys/syscallsubr.h> where all other kern_<syscall> prototypes live.
|
209502 |
24-Jun-2010 |
jchandra |
Add linker script and configuration file for n32 kernel.
Approved by: rrs (mentor)
|
209500 |
24-Jun-2010 |
jchandra |
Merge jmallett@'s n64 work into HEAD - changeset 7
Initial support for n32 and n64 ABIs from http://svn.freebsd.org/base/user/jmallett/octeon
Changes are: - syscall, exception and trap support for n32/n64 ABIs - 64-bit address space defines - _jmp_buf for n32/n64 - casts between registers and ptr/int updated to work on n32/n64
Approved by: rrs(mentor), jmallett
|
209494 |
24-Jun-2010 |
adrian |
Comment about the shared pins I know about.
|
209482 |
23-Jun-2010 |
jchandra |
Merge jmallett@'s n64 work into HEAD - changeset 6
PTE flag cleanup from http://svn.freebsd.org/base/user/jmallett/octeon - Rename PTE_xx flags to match their MIPS names - Use the new pte_set/test/clear macros uniformly, instead of a mixture of mips_pg_xxx(), pmap_pte_x() macros and direct access. - Remove unused macros and defines from pte.h and pmap.c
Discussed on freebsd-mips@
Approved by: rrs(mentor), jmallett
|
209454 |
23-Jun-2010 |
adrian |
AR71XX GPIO register definitions.
Reviewed by: gonzo@
|
209338 |
19-Jun-2010 |
adrian |
Extend the AR71XX watchdog debugging and data.
* Add some per-device sysctl entries which record the watchdog state - whether it is armed; whether the last reboot was due to the watchdog. * Add a per-device sysctl debug flag to enable logging watchdog arming/ disarming.
Reviewed by: gonzo@
|
209318 |
18-Jun-2010 |
jchandra |
Add support for newer XLS chips/boards in the GMAC driver. Improved processor id code in board.h, remove unnecessary macros.
Approved by: rrs(mentor)
|
209314 |
18-Jun-2010 |
jchandra |
Merge jmallett@'s n64 work into HEAD - changeset 5
Remove unnecessary locking and sched_pin() call while creating a temporary mapping.
Changes from http://svn.freebsd.org/base/user/jmallett/octeon
Approved by: rrs (mentor), jmallett
|
209243 |
17-Jun-2010 |
jchandra |
Merge jmallett@'s n64 work into HEAD - changeset 4
Re-write tlb operations in C with a simpler API. Update callers to use the new API.
Changes from http://svn.freebsd.org/base/user/jmallett/octeon
Approved by: rrs(mentor), jmallett
|
209048 |
11-Jun-2010 |
alc |
Relax one of the new assertions in pmap_enter() a little. Specifically, allow pmap_enter() to be performed on an unmanaged page that doesn't have VPO_BUSY set. Having VPO_BUSY set really only matters for managed pages. (See, for example, pmap_remove_write().)
|
208990 |
10-Jun-2010 |
alc |
Reduce the scope of the page queues lock and the number of PG_REFERENCED changes in vm_pageout_object_deactivate_pages(). Simplify this function's inner loop using TAILQ_FOREACH(), and shorten some of its overly long lines. Update a stale comment.
Assert that PG_REFERENCED may be cleared only if the object containing the page is locked. Add a comment documenting this.
Assert that a caller to vm_page_requeue() holds the page queues lock, and assert that the page is on a page queue.
Push down the page queues lock into pmap_ts_referenced() and pmap_page_exists_quick(). (As of now, there are no longer any pmap functions that expect to be called with the page queues lock held.)
Neither pmap_ts_referenced() nor pmap_page_exists_quick() should ever be passed an unmanaged page. Assert this rather than returning "0" and "FALSE" respectively.
ARM:
Simplify pmap_page_exists_quick() by switching to TAILQ_FOREACH().
Push down the page queues lock inside of pmap_clearbit(), simplifying pmap_clear_modify(), pmap_clear_reference(), and pmap_remove_write(). Additionally, this allows for avoiding the acquisition of the page queues lock in some cases.
PowerPC/AIM:
moea*_page_exits_quick() and moea*_page_wired_mappings() will never be called before pmap initialization is complete. Therefore, the check for moea_initialized can be eliminated.
Push down the page queues lock inside of moea*_clear_bit(), simplifying moea*_clear_modify() and moea*_clear_reference().
The last parameter to moea*_clear_bit() is never used. Eliminate it.
PowerPC/BookE:
Simplify mmu_booke_page_exists_quick()'s control flow.
Reviewed by: kib@
|
208866 |
06-Jun-2010 |
alc |
Don't set PG_WRITEABLE in init_pte_prot() (and thus pmap_enter()) unless the page is managed.
Don't set the machine-independent layer's dirty field for the page being mapped in init_pte_prot(). (The dirty field is only supposed to set when a mapping is removed or write-protected and the page was managed and modified.)
Determine whether or not to perform dirty bit emulation based on whether or not the page is managed, i.e., pageable, not based on whether the page is being mapped into the kernel address space. Nearly all of the kernel address space consists of unmanaged pages, so this has neglible impact on the overhead of dirty bit emulation for the kernel address space. However, there can also exist unmanaged pages in the user address space. Previously, dirty bit emulation was unnecessarily performed on these pages.
Tested by: jchandra@
|
208794 |
04-Jun-2010 |
jchandra |
Make vm_contig_grow_cache() extern, and use it when vm_phys_alloc_contig() fails to allocate MIPS page table pages. The current usage of VM_WAIT in case of vm_phys_alloc_contig() failure is not correct, because:
"There is no guarantee that any of the available free (or cached) pages after the VM_WAIT will fall within the range of suitable physical addresses. Every time this function sleeps and a single page is freed (or cached) by someone else, this function will be reawakened. With a little bad luck, you could spin indefinitely."
We also add low and high parameters to vm_contig_grow_cache() and vm_contig_launder() so that we restrict vm_contig_launder() to the range of pages we are interested in.
Reported by: alc
Reviewed by: alc Approved by: rrs (mentor)
|
208686 |
01-Jun-2010 |
alc |
Fix a KASSERT() that was broken in r208665.
Reported by: jmallett
|
208667 |
31-May-2010 |
alc |
Eliminate a stale comment.
|
208665 |
31-May-2010 |
alc |
Merge portions of r208645 and supporting code from the i386 pmap: When I pushed down the page queues lock into pmap_is_modified(), I created an ordering dependence: A pmap operation that clears PG_WRITEABLE and calls vm_page_dirty() must perform the call first. Otherwise, pmap_is_modified() could return FALSE without acquiring the page queues lock because the page is not (currently) writeable, and the caller to pmap_is_modified() might believe that the page's dirty field is clear because it has not seen the effect of the vm_page_dirty() call.
When I pushed down the page queues lock into pmap_is_modified(), I overlooked one place where this ordering dependence is violated: pmap_enter(). In a rare situation pmap_enter() can be called to replace a dirty mapping to one page with a mapping to another page. (I say rare because replacements generally occur as a result of a copy-on-write fault, and so the old page is not dirty.) This change delays clearing PG_WRITEABLE until after vm_page_dirty() has been called.
Fixing the ordering dependency also makes it easy to introduce a small optimization: When pmap_enter() used to replace a mapping to one page with a mapping to another page, it freed the pv entry for the first mapping and later called the pv entry allocator for the new mapping. Now, pmap_enter() attempts to recycle the old pv entry, saving two calls to the pv entry allocator.
|
208659 |
30-May-2010 |
alc |
Simplify the inner loop of get_pv_entry(): While iterating over the page's pv list, there is no point in checking whether or not the pv list is empty, wait instead until the loop completes.
|
208616 |
28-May-2010 |
jchandra |
Fix lock order reversal, unlock page queue and pmap locks before calling uma_zfree(). Also if needed, acquire page queue lock before modifying pte page attributes.
Approved by: rrs (mentor)
|
208608 |
28-May-2010 |
neel |
Get rid of unused variable 'virtual_sys_start'.
|
208607 |
28-May-2010 |
neel |
If 'timer2hz' is zero then we don't need to call 'timer2clock()' directly. It will be called automatically by 'timer1clock()'.
Do profiling as often as possible by running it as the same frequency as 'timer1hz'. The statistics clock is run as close to 128Hz as possible.
Pointed out by: mav@
|
208589 |
27-May-2010 |
jchandra |
Call VM_WAIT in pmap_ptpgzone_allocf() if M_WAITOK is set. Removed unused variable.
Approved by: rrs (mentor)
|
208585 |
27-May-2010 |
neel |
Simplify clock interrupt handling on mips by using the new KPI - timer1clock() and timer2clock().
Dynamically adjust the tick frequency depending on the value of 'hz'. Tested with hz values of 100, 1000 and 2000.
|
208581 |
26-May-2010 |
gonzo |
- Fix kseg0 address calculation - it doesn't always start at page boundary - Add cache ops to ensure memory validity before/after copy operation
|
208574 |
26-May-2010 |
alc |
Push down page queues lock acquisition in pmap_enter_object() and pmap_is_referenced(). Eliminate the corresponding page queues lock acquisitions from vm_map_pmap_enter() and mincore(), respectively. In mincore(), this allows some additional cases to complete without ever acquiring the page queues lock.
Assert that the page is managed in pmap_is_referenced().
On powerpc/aim, push down the page queues lock acquisition from moea*_is_modified() and moea*_is_referenced() into moea*_query_bit(). Again, this will allow some additional cases to complete without ever acquiring the page queues lock.
Reorder a few statements in vm_page_dontneed() so that a race can't lead to an old reference persisting. This scenario is described in detail by a comment.
Correct a spelling error in vm_page_dontneed().
Assert that the object is locked in vm_page_clear_dirty(), and restrict the page queues lock assertion to just those cases in which the page is currently writeable.
Add object locking to vnode_pager_generic_putpages(). This was the one and only place where vm_page_clear_dirty() was being called without the object being locked.
Eliminate an unnecessary vm_page_lock() around vnode_pager_setsize()'s call to vm_page_clear_dirty().
Change vnode_pager_generic_putpages() to the modern-style of function definition. Also, change the name of one of the parameters to follow virtual memory system naming conventions.
Reviewed by: kib
|
208533 |
25-May-2010 |
neel |
Get rid of empty and unused KSEG0TEXT macros.
|
208532 |
25-May-2010 |
neel |
Fix mips kernel build breakage caused by revision 208504.
|
208504 |
24-May-2010 |
alc |
Roughly half of a typical pmap_mincore() implementation is machine- independent code. Move this code into mincore(), and eliminate the page queues lock from pmap_mincore().
Push down the page queues lock into pmap_clear_modify(), pmap_clear_reference(), and pmap_is_modified(). Assert that these functions are never passed an unmanaged page.
Eliminate an inaccurate comment from powerpc/powerpc/mmu_if.m: Contrary to what the comment says, pmap_mincore() is not simply an optimization. Without a complete pmap_mincore() implementation, mincore() cannot return either MINCORE_MODIFIED or MINCORE_REFERENCED because only the pmap can provide this information.
Eliminate the page queues lock from vfs_setdirty_locked_object(), vm_pageout_clean(), vm_object_page_collect_flush(), and vm_object_page_clean(). Generally speaking, these are all accesses to the page's dirty field, which are synchronized by the containing vm object's lock.
Reduce the scope of the page queues lock in vm_object_madvise() and vm_page_dontneed().
Reviewed by: kib (an earlier version)
|
208480 |
24-May-2010 |
jchandra |
Remove unused code in sys/mips/rmi : - ehcireg.h,ehcivar.h : USB related files from old merge - pcibus.c : was merged into xlr_pci.c earlier - xlr_boot1_console.c : obsolete console code using bootloader hooks - sys/mips/rmi/perfmon* : obsolete custom performance monitoring code
Approved by: rrs (mentor)
|
208453 |
23-May-2010 |
kib |
Reorganize syscall entry and leave handling.
Extend struct sysvec with three new elements: sv_fetch_syscall_args - the method to fetch syscall arguments from usermode into struct syscall_args. The structure is machine-depended (this might be reconsidered after all architectures are converted). sv_set_syscall_retval - the method to set a return value for usermode from the syscall. It is a generalization of cpu_set_syscall_retval(9) to allow ABIs to override the way to set a return value. sv_syscallnames - the table of syscall names.
Use sv_set_syscall_retval in kern_sigsuspend() instead of hardcoding the call to cpu_set_syscall_retval().
The new functions syscallenter(9) and syscallret(9) are provided that use sv_*syscall* pointers and contain the common repeated code from the syscall() implementations for the architecture-specific syscall trap handlers.
Syscallenter() fetches arguments, calls syscall implementation from ABI sysent table, and set up return frame. The end of syscall bookkeeping is done by syscallret().
Take advantage of single place for MI syscall handling code and implement ptrace_lwpinfo pl_flags PL_FLAG_SCE, PL_FLAG_SCX and PL_FLAG_EXEC. The SCE and SCX flags notify the debugger that the thread is stopped at syscall entry or return point respectively. The EXEC flag augments SCX and notifies debugger that the process address space was changed by one of exec(2)-family syscalls.
The i386, amd64, sparc64, sun4v, powerpc and ia64 syscall()s are changed to use syscallenter()/syscallret(). MIPS and arm are not converted and use the mostly unchanged syscall() implementation.
Reviewed by: jhb, marcel, marius, nwhitehorn, stas Tested by: marcel (ia64), marius (sparc64), nwhitehorn (powerpc), stas (mips) MFC after: 1 month
|
208422 |
22-May-2010 |
neel |
- Use ptpgzone zone to allocate page table pages irrespective of the amount of memory on a platform. Tested on the Sibyte with 256MB and 1GB memory configurations.
- Replace vtophys() with MIPS_KSEG0_TO_PHYS() to convert a page table page's virtual address to physical. We can safely do this because page table pages are allocated out of KSEG0.
- Add an assertion to verify that when a page table page is freed it contains all zeroes. We can now use it after allocation without zeroing it.
|
208392 |
21-May-2010 |
jhb |
- Adjust the whitespace for the lines that output fields in 'show pcpu' in DDB so that all the fields line up. - Print out the tid of the per-CPU idlethread instead of the pid since the idle process is now shared across all idle threads.
MFC after: 1 month
|
208369 |
21-May-2010 |
jchandra |
Changes to boot on a subset of threads on an XLR/XLS core. - Adds re-partitioning TLB per core for enabled threads. - Adds hardware thread id to cpuid mapping - updates rge driver packet distribution and message ring handling threads to be started based on hardware thread id. - remove unused early debugging code to set control registers. - coding style fixes
Approved by: rrs (mentor)
|
208265 |
18-May-2010 |
rpaulo |
Add a device description.
|
208253 |
18-May-2010 |
neel |
Fix Sibyte SMP kernel breakage caused by r208249.
We need to include the header file that provides declaration of the smp_topo_none() function.
|
208250 |
18-May-2010 |
rrs |
Adds the file I forgot to add... that handles the mpwait.S for RMI
Approved by: JC
|
208249 |
18-May-2010 |
rrs |
Adds JC's cleanup patches that fix it so we call an platform dependant topo function as well as clean up all the XLR specific ifdefs around smp platform init.
Obtained from: JC
|
208175 |
16-May-2010 |
alc |
On entry to pmap_enter(), assert that the page is busy. While I'm here, make the style of assertion used by pmap_enter() consistent across all architectures.
On entry to pmap_remove_write(), assert that the page is neither unmanaged nor fictitious, since we cannot remove write access to either kind of page.
With the push down of the page queues lock, pmap_remove_write() cannot condition its behavior on the state of the PG_WRITEABLE flag if the page is busy. Assert that the object containing the page is locked. This allows us to know that the page will neither become busy nor will PG_WRITEABLE be set on it while pmap_remove_write() is running.
Correct a long-standing bug in vm_page_cowsetup(). We cannot possibly do copy-on-write-based zero-copy transmit on unmanaged or fictitious pages, so don't even try. Previously, the call to pmap_remove_write() would have failed silently.
|
208165 |
16-May-2010 |
rrs |
This pushes all of JC's patches that I have in place. I am now able to run 32 cores ok.. but I still will hang on buildworld with a NFS problem. I suspect I am missing a patch for the netlogic rge driver.
JC check and see if I am missing anything except your core-mask changes
Obtained from: JC
|
208022 |
13-May-2010 |
imp |
Remove some stray ';'s
Submitted by: marc balmer
|
207796 |
08-May-2010 |
alc |
Push down the page queues into vm_page_cache(), vm_page_try_to_cache(), and vm_page_try_to_free(). Consequently, push down the page queues lock into pmap_enter_quick(), pmap_page_wired_mapped(), pmap_remove_all(), and pmap_remove_write().
Push down the page queues lock into Xen's pmap_page_is_mapped(). (I overlooked the Xen pmap in r207702.)
Switch to a per-processor counter for the total number of pages cached.
|
207692 |
06-May-2010 |
alc |
Eliminate dead code.
|
207645 |
05-May-2010 |
neel |
Fix DDB backtrace involving kernel modules.
We can no longer assume that all valid program counter values reside within the kernel object file.
|
207554 |
03-May-2010 |
sobomax |
Add new tunable 'net.link.ifqmaxlen' to set default send interface queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value.
MFC after: 1 month
|
207533 |
02-May-2010 |
marius |
Remove redundant checking of sc_leaving (uart_intr() already handles this).
Approved by: marcel
|
207474 |
01-May-2010 |
imp |
Enable AH_RXCFG_SDMAMW_4BYTES option. See NOTES file for why this is workaround (WAR) is needed.
|
207473 |
01-May-2010 |
imp |
Put the -current debugging options back into AR71XX.
|
207441 |
30-Apr-2010 |
rrs |
Bug in the memory mapping module. The wrong physaddr was being used in the macro (1 should be used not 2)...
Obtained from: JC
|
207410 |
30-Apr-2010 |
kmacy |
On Alan's advice, rather than do a wholesale conversion on a single architecture from page queue lock to a hashed array of page locks (based on a patch by Jeff Roberson), I've implemented page lock support in the MI code and have only moved vm_page's hold_count out from under page queue mutex to page lock. This changes pmap_extract_and_hold on all pmaps.
Supported by: Bitgravity Inc.
Discussed with: alc, jeffr, and kib
|
207305 |
28-Apr-2010 |
alc |
Adapt i386 r207205 to mips: Clearing PV_TABLE_REF and setting the page's PG_REFERENCED flag in pmap_protect() can't really be justified, so don't do it.
|
207269 |
27-Apr-2010 |
kib |
Style: use #define<TAB> instead of #define<SPACE>.
Noted by: bde, pluknet gmail com MFC after: 11 days
|
207155 |
24-Apr-2010 |
alc |
Resurrect pmap_is_referenced() and use it in mincore(). Essentially, pmap_ts_referenced() is not always appropriate for checking whether or not pages have been referenced because it clears any reference bits that it encounters. For example, in mincore(), clearing the reference bits has two negative consequences. First, it throws off the activity count calculations performed by the page daemon. Specifically, a page on which mincore() has called pmap_ts_referenced() looks less active to the page daemon than it should. Consequently, the page could be deactivated prematurely by the page daemon. Arguably, this problem could be fixed by having mincore() duplicate the activity count calculation on the page. However, there is a second problem for which that is not a solution. In order to clear a reference on a 4KB page, it may be necessary to demote a 2/4MB page mapping. Thus, a mincore() by one process can have the side effect of demoting a superpage mapping within another process!
|
207152 |
24-Apr-2010 |
kib |
Move the constants specifying the size of struct kinfo_proc into machine-specific header files. Add KINFO_PROC32_SIZE for struct kinfo_proc32 for architectures providing COMPAT_FREEBSD32. Add CTASSERT for the size of struct kinfo_proc32.
Submitted by: pluknet Reviewed by: imp, jhb, nwhitehorn MFC after: 2 weeks
|
207139 |
24-Apr-2010 |
jmallett |
Most MIPS systems have a comparatively-sparse physical memory layout. Switch to using the sparse physseg layout in the VM system.
|
207134 |
23-Apr-2010 |
jmallett |
Build some nops into CLEAR_STATUS here to make sure that the following instructions can't be interrupted.
|
207131 |
23-Apr-2010 |
jmallett |
o) Remove default MAXMEM on SWARM; pmap can readily use lmem for >512M physical addresses. o) Set a local maxmem in sb_machdep.c to avoid trying to use pages over 2^64 under 32-bit ABIs. Our pmap needs corrected to use vm_paddr_t consistently, then we can make vm_paddr_t 64-bit under 32-bit ABIs and add code in pmap to limit phys_avail by the maximum PFN that a 32-bit PTE can hold.
|
207130 |
23-Apr-2010 |
jmallett |
Large memory mappings are always CPU local and always done with interrupts disabled. Be doubly-sure that we don't try to do a TLB shootdown on SMP systems for those mappings.
Submitted by: C. Jayachandran
|
207089 |
23-Apr-2010 |
neel |
Fix compilation error.
tick.c:298:5: error: "KDTRACE_HOOKS" is not defined
|
207077 |
22-Apr-2010 |
thompsa |
Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this had the illusion of a tunable setting but was always turned on regardless.
MFC after: 1 week
|
206902 |
20-Apr-2010 |
rpaulo |
Add the necessary hooks for dtrace cyclic module.
|
206895 |
20-Apr-2010 |
rpaulo |
Remove svn:executable prop.
|
206837 |
19-Apr-2010 |
jmallett |
Fix MALTA64 build.
|
206836 |
19-Apr-2010 |
jmallett |
Remove unused file.
|
206834 |
19-Apr-2010 |
jmallett |
o) Eliminate the "stand" frame and its use. Use CALLFRAME_* everywhere. o) Use <machine/asm.h> macros for register-width, etc., rather than doing it by hand in a few more assembly files. o) Reduce diffs between various bits of TLB refill code in exception.S and between interrupt processing code. o) Use PTR_* to operate on registers that are pointers (e.g. sp). o) Add and use a macro, CLEAR_PTE_SWBITS rather than using the mysteriously-named WIRED_SHIFT to select bits to truncate when loading PTEs. o) Don't doubly disable interrupts by moving zero to the status register, especially since that has the nasty side-effect of taking us out of 64-bit mode. o) Use CLEAR_STATUS to disable interrupts the first time. o) Keep SR_PX set as well as SR_[KSU]X when doing exception processing. This is the bit that determines whether 64-bit operations are allowed. o) Don't enable interrupts until configure_final(), like most other ports.
|
206829 |
19-Apr-2010 |
jmallett |
o) Fix XKPHYS physical address extraction. Also define cache coherency attributes for XKPHYS. o) Make coprocessor 0 accessor function macros for register+selector registers take the full name so that e.g. (as done in this commit), prid selector 1 can be written through mips_wr_ebase() rather than mips_wr_prid1(). o) Allow for sign extension of 32-bit segment addresses. o) Remove an unused MIPS-I register number.
|
206819 |
18-Apr-2010 |
jmallett |
o) Add a VM find-space option, VMFS_TLB_ALIGNED_SPACE, which searches the address space for an address as aligned by the new pmap_align_tlb() function, which is for constraints imposed by the TLB. [1] o) Add a kmem_alloc_nofault_space() function, which acts like kmem_alloc_nofault() but allows the caller to specify which find-space option to use. [1] o) Use kmem_alloc_nofault_space() with VMFS_TLB_ALIGNED_SPACE to allocate the kernel stack address on MIPS. [1] o) Make pmap_align_tlb() on MIPS align addresses so that they do not start on an odd boundary within the TLB, so that they are suitable for insertion as wired entries and do not have to share a TLB entry with another mapping, assuming they are appropriately-sized. o) Eliminate md_realstack now that the kstack will be appropriately-aligned on MIPS. o) Increase the number of guard pages to 2 so that we retain the proper alignment of the kstack address.
Reviewed by: [1] alc X-MFC-after: Making sure alc has not come up with a better interface.
|
206803 |
18-Apr-2010 |
rpaulo |
Delete svn:executable prop.
|
206749 |
17-Apr-2010 |
jmallett |
o) Make pcb_onfault a pointer rather than an obscure integer value. o) Mask off PAGE_MASK bits in pmap_update_page, etc., rather than modifying the badvaddr in trapframe. Some nearby interfaces already did this. o) Make PTEs "unsigned int" for now, not "unsigned long" -- we are only ready for them to be 32-bit on 64-bit platforms. o) Rather than using pmap_segmap and calculating the offset into the page table by hand in trap.c, use pmap_pte(). o) Remove unused quad_syscall variable in trap.c. o) Log things for illegal instructions like we do for bad page faults. o) Various cast cleanups related to how to print registers. o) When logging page faults, show the page table information not just for the program counter, but for the fault address. o) Modify support.S to use ABI-neutral macros for operating on pointers. o) Consistently use CALLFRAME_SIZ rather than STAND_FRAME_SIZE, etc. o) Remove unused insque/remque functions. o) Remove some coprocessor 0 accessor functions implemented in assembly that are unused and have inline assembly counterparts.
|
206746 |
17-Apr-2010 |
jmallett |
o) Add NPDEPG, like NPTEPG but for PDEs. o) Remove NBPG, PGOFSET and PGSHIFT. Use the standard names. o) Remove some unused macros and move things from param.h to vmparam.h that belong in the latter. (Actually, all of the kernel segment values, virtual addresses, etc., belong in one place, but this is a step in the right direction.)
|
206721 |
17-Apr-2010 |
jmallett |
o) Add SMP support for Octeon using U-Boot to launch all the processors at the same time. o) Remove some unused trivial uart functions from octeon_machdep now that the uart part is fully working and they are unused. o) Use __func__ instead of __FUNCTION__. o) Use intr_*() instead of other routines that do the same thing. o) Remove some duplicate printfs from the Octeon port, as well as duplicate setting of Maxmem. o) Use the right frequency divider on Octeon. o) Use PCPU_GET(cpuid) consistently to get the cpuid of the running core. o) Remove some unused macros in the Octeon port. o) Use mips_sync() around use of the global dpcpu, whose value may not be visible to APs at first. o) When loading the first thread's stack, use macros to make the code correct for n64 as well. o) Remove stub, do-nothing FAU init/enable/disable functions from the RGMX driver.
|
206718 |
17-Apr-2010 |
jmallett |
o) Back out my previous change to SWARM; some of it was to address an issue that turned out to be unrelated, and the rest was, as pointed out by Neel, just wrong-headed. o) Tweak mem.c to fix use of /dev/kmem for direct-mapped addresses.
|
206717 |
17-Apr-2010 |
jmallett |
o) Use inline functions to access coprocessor 0 registers rather than external ones implemented using assembly. o) Use TRAPF_USERMODE() consistently rather than USERMODE(). Eliminate <machine/psl.h> as a result. o) Use intr_*() rather than *intr(), consistently. o) Use register_t instead of u_int in some trap code. o) Merge some more endian-related macros to machine/asm.h from NetBSD. o) Add PTR_LI macro, which loads an address with the correct sign-extension for a pointer. o) Restore interrupts when bailing out due to an excessive IRQ in nexus_setup_intr(). o) Remove unused functions from psraccess.S. o) Enter temporary virtual entries for large memory access into the page tables rather than simply hoping they stay resident in the TLB and we don't need to do a refill for them. o) Abstract out large memory mapping setup/teardown using some macros. o) Do mips_dcache_wbinv_range() when using temporary virtual addresses just like we do when we can use the direct map.
|
206716 |
17-Apr-2010 |
jmallett |
o) Remove code related to VM_ALLOC_WIRED_TLB_PG_POOL, VM_KERNEL_ALLOC_OFFSET and floating pages. They are unused and unsupported.
|
206715 |
16-Apr-2010 |
jmallett |
Adjust limits and formats for ABIs with 64-bit longs.
|
206714 |
16-Apr-2010 |
jmallett |
o) Use the direct map where possible for uiomove_fromphys, based on code from sparc64. o) Use uiomove_fromphys rather than the broken fpage mechanism for /dev/mem. o) Update sf_buf allocator to not share buffers and to do a pmap_qremove when done with an sf_buf so as to better track valid mappings.
|
206713 |
16-Apr-2010 |
jmallett |
o) Fix the intr_* functions to not spam the whole status register, just the IE bit. o) Remove some unused inlines. o) Generate CP0 access functions for 64-bit TLB registers when building for n64. o) Add an inline function version of the COP0_SYNC macro.
|
206712 |
16-Apr-2010 |
jmallett |
Set KERNLOADADDR and TARGET_BIG_ENDIAN for SWARM.
|
206695 |
16-Apr-2010 |
jmallett |
Remove some unused header files.
|
206584 |
14-Apr-2010 |
neel |
Destroy the pmap 'pm_mutex' in pmap_release() otherwise we will panic subsequently in pmap_pinit() with the following signature:
panic: lock "pmap" 0xc7878bc8 already initialized
This bug was uncovered by the changes made to vm_map.c in r206140.
|
206582 |
14-Apr-2010 |
neel |
Revert the vm_machdep.c part of r205072.
This causes a panic in vm_thread_dispose() when it tries to add this kstack to the kstack cache. This happens only when 'td_kstack' is not (PAGE_SIZE * 2) bytes aligned and we have unmapped the page at that address in cpu_thread_alloc.
Pointed out by: nwhitehorn@
|
206405 |
09-Apr-2010 |
nwhitehorn |
Fix a bug where bus_dma_load_xxx() would not bounce misaligned buffers due to rounding the buffer's physical address to the beginning of its page. This fixes a panic in arge(4) when using PPPoE.
Reported by: Jakob van Santen <vansanten at wisc dot edu> Reviewed by: gonzo Obtained from: amd64
|
206404 |
08-Apr-2010 |
imp |
Add BUS_SPACE_UNRESTRICTED and define it to be ~0, just like all the other platforms.
|
206400 |
08-Apr-2010 |
gonzo |
- Fix mutex type for miibus_mtx: it's not spinlock, it's def lock
|
205863 |
29-Mar-2010 |
imp |
Enable module builds now that the build completes for them. This should get them into the universe rotation.
|
205675 |
26-Mar-2010 |
neel |
Replace sb_store64()/sb_load64() with mips3_sd()/mips3_ld() respectively.
Obtained from NetBSD.
Suggested by: jmallett@
|
205642 |
25-Mar-2010 |
nwhitehorn |
Change the arguments of exec_setregs() so that it receives a pointer to the image_params struct instead of several members of that struct individually. This makes it easier to expand its arguments in the future without touching all platforms.
Reviewed by: jhb
|
205576 |
24-Mar-2010 |
neel |
Fix periodic "t_delta 16.01359db7eb5eb3c0 too long" messages on the console by accounting for the "lost time" between when the timer interrupt fired and when clock_intr() actually started executing.
|
205364 |
20-Mar-2010 |
neel |
Sibyte provides a 64-bit read-only counter that counts at half the processor frequency. This counter can be accessed coherently from both cores.
Use this as the preferred timecounter for the SWARM kernels.
The CP0 COUNT register is unusable as the timecounter on SMP platforms because the COUNT registers on different CPUs are not guaranteed to be in sync.
|
205363 |
20-Mar-2010 |
neel |
Make sure that the registers 'v0' and 'v1' are properly sign-extended when sb_load64() returns.
Some 32-bit arithmetic operations (e.g. subu) have unpredicatable results when operating on 64-bit registers that are not properly sign-extended.
|
205361 |
20-Mar-2010 |
neel |
Get rid of unused macro MIPS_MEM_RID.
Suggested by: Alexandr Rybalko (ray@dlink.ua)
|
205360 |
20-Mar-2010 |
neel |
This change enables use of physical memory that is beyond the direct mapped kseg0 region.
The basic idea is to use KVA from the kseg2 region for mapping page table pages that lie beyond the direct mapped region.
The TLB miss handler can now recursively fault into the TLB invalid handler if it dereferences a kseg2 page table page address that is not in the TLB.
Tested by: JC (c.jayachandran@gmail.com)
|
205158 |
14-Mar-2010 |
imp |
Go ahead and add USB support to the generic config.
|
205115 |
13-Mar-2010 |
jmallett |
o) Use octeon_fpa_alloc_phys in a situation in which we don't need a usable pointer, rather than octeon_fpa_alloc. o) Report half duplex status properly. o) Do not unconditionally update the last known link status in the softc. If report_link isn't set, when octeon_rgmx_config_speed is called the first time it will tell the driver (essentially) that we have already marked the interface up. Likewise, don't change media speed and duplex if only the link status is at issue. [1] o) Remove manual changing of link state and let octeon_rgmx_config_speed do the heavy lifting. [1]
Reviewed by: [1] imp Sponsored by: Packet Forensics
|
205072 |
12-Mar-2010 |
neel |
- Enable kernel stack guard page.
- Unmap the unused kernel stack page that we cannot use because it is not aligned on a (PAGE_SIZE * 2) boundary.
|
205064 |
12-Mar-2010 |
neel |
Make the ddb command "show tlb" SMP friendly.
It now accepts an argument to dump out the tlb of a particular cpu.
|
205061 |
12-Mar-2010 |
jmallett |
o) Send packets being queued for transmission up to BPF if there's a listener. o) Properly configure the CAM to handle IFF_PROMISC and note where IFF_ALLMULTI handling would go if we didn't already force the NIC to receive all multicast traffic.
Reviewed by: imp Sponsored by: Packet Forensics
|
205049 |
11-Mar-2010 |
jmallett |
Add bpf and random to Octeon configurations, since they're needed to run dhclient and ssh respectively.
Reviewed by: imp
|
205048 |
11-Mar-2010 |
jmallett |
Don't force single user on Octeon anymore.
|
205047 |
11-Mar-2010 |
jmallett |
o) Eliminate use of sc->typestr, which is always NULL. o) Inline octeon_rgmx_mark_ready into octeon_rgmx_init. o) Add a media status handler that reports link and media status. o) Set link state when if_init is called. o) Remove some printfs related to driver state changes. o) Remove some gratuitous comments.
Reviewed by: imp Sponsored by: Packet Forensics
|
204997 |
11-Mar-2010 |
neel |
Stash the context of the running thread at the time an IPI_STOP is received in 'stoppcbs[]'. We use the 'stoppcbs[]' context to generate the backtrace of such stopped threads.
|
204789 |
06-Mar-2010 |
jmallett |
Check for device faults and for failures to set DRQ when expected, rather than spinning forever. This fixes booting with CF ejected.
NB: I've made the driver pretty chatty about errors in case there's hardware that operates differently to mine, so we can easily track down any issues.
Reviewed by: imp Sponsored by: Packet Forensics
|
204788 |
06-Mar-2010 |
jmallett |
o) Consistently use MIPS_KSEGn_TO_PHYS instead of MIPS_{,UN}CACHED_TO_PHYS etc. Get rid of the macros that spell KSEG0 CACHED and KSEG1 UNCACHED. o) Get rid of some nearby duplicated and unused macros.
Reviewed by: imp
|
204778 |
05-Mar-2010 |
jmallett |
o) Simplify the implementation of bus read/write functions, and eliminate some redundant implementations. o) Use ABI, not ISA, to determine address length. o) Disable and restore interrupts around any operation that uses all 64 bits of a register. In kernels using the O32 ABI, the upper 32 bits of those registers is likely to be corrupted by an interrupt.
Sponsored by: Packet Forensics
|
204777 |
05-Mar-2010 |
jmallett |
Properly detect a type of real board that claims to have a 0.0 revision. This fixes at least memory detection on that board.
Sponsored by: Packet Forensics
|
204776 |
05-Mar-2010 |
jmallett |
Do not mask off the low byte of the chipid, it makes some of the case statements unreachable and seems to be wrong. Fixes detection of the number of ports available on some models.
Sponsored by: Packet Forensics
|
204690 |
04-Mar-2010 |
neel |
Remove some unused cruft.
|
204689 |
04-Mar-2010 |
neel |
Add support for CPUs with cache coherent DMA. The two main changes are:
- We don't need to fall back to uncacheable memory to satisfy BUS_DMA_COHERENT requests on these CPUs.
- The bus_dmamap_sync() is a no-op for these CPUs.
A side-effect of this change is rename DMAMAP_COHERENT flag to DMAMAP_UNCACHEABLE. This conveys the purpose of the flag more accurately.
Reviewed by: gonzo, imp
|
204666 |
03-Mar-2010 |
imp |
Looks like S8 and SP are reversed in setjmp, so longjmp doesn't work as well as one would hope....
Submitted by: Arten Belevich
|
204646 |
03-Mar-2010 |
joel |
The NetBSD Foundation has granted permission to remove clause 3 and 4 from the software.
Obtained from: NetBSD
|
204635 |
03-Mar-2010 |
gnn |
Add support for hwpmc(4) on the MIPS 24K, 32 bit, embedded processor.
Add macros for properly accessing coprocessor 0 registers that support performance counters.
Reviewed by: jkoshy rpaulo fabien imp MFC after: 1 month
|
204617 |
03-Mar-2010 |
imp |
Spell START_FRAME CALLFRAME_SIZ now.
|
204577 |
02-Mar-2010 |
rrs |
- Move rmi_pci_bus_space to header and avoid extern - remove unused and commented code (MIPS_BUS_SPACE_PCI, pic_usb_ack) - use rmi_pci_bus_space for USB too (needs byteswap) - uncomment xls_ehci.c in files.xlr - changes to xls_ehci.c - updated with dev/usb/controller/ehci_*.c as
Obtained from: JC - c.jayachandran@gmail.com
|
204557 |
02-Mar-2010 |
imp |
Update macros for multiple ABI support from NetBSD. Also update SZREG define in ucontext
|
204175 |
21-Feb-2010 |
rrs |
Fix another fo-pa of mine... duplicate patches should not be applied and randy needs coffee in the morning when working to help keep things sorted out... obviously :-)
|
204137 |
20-Feb-2010 |
rrs |
Fix for the rge driver for boards without rge6 and rge7. - changes to avoid adding theses instances on specific chips Obtained from: C. Jayachandran - JC - c.jayachandran@gmail.com
|
204136 |
20-Feb-2010 |
rrs |
Changes for pci and pci-e support - add bus_space_rmi_pci.c for PCI bus space - files.xlr update for changes in files - pcibus.c merged into xlr_pci.c (they were small files with inter-dependencies) - xlr_pci.c - lot of changes here with few fixes, formatting cleanup Obtained from: C. Jayachandran (JC) - c.jayachandran@gmail.com
|
204135 |
20-Feb-2010 |
rrs |
Opps forgot to add this: - add bus_space_rmi_pci.c for PCI bus space
Obtained from: C. Jayachandran - <c.jayachandran@gmail.com>
|
204131 |
20-Feb-2010 |
rrs |
Cleanups for sys/mips/rmi/bus_space_rmi.c - remove pci related code from bus_space_rmi.c, we will have another file for PCI bus space functions which will do byte-swapping. - remove local SWAP implementation - added TODO stub for unimplemented functions
Obtained from: C. Jayachandran - c.jayachandran@gmail.com
|
204130 |
20-Feb-2010 |
rrs |
Some fixes to the current RMI interrupt handling, changes in this patch are: - (cleanup) remove rmi specific 'struct mips_intrhand' - this is no longer needed since 'struct intr_event' have all the required hooks - add xlr_cpu_establish_hardintr, which has args for pre/post ithread and filter hooks, so that the PCI code can add the PCI controller interrupt ack code here - make 'cpu_establish_hardintr' use the above function. - (fix) change type of eirr/eimr from register_t to uint64_t. These have to be 64bit otherwise we cannot handle interrupts from 32. - (fix) use eimr to mask eirr before checking interrupts, so that we will not handle masked interrupts.
Obtained from: C. Jayachandran - c.jayachandran@gmail.com
|
204109 |
20-Feb-2010 |
neel |
Fix DDB backtrace that includes a kernel exception frame.
The backtrace code tries to look for an instruction of the form "sw ra, x(sp)" to figure out the program counter of the calling function. When we generate the kernel exception frame we store the 'ra' at the time of the exception using an instruction of the same form. The problem is that the 'ra' at the time of the exception is not the same as the 'program counter' at the time of the exception.
The fix is to save the 'exception program counter' register by staging it through the 'ra' register.
|
204108 |
20-Feb-2010 |
neel |
Get rid of unused options: KERNPHYSADDR, KERNVIRTADDR, PHYSADDR, PHYS_ADDR_64BIT
Discussed with: gonzo, imp
|
204093 |
19-Feb-2010 |
kan |
Define DMA_RX_STATUS_OVERFLOW with correct value.
The RX overflow is reported in bit 2 on real hardware and Linux driver for the same device already has this defined correctly. This fixes frequent interrupt storms seen on RouterStation Pro boards.
Discussed with: gonzo
|
204056 |
18-Feb-2010 |
imp |
Hack to make ALCHEMY compile again...
|
204055 |
18-Feb-2010 |
imp |
Make printfs work for both OCTEON1 and OCTEON1-32
|
204054 |
18-Feb-2010 |
imp |
Parens around tertiary operator so that casting the result works...
|
204052 |
18-Feb-2010 |
imp |
Use proper structure type for 64-bit headers
# this fixes the MALTA64 build
|
204031 |
18-Feb-2010 |
neel |
Kernel module support for mips.
Reviewed by: gonzo
Tested by: Alexandr Rybalko (ray@dlink.ua)
|
203985 |
17-Feb-2010 |
neel |
Various fixes to get the SWARM config working on a big-endian Sibyte CPU.
Getting the little-endian PCI bus working on the big-endian CPU proved to be quite challenging. We let the PCI devices be mapped in the "match byte lanes" address window. This is where they are mapped by the CFE and DMA transfers generated to or from addresses within this window are not subject to automatic byte-swapping.
However any access by the driver to memory-mapped pci space is redirected via the "match bit lanes" address window. We get the benefit of automatic byte swapping through this address window and drivers don't need to change to deal with CPU big-endianness.
|
203940 |
16-Feb-2010 |
gonzo |
- Clean-up output of memory banks info
|
203938 |
15-Feb-2010 |
attilio |
Adjust style (following the already existing rules) for the newly introduced option DEADLKRES.
Reported by: danfe, julian, avg
|
203796 |
12-Feb-2010 |
neel |
Remove the PCI_IOSPACE_SIZE and PCI_IOSPACE_ADDR hack from nexus.c. Implement this in the Sibyte PCI hostbridge driver instead.
The nexus driver sees resource allocation requests for memory and irq resources only. These are legitimate resources on all MIPS platforms.
Suggested by: imp
|
203758 |
10-Feb-2010 |
attilio |
Add the options DEADLKRES (introducing the deadlock resolver thread) in the 'debugging' section of any HEAD kernel and enable for the mainstream ones, excluding the embedded architectures. It may, of course, enabled on a case-by-case basis.
Sponsored by: Sandvine Incorporated Requested by: emaste Discussed with: kib
|
203754 |
10-Feb-2010 |
rrs |
If a mbuf is split across two pages, we have code that detects this and makes two transmit descriptors. However its possible that the algorithm detects when the second page is not used (when the data aligns perfectly to the bottom of the page). This caused a 0 len descriptor to be added which locks up the rge device. Skip such things with a continue.
JC provided this patch... Thanks JC :-) Obtained from: JC (c.jayachandran@gmail.com)
|
203746 |
10-Feb-2010 |
neel |
Code cleanup: - make some variables static - remove unused variables.
|
203745 |
10-Feb-2010 |
neel |
Call profclock() and statclock() explicitly on all cpus. Prior to this change these functions were called only on the BSP indirectly via hardclock().
top -P now shows usage statistics of all cpus.
|
203743 |
10-Feb-2010 |
neel |
Enable interrupts before doing AST processing to avoid a deadlock.
Specifically on an SMP kernel it was observed that if both the processors are doing an exit1() via ast()->postsig()->sigexit() then we will deadlock.
This happens because exit1() calls vmspace_exit() that in turn calls pmap_invalidate_all(). This function tries to do a smp_rendezvous() which blocks because the other processor is not responding to IPIs - because it too is doing AST processing with interrupts disabled.
|
203697 |
09-Feb-2010 |
neel |
SMP support for the mips port.
The platform that supports SMP currently is a SWARM with a dual-core Sibyte processor. The kernel config file to use is SWARM_SMP.
Reviewed by: imp, rrs
|
203511 |
05-Feb-2010 |
neel |
Correct a comment - we are not setting the exception level but rather are disabling interrupts.
Simplify register usage - we can directly load 'curpcb' into 'k1' after interrupts are disabled. There is no need to do so indirectly through 'a1'.
|
203510 |
05-Feb-2010 |
neel |
Initialize interrupt controller early on.
|
203509 |
05-Feb-2010 |
neel |
Reimplement all functions to access the system control unit in C.
The only reason we need to have the sb_load64() and sb_store64() functions in assembly is to cheat the compiler and generate the 'ld' and 'sd' instructions which it otherwise will not do when compiling for a 32-bit architecture. There are some 64-bit registers in the SCD unit that must be accessed using 64-bit load and store instructions.
|
203508 |
05-Feb-2010 |
neel |
style: don't need to use braces for single line control statements.
|
203477 |
04-Feb-2010 |
neel |
Compile SWARM with KTRACE support.
|
203476 |
04-Feb-2010 |
neel |
Get system call tracing using ktrace working for mips.
|
203474 |
04-Feb-2010 |
neel |
Clean up all places in exception.S that fiddle with 'pcpup' directly. We now use the GET_CPU_PCPU() macro exclusively.
This isolates the users of pcpu data from its implementation details.
Reviewed by: imp
|
203415 |
03-Feb-2010 |
neel |
Reduce the size of the array used to store the TLB mappings for the kernel stack from 3 to 2.
We only map in 2 pages for the kernel stack.
Approved by: imp (mentor)
|
203180 |
30-Jan-2010 |
neel |
Provide access to pcpu structures for SMP kernels.
The basic idea is to use a the same virtual address as a window onto distinct physical memory locations - one per processor. The physical address that you access through this mapping depends on which cpu you are currently executing on. We can now use the same virtual address on any processor to access its per-cpu area.
The details are:
- The virtual address for 'struct pcpu *pcpup' is obtained by stealing 2 pages worth of KVA in pmap_bootstrap().
- The mapping from the constant virtual address to a distinct physical page is done in cpu_pcpu_init() through a wired TLB entry.
- A side-effect of this is that we reserve 2 pages worth of memory for the pcpu but in reality it needs much less than that. The unused memory is now used as the boot stack for the BSP and APs.
Remove SMP-specific bits from locore.S. The plan is to use a separate mpboot.S for AP bootstrap.
Discussed on: freebsd-mips
Approved by: imp (mentor)
|
203152 |
29-Jan-2010 |
rrs |
Follow Neel's suggestion and switch to using restoreint() in combination with saving off the old level. That way we don't blast out the old level.
|
203151 |
29-Jan-2010 |
rrs |
For our memory re-mapping trick to work interrupts must be disabled through the page_zero's or copys etc. Note that the temporary mapping used by panic's may cause us pain since int's may not be disabled. When we get dumps working we may have to revist this. Note that with this fix the build got much much further.. until it hung on disk IO (I would imagine thats the rge/msgring driver acting up).
|
203150 |
29-Jan-2010 |
rrs |
Its possible that our RMI box has memory extending above 4Gig. If so when we add the base address with the size we will wrap. So for now we just ignore such memory and only use what we can. When we get 64 bit working then we will be much better ;->
|
203149 |
29-Jan-2010 |
rrs |
Move ID up into comment block.. per bsdimp
|
203132 |
28-Jan-2010 |
gonzo |
- Increase timeouts to 100 milliseconds, 1 millisecond is definitely not enough for PCI controller to get into shape
Thanks to: adrian@
|
203130 |
28-Jan-2010 |
imp |
Add Cavium's standard copyright to those files that are currently lacking a copyright/license statement. All these files were in the Cavium FreeBSD source drop and appear to be written by Cavium (some are nearly verbatim copies of files from the cnusers' 1.9.0 SDK, which also uses this copyright).
|
203129 |
28-Jan-2010 |
imp |
We make it to single user well, but not so well to multi-user. Force single user for the moment since that's a better experience for people trying this code out...
|
203128 |
28-Jan-2010 |
imp |
trim unused members of the softc.
|
203116 |
28-Jan-2010 |
cognet |
Comment out any reference to ALCHEMY.hints until it's committed, to unbreak make universe.
Spotted out by: gahr
|
203115 |
28-Jan-2010 |
rrs |
Fix two of the extended memory hacks. The copy pages routine in one place was setting the valid2 bit to 2 not 1. This meant the PTE was NOT valid and so you would crash.
In Zero Page there was a incorrect setting of the valid bit AFTER the actual zero (opps)..
Hopefully this will fix the 0xc0000000 crashes that I have been seeing (unless of course there are other problems with these old hacks of mine to get to memory above 512Meg)
|
203114 |
28-Jan-2010 |
rrs |
Adds additional hacks for proper bits so that the RMI/XLR has the COP0 and COP2 bits enabled Plus it needs SX too. Thanks again for JC in catching this ;-)
Submitted by: JC (jayachandranc@netlogicmicro.com
|
203113 |
28-Jan-2010 |
rrs |
Make compilable.. i.e. the FreeBSD id I added must be in comments.
|
203112 |
28-Jan-2010 |
rrs |
Changes the msg ring so its a filter not a handler. Somehow rrs missed this.. Thanks to JC for catching this ;-)
Obtained from: JC (jayachandranc@netlogicmicro.com
|
203080 |
27-Jan-2010 |
kan |
Do not leave dirty cache lines behind if bus_dmamap_sync was called to invalidate memory chunk that starts or ends in the middle of cache line.
This was responsible for one half of the problem preventing umass to work reliably on some MIPS32 platforms. USBng needs to stop sharing cache lines between DMA-able memory and other structures to cure the other half.
Discussed with: imp, gonzo
|
203076 |
27-Jan-2010 |
imp |
Make a note that this file is the 64-bit version and experimental and point people at the OCTEON1-32 file instead.
|
203075 |
27-Jan-2010 |
imp |
Move back to physical address 0x01000000. 0x00100000 seems to have problems sometimes for reasons I haven't tracked down.
|
203024 |
26-Jan-2010 |
rrs |
Spacing changes in pic_ack and pic_delayed_ack
|
203011 |
26-Jan-2010 |
rrs |
My current conf, that comes up but locks up in make buildworld.
You need to follow the mips wiki for building the nfs partition and setup things to mount there (in the conf and in your bootp setup).
|
203010 |
26-Jan-2010 |
rrs |
1) Make sure static is init'd to 0 2) In one place make sure we call the backup startup routine (from the timer).
|
203009 |
26-Jan-2010 |
rrs |
To prevent a LOR we need to pass in a lock flag in the pic routines. In some places we hold the pic lock, others we do not.
|
203008 |
26-Jan-2010 |
rrs |
Fix up the msg ring driver a bit tighter so that we don't loose an interrupt which we appeared to be doing.
|
203007 |
26-Jan-2010 |
rrs |
Fixes setup of clock. It was not properly initialized, thus backward time warnings were being spewed to the console.
|
203000 |
26-Jan-2010 |
neel |
Install the XTLB exception handler for Sibyte processors.
This is a workaround for the fact that the CFE is compiled as a 64-bit application and therefore sets the SR_KX bit every time we call into it (for e.g. console).
A TLB miss for any address above 0xc0000000 with the SR_KX bit set will end up at the XTLB exception vector. We workaround this by copying the standard TLB handler at the XTLB exception vector.
Approved by: imp (mentor)
|
202999 |
26-Jan-2010 |
neel |
Add a DDB command "show trapframe" to dump out contents of the trapframe specified by the first argument.
Approved by: imp (mentor)
|
202998 |
26-Jan-2010 |
neel |
Print the address of the base of the stackframe in DDB backtrace output.
Approved by: imp (mentor)
|
202997 |
26-Jan-2010 |
imp |
Doh. Remove extra pcpu initialization that I thought was needed, but isn't needed since we moved all that into mips_pcpu0_init.
|
202996 |
26-Jan-2010 |
neel |
Fix a problem seen when a new process was returning to userland through fork_trampoline.
This was caused because we were clearing the SR_INT_IE and setting SR_EXL bits of the status register at the same time. This meant that if an interrupt happened while this MTC0 was making its way through the pipeline the exception processing would see the status register with SR_EXL bit set. This in turn would mean that the COP_0_EXC_PC would not be updated so the return from exception would be to an incorrect address.
It is easy to verify this fix by a program that forks in a loop and the child just exits:
while (1) { pid_t pid = vfork(); if (pid == 0) _exit(0); if (pid != -1) waitpid(pid, NULL, 0); }
Also remove two instances where we set SR_EXL bit gratuitously in exception.S.
Approved by: imp (mentor)
|
202985 |
25-Jan-2010 |
imp |
Export knowledge of the special bus space we use for the console to obio. Take advantage of the fact that obio only really supports uart at the moment to use the uart bus tag always for IOPORT allocations.
# this needs to be redone to conform to FreeBSD standards and allow for # additional drivers for SoC hardware to attach
|
202984 |
25-Jan-2010 |
imp |
Turn on debugging on the fpa unit. Fix some printfs that were only enabled for debugging. This should be turned off before we release, but we need it for the moment.
|
202983 |
25-Jan-2010 |
imp |
Store the mutex in the correct location. Before, we were storing it in the pcb at the td_lock offset, rather than in the struct thread at the td_lock offset. And we were storing a pointer to the old thread rather than to the mutex. Why this didn't always kill us, I'll never know.
Fix an obsolete comment and update the prototype in the comments. Also note what variables are in what registers since this function is a little complex...
neel@ found this problem and proposed this fix. This cures a number of different problem reports out there, and gets us booting octeon to the login prompt...
Submitted by: neel@ Reviewed by: rrs@, gonzo@
|
202975 |
25-Jan-2010 |
imp |
Fix device name for root.... Indent rgmii correctly. Remove stale comments.
|
202973 |
25-Jan-2010 |
imp |
Comment out the led wheel code for the moment. Likely it shouldn't even be here in the first place, but it is cool to see FreeBSD scrolling on the LED pannel of the octeon board when we're running...
|
202954 |
25-Jan-2010 |
gonzo |
- Call post-boot fixup function in order to get proper static symbols resolving in DDB - When zeroing .bss/.sbss do not round end address to page boundary, it's not neccessary and might destroy data pased by trampoline or boot loader
|
202939 |
24-Jan-2010 |
imp |
o Write the soft reset bit in the cavium core to reset. [1] o panic if the board boot descriptor is too old...
Obtained from: [1] looking at the cavium sdk's executive code
|
202909 |
24-Jan-2010 |
gonzo |
- Introduce kernel_kseg0_end variable that marks first address in KSEG0 available for use. All data below this address considered to be used by kernel. Along with kernel own data it might be symbol tables prepeared by trampoline code, boot loader service data passed for further analysis by kernel, etc... By default kernel_kseg0_end points to the end of loaded kernel.
- Introduce mips_postboot_fixup function. It checks for symbol information copied by ELF trampoline and passes it to KDB
|
202908 |
24-Jan-2010 |
gonzo |
- Copy symbol-related tables (.symtab and .strtab) to the end of relocated kernel. We use magic number to signal kernel that symbol data is present.
|
202905 |
24-Jan-2010 |
rrs |
Changes the order of the setting the int happened (inside the lock).
|
202867 |
23-Jan-2010 |
imp |
Eliminate octeonregs.h. It was a copy of maltaregs.h with s/malta/octeon/gi done...
|
202864 |
23-Jan-2010 |
neel |
Remove Sibyte specific code from locore.S that sets the k0seg coherency.
Move it to platform_start() instead.
Approved by: imp (mentor)
|
202850 |
23-Jan-2010 |
imp |
Migrate from old "DDB" style debugger to newer KDB style.
|
202849 |
23-Jan-2010 |
imp |
Update from old DDB convetion to initialize debugger to new KDB way. Always call kdb_init(). If we have KDB enabled, then provide a handy place to break to the debugger.
|
202839 |
22-Jan-2010 |
gonzo |
- Add driver for PCF2123, SPI real time clock/calendar
|
202834 |
22-Jan-2010 |
imp |
Declare octeon_get_clock_rate, now exported from octeon_machdep
|
202833 |
22-Jan-2010 |
imp |
Remove some irrelevant commented out make options.
|
202832 |
22-Jan-2010 |
imp |
make note of the nonsensical nature of the values in this hints file.
|
202831 |
22-Jan-2010 |
imp |
o Add support for memory above 256MB on the octeon. o Force the ebase to be 0x80000000 (the base that we're booted with may need to be respected in the future). o Initialize the clock early so we can initialize the console early o use panic where we can now use it. o Tag some code for parsing the boot records as belonging in the cavium sdk. o remove support for booting on ancient boards...
# we make it further in bootstrapping now: interrupts being enabled in the # uarts are now taking us out, it seems, for reasons unknown.
|
202830 |
22-Jan-2010 |
imp |
Create a method of last resort for rebooting the mips processor: jump to the reset vector. This works for many SoCs where other reset hardware is either missing or unknown.
|
202809 |
22-Jan-2010 |
rrs |
This hopefully will fix the network problem I was seeing. Basically the msg ring interrupt was being re-enabled inside a spinlock as the thread set it self up for rescheduling. This won't work since inside the re-enable is another spin lock.. which means on return from the reenable the interrupts have been reenabled. Thus you would get a clock int and end up panicing holding a spin lock to long :-o
|
202806 |
22-Jan-2010 |
rpaulo |
Remove duplicate bootverbose increment.
|
202797 |
22-Jan-2010 |
imp |
Add a suggested improvement.
|
202786 |
22-Jan-2010 |
imp |
Don't clear bss/sbss. The boot loader already does this. In addition, the Cavium version of the boot loader puts data just after &end, so our rounding up to the next page in clearing memory overwrote their data, which meant we'd get a lot of wrong values for parameters to the system.
While I'm here, remove argc/argv parsing. Those values aren't passed in via a0 and a1, so it was a guaranted panic on some boards.
|
202785 |
22-Jan-2010 |
imp |
Jump to the mips reset vector. OR in the 0x80000000 for kseg0 and cast it to a long so it will work on 64-bit targets.
reset now works on octeon, so I don't have to power cycle the board as often.
|
202732 |
21-Jan-2010 |
neel |
Get rid of redundant setting of interrupt enable bit when restoring the status register from the PCB.
Remove a couple of misleading comments while I am here. The comments are misleading because they imply that interrupts will be enabled after the status register is restored from the PCB. This is not the case because the processor is at the exception level (SR_EXL is set).
Approved by: imp (mentor)
|
202723 |
21-Jan-2010 |
gonzo |
- Remove unnecessary register writes in activate_device and deactivate_device - Save state before attaching driver and restore it when detaching - Clear CLK bit after last bit of byte has been sent over the bus providing falling edge for last byte in transfer - Fix several places where CS0 was always assumed - Add $FreeBSD$ to ar71xxreg.h
|
202698 |
20-Jan-2010 |
neel |
Get rid of unused function MipsTLBInvalidException().
Approved by: imp (mentor)
|
202697 |
20-Jan-2010 |
neel |
Make sure that interrupts are enabled when thread0 is running.
Approved by: imp (mentor)
|
202634 |
19-Jan-2010 |
jhb |
Move the examples for the 'hints' and 'env' keywords from various GENERIC kernel configs into NOTES.
Reviewed by: imp
|
202175 |
12-Jan-2010 |
imp |
Set the svn:eol-style = native and svn:mime-type = text/plain properties on all files in this tree.
Submitted by: rpaulo@
|
202173 |
12-Jan-2010 |
imp |
Place proper svn:keywords tag on all these files. They were created somehow without them on projects/mips, and that mistake was propigated over to head.
Submitted by: rpaulo@
|
202172 |
12-Jan-2010 |
rpaulo |
Add a regular comment explaining what this file is.
|
202171 |
12-Jan-2010 |
rpaulo |
Fix svn properties and remove a P4 keyword.
|
202105 |
11-Jan-2010 |
imp |
Using svn cp rather than cp to copy these files over had the benefit of preserving their history. It had the problem that it also copied over mergeinfo data. Since we're retiring the projects/mips branch, I'm removing the svn:mergeinfo property from them all.
Submitted by: jhb
|
202092 |
11-Jan-2010 |
imp |
Correct a path in an include I missed earlier Remove references to if_watchdog. The rge_watchdog routine was empty anyway.
|
202090 |
11-Jan-2010 |
imp |
Remove redundant interrupt mapper code. We don't need to disable the interrupt sources feeding into a hardintr anymore. The mips_mask_hard_irq() function does that for us while an interrupt is being processed.
Submitted by: neel@
|
202089 |
11-Jan-2010 |
imp |
Get sb_zbpci.c compiling again after the macros PCI_BUSMAX, PCI_SLOTMAX and PCI_FUNCMAX were moved to pcireg.h.
Submitted by: neel@
|
202066 |
11-Jan-2010 |
imp |
Attempt to cope with the dev/rmi -> mips/rmi/dev move.
|
202065 |
11-Jan-2010 |
imp |
Cope with the octeon1->cavium move.
|
202064 |
11-Jan-2010 |
imp |
Cope with the octeon1->cavium move. Note: none of this junk belongs here.
|
202063 |
11-Jan-2010 |
imp |
Cope with the move and if_timer going way.
|
202046 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
sorry for the huge firehose on this commit, it would be too tedious to do file by file
r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the BSP. Provide a missing prototype.
r201880 | neel | 2010-01-08 19:17:14 -0700 (Fri, 08 Jan 2010) | 7 lines Compute the target of the jump in the 'J' and 'JAL' instructions correctly. The 256MB segment is formed by taking the top 4 bits of the address of the instruction in the "branch delay" slot as opposed to the 'J' or 'JAL' instruction itself.
r201845 | imp | 2010-01-08 15:48:21 -0700 (Fri, 08 Jan 2010) | 2 lines Centralize initialization of pcpu, and set curthread early...
r201770 | neel | 2010-01-07 22:53:11 -0700 (Thu, 07 Jan 2010) | 4 lines Add a DDB command "show pcb" to dump out the contents of a thread's PCB.
r201631 | neel | 2010-01-05 23:42:08 -0700 (Tue, 05 Jan 2010) | 5 lines Remove all CFE-specific code from locore.S. The CFE entrypoint initialization is now done in platform-specific code.
r201563 | neel | 2010-01-04 23:58:54 -0700 (Mon, 04 Jan 2010) | 6 lines This change increases the size of the kernel stack for thread0 from PAGE_SIZE to (2 * PAGE_SIZE). It depends on the memory allocated by pmap_steal_memory() being aligned to a PAGE_SIZE boundary.
r200656 | imp | 2009-12-17 16:55:49 -0700 (Thu, 17 Dec 2009) | 7 lines Place holder ptrace mips module. Not entirely sure what's required here yet, so I've not connected it to the build. I think that we'll need to move something into the processor specific part of the mips port by requiring mips_cpu_ptrace or platform_cpu_ptrace be provided by the ports to get/set processor specific registers, ala SSE registers on x86.
r200342 | imp | 2009-12-09 18:42:44 -0700 (Wed, 09 Dec 2009) | 4 lines app_descriptor_addr is unused (I know it is referened still). And unnecessary since we pass in a3 unmodified to platform_start. Eliminate it from here and kill one more TARGET_OCTEON in the process.
r199760 | imp | 2009-11-24 10:15:22 -0700 (Tue, 24 Nov 2009) | 2 lines Add in Cavium's CID. Report what the unknown CID is.
r199755 | imp | 2009-11-24 09:53:58 -0700 (Tue, 24 Nov 2009) | 5 lines looks like there's more to this patch than just this one file. I'll leave it to neel@ to get all the relevant pieces into the tree.
r199754 | imp | 2009-11-24 09:32:31 -0700 (Tue, 24 Nov 2009) | 6 lines Include opt_cputype.h for all .c and .S files referencing TARGET_OCTEON. Spell ld script name right. # for the most part, we need to enhance infrastructure to obviate the need # for such an intrusive option.
r199753 | imp | 2009-11-24 09:30:29 -0700 (Tue, 24 Nov 2009) | 3 lines Remove a comment that's bogus. Include opt_cputype.h since TARGET_OCTEON moved there.
r199752 | imp | 2009-11-24 09:29:23 -0700 (Tue, 24 Nov 2009) | 4 lines Make sure kstack0 is page aligned. # this may have been from neel@ for the sibyte stuff
r199742 | imp | 2009-11-24 01:35:11 -0700 (Tue, 24 Nov 2009) | 8 lines Move the hard-wiring of the dcache on octeon outside of the if statement. When no caches support was added, it looks like TARGET_OCTEON was bogusly moved inside the if. Also, include opt_cputype.h to make TARGET_OCTEON actually active.
# now we die in pmap init somewhere... Most likely because 32MB of RAM is # too tight given the load address we're using.
r199741 | imp | 2009-11-24 01:21:48 -0700 (Tue, 24 Nov 2009) | 2 lines TARGET_OCTEON reqiures opt_cputype.h.
r199736 | imp | 2009-11-24 00:40:38 -0700 (Tue, 24 Nov 2009) | 2 lines Prefer ANSI spellings of uintXX_t, etc.
r199598 | imp | 2009-11-20 09:30:35 -0700 (Fri, 20 Nov 2009) | 3 lines Horrible kludge to make octeon32 work. I think a better way is to move the generic code into the config files....
r199597 | imp | 2009-11-20 09:27:50 -0700 (Fri, 20 Nov 2009) | 4 lines cast vaddr to uintptr_t before casting it to a bus_space_handle_t. # I'm sure this indicates a problem, but I'm not sure what...
r199496 | gonzo | 2009-11-18 15:52:05 -0700 (Wed, 18 Nov 2009) | 5 lines - Add cpu_init_interrupts function that is supposed to prepeare stuff required for spinning out interrupts later - Add API for managing intrcnt/intrnames arrays - Some minor style(9) fixes
r199246 | neel | 2009-11-13 02:24:09 -0700 (Fri, 13 Nov 2009) | 10 lines Make pmap_copy_page() L2-cache friendly by doing the copy through the cacheable window on physical memory (KSEG0). On the Sibyte processor going through the uncacheable window (KSEG1) bypasses both L1 and L2 caches so we may end up with stale contents in the L2 cache.
This also makes it consistent with the rest of the function that uses cacheable mappings to copy pages.
Approved by: imp (mentor)
r198842 | gonzo | 2009-11-02 23:42:55 -0700 (Mon, 02 Nov 2009) | 3 lines - Handle errors when adding children to nexus. This sittuation might occure when there is dublicate of child's entry in hints
r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-)
r198569 | neel | 2009-10-28 23:18:02 -0600 (Wed, 28 Oct 2009) | 5 lines Deal with overflow of the COUNT register correctly. The 'cycles_per_hz' has nothing to do with the rollover.
r198550 | imp | 2009-10-28 11:03:20 -0600 (Wed, 28 Oct 2009) | 3 lines Remove useless for statement. i isn't used after it. Remove needless braces.
r198534 | gonzo | 2009-10-27 21:34:05 -0600 (Tue, 27 Oct 2009) | 8 lines - Fix busdma sync: dcache invalidation operates on cache line aligned addresses and could modify areas of memory that share the same cache line at the beginning and at the ending of the buffer. In order to prevent a data loss we save these chunks in temporary buffer before invalidation and restore them afer it. Idea suggested by: cognet
r198531 | gonzo | 2009-10-27 18:01:20 -0600 (Tue, 27 Oct 2009) | 3 lines - Remove bunch of declared but not defined cach-related variables - Add mips_picache_linesize and mips_pdcache_linesize variables
r198530 | gonzo | 2009-10-27 17:45:48 -0600 (Tue, 27 Oct 2009) | 3 lines - Replace stubs with actual cache info - minor style(9) fix
r198355 | neel | 2009-10-21 22:35:32 -0600 (Wed, 21 Oct 2009) | 11 lines Remove redundant instructions from tlb.S The "_MTC0 v0, COP_0_TLB_HI" is actually incorrect because v0 has not been initialized at that point. It worked correctly because we subsequently did the right thing and initialized TLB_HI correctly. The "li v0, MIPS_KSEG0_START" is redundant because we do exactly the same thing 2 instructions down.
r198354 | neel | 2009-10-21 20:51:31 -0600 (Wed, 21 Oct 2009) | 9 lines Get rid of the hardcoded constants to define cacheable memory: SDRAM_ADDR_START, SDRAM_ADDR_END and SDRAM_MEM_SIZE Instead we now keep a copy of the memory regions enumerated by platform-specific code and use that to determine whether an address is cacheable or not.
r198310 | gonzo | 2009-10-20 17:13:08 -0600 (Tue, 20 Oct 2009) | 5 lines - Commit missing part of "bt" fix: store PC register in pcb_context struct in cpu_switch and use it in stack_trace function later. pcb_regs contains state of the process stored by exception handler and therefor is not valid for sleeping processes.
r198264 | neel | 2009-10-19 22:36:08 -0600 (Mon, 19 Oct 2009) | 5 lines Fix a bug where we would think that the L1 instruction and data cache are present even though the line size field in the CP0 Config1 register is 0.
r198208 | imp | 2009-10-18 09:21:48 -0600 (Sun, 18 Oct 2009) | 3 lines Get the PC from the trap frame, since it isn't saved as part of the pcb regs.
r198205 | imp | 2009-10-18 08:55:55 -0600 (Sun, 18 Oct 2009) | 3 lines Use correct signature for MipsEmulateBranch. The other one doesn't work for 64-bit compiles.
r198182 | gonzo | 2009-10-16 18:22:07 -0600 (Fri, 16 Oct 2009) | 11 lines - Use PC/RA/SP values as arguments for stacktrace_subr instead of trapframe. Context info could be obtained from other sources (see below) no only from td_pcb field - Do not show a0..a3 values unless they're obtained from the stack. These are only confirmed values. - Fix bt command in DDB. Previous implementation used thread's trapframe structure as a source info for trace unwinding, but this structure is filled only when exception occurs. Valid register values for sleeping processes are in pcb_context array. For curthread use pc/sp/ra for current frame
r198181 | gonzo | 2009-10-16 16:52:18 -0600 (Fri, 16 Oct 2009) | 2 lines - Get rid of label_t. It came from NetBSD and was used only in one place
r198066 | gonzo | 2009-10-13 19:43:53 -0600 (Tue, 13 Oct 2009) | 5 lines - Move stack tracing function to db_trace.c - Axe unused extern MipsXXX declarations - Move all declarations for functions in exceptions.S/swtch.S from trap.c to respective headers
r197796 | gonzo | 2009-10-05 17:19:51 -0600 (Mon, 05 Oct 2009) | 2 lines - Revert part of r197685 because this change leads to wrong data in cache.
r197685 | gonzo | 2009-10-01 14:05:36 -0600 (Thu, 01 Oct 2009) | 2 lines - Sync caches properly when dealing with sf_buf
r197014 | imp | 2009-09-08 21:57:10 -0600 (Tue, 08 Sep 2009) | 2 lines Ugly hack to get this to compile. I'm sure there's a better way...
r197013 | imp | 2009-09-08 21:54:55 -0600 (Tue, 08 Sep 2009) | 2 lines First half of making this 64-bit clean: fix prototypes.
r196988 | gonzo | 2009-09-08 13:15:29 -0600 (Tue, 08 Sep 2009) | 2 lines - MFC from head@196987
r196313 | imp | 2009-08-17 06:14:40 -0600 (Mon, 17 Aug 2009) | 2 lines suword64 and csuword64. Needed by ELF64 stuff...
r196266 | imp | 2009-08-15 16:51:11 -0600 (Sat, 15 Aug 2009) | 5 lines (1) Fix a few 32/64-bit bugs. (2) Also, always allocate 2 pages for the stack to optimize TLB usage. Submitted by: neel@ (2)
r196265 | imp | 2009-08-15 16:48:09 -0600 (Sat, 15 Aug 2009) | 2 lines Various 32/64-bit confusion cleanups.
r196264 | imp | 2009-08-15 16:45:46 -0600 (Sat, 15 Aug 2009) | 6 lines (1) Some CPUs have a range to map I/O cyces on the pci bus. So allow them to work by allowding the nexus to assign ports. (2) Remove some Octeon junk that shouldn't be necessary. Submitted by: neel@ (#1) for SB1 port.
r196061 | gonzo | 2009-08-04 11:32:55 -0600 (Tue, 04 Aug 2009) | 2 lines - Use register_t for registers values
r195984 | gonzo | 2009-07-30 17:48:29 -0600 (Thu, 30 Jul 2009) | 4 lines - Properly unwind stack for functions with __noreturn__ attribute Submitted by: Neelkanth Natu <neelnatu@yahoo.com>
r195983 | gonzo | 2009-07-30 17:29:59 -0600 (Thu, 30 Jul 2009) | 4 lines - mark map as coherent if requested by flags - explicitly set memory allocation method in map flags instead of duplicating conditions for malloc/contigalloc
r195584 | imp | 2009-07-10 13:09:34 -0600 (Fri, 10 Jul 2009) | 3 lines Use PTR_* macros for pointers, and not potentially mips64 unsafe operations.
r195583 | imp | 2009-07-10 13:08:48 -0600 (Fri, 10 Jul 2009) | 2 lines Use PTR_* macros to deal with pointers.
r195579 | imp | 2009-07-10 13:04:32 -0600 (Fri, 10 Jul 2009) | 2 lines use ta0-ta3 rather than t4-t7 for n32/n64 goodness.
r195511 | gonzo | 2009-07-09 13:02:17 -0600 (Thu, 09 Jul 2009) | 3 lines - Ooops, this debug code wasn't supposed to get into final commit. My appologises.
r195478 | gonzo | 2009-07-08 16:28:36 -0600 (Wed, 08 Jul 2009) | 5 lines - Port busdma code from FreeBSD/arm. This is more mature version that takes into account all limitation to DMA memory (boundaries, alignment) and implements bounce pages. - Add BUS_DMASYNC_POSTREAD case to bus_dmamap_sync_buf
r195438 | imp | 2009-07-08 00:00:18 -0600 (Wed, 08 Jul 2009) | 2 lines Turns out this code was right, revert last change.
r195429 | gonzo | 2009-07-07 13:55:09 -0600 (Tue, 07 Jul 2009) | 5 lines - Move dpcpu initialization to mips_proc0_init. It's more appropriate place for it. Besides dpcpu_init requires pmap module to be initialized and calling it int pmap.c hangs the system
r195399 | imp | 2009-07-06 01:49:24 -0600 (Mon, 06 Jul 2009) | 2 lines Prefer uintptr_t to int cast here.
r195398 | imp | 2009-07-06 01:48:31 -0600 (Mon, 06 Jul 2009) | 3 lines Better types for 64-bit compatibility. Use %p and cast to void * and prefer uintptr_t to other int-type casts.
r195397 | imp | 2009-07-06 01:47:39 -0600 (Mon, 06 Jul 2009) | 2 lines No need to force mips32 here.
r195396 | imp | 2009-07-06 01:46:13 -0600 (Mon, 06 Jul 2009) | 3 lines Pass in the uint64 value, rather than a pointer to it. that's what the function expects...
r195395 | imp | 2009-07-06 01:45:02 -0600 (Mon, 06 Jul 2009) | 3 lines Use ta0 instead of t4 and ta1 instead of t5. These map to the same registers on O32 builds, but t4 and t5 don't exist on N32 or N64.
r195394 | imp | 2009-07-06 01:43:50 -0600 (Mon, 06 Jul 2009) | 3 lines Use better casts for passing the small integer as a pointer here. Basically, replace int with uintptr_t.
r195393 | imp | 2009-07-06 01:42:54 -0600 (Mon, 06 Jul 2009) | 5 lines (1) Improvements for SB1. only allow real memory to be accessed. (2) make compile n64 by using more-proper casts. Submitted by: Neelkanth Natu (1)
r195373 | imp | 2009-07-05 09:23:54 -0600 (Sun, 05 Jul 2009) | 5 lines (1) Use PTR_LA rather than bare la for N64 goodness (it is dla there) (2) SB1 needs COHERENT policy, not cached for the config register Submitted by: (2) Neelkanth Natu
r195372 | imp | 2009-07-05 09:22:22 -0600 (Sun, 05 Jul 2009) | 3 lines use "PTR_LA" in preference to a bare la so it translates to dla on 64-bit ABIs.
r195371 | imp | 2009-07-05 09:21:35 -0600 (Sun, 05 Jul 2009) | 6 lines Now that we define atomic_{load,store}_64 inline in atomic.h, we don't need to define them here for the !N64 case. We now define atomic_readandclear_64 in atomic.h, so no need to repeat it here.
r195364 | imp | 2009-07-05 09:10:07 -0600 (Sun, 05 Jul 2009) | 5 lines use %p in preference to 0x%08x for printing register_t values. Cast them to void * first. This neatly solves the "how do I print a register_t" problem because sizeof(void *) is always the same as sizeof(register_t), afaik.
r195353 | imp | 2009-07-05 00:46:54 -0600 (Sun, 05 Jul 2009) | 6 lines Publish PAGE_SHIFT to assembler # we should likely phase out PGSHIFT Submitted by: Neelkanth Natu
r195350 | imp | 2009-07-05 00:39:37 -0600 (Sun, 05 Jul 2009) | 7 lines Switch to ABI agnostic ta0-ta3. Provide defs for this in the right places. Provide n32/n64 register name defintions. This should have no effect for the O32 builds that everybody else uses, but should help make N64 builds possible (lots of other changes are needed for that). Obtained from: NetBSD (for the regdef.h changes)
r195334 | imp | 2009-07-03 21:22:34 -0600 (Fri, 03 Jul 2009) | 6 lines Move from using the lame invalid address I chose when trying to get Octeon going... Turns out that you get tlb shutdowns with this... Use PGSHIFT instead of PAGE_SHIFT. Submitted by: Neelkanth Natu
r195147 | gonzo | 2009-06-28 15:01:00 -0600 (Sun, 28 Jun 2009) | 2 lines - Replace casuword and casuword32 stubs with proper implementation
r195128 | gonzo | 2009-06-27 17:27:41 -0600 (Sat, 27 Jun 2009) | 4 lines - Add support for handling TLS area address in kernel space. From the userland point of view get/set operations are performed using sysarch(2) call.
r195127 | gonzo | 2009-06-27 17:01:35 -0600 (Sat, 27 Jun 2009) | 4 lines - Make cpu_set_upcall_kse conform MIPS ABI. T9 should be the same as PC in subroutine entry point - Preserve interrupt mask
r194938 | gonzo | 2009-06-24 20:15:04 -0600 (Wed, 24 Jun 2009) | 3 lines - Invalidate cache in pmap_qenter. Fixes corruption of data that comes through pipe (may be other bugs)
r194505 | gonzo | 2009-06-19 13:02:40 -0600 (Fri, 19 Jun 2009) | 5 lines - Keep interrupts mask intact by RESTORE_CPU in MipsKernGenException trap() function re-enables interrupts if exception happened with interrupts enabled and therefor status register might be modified by interrupt filters
r194277 | gonzo | 2009-06-15 20:36:21 -0600 (Mon, 15 Jun 2009) | 2 lines - Remove debug printfs
r194275 | gonzo | 2009-06-15 19:43:33 -0600 (Mon, 15 Jun 2009) | 2 lines - Handle KSEG0/KSEG1 addresses for /dev/mem as well. netstat requires it
r193491 | gonzo | 2009-06-05 03:21:03 -0600 (Fri, 05 Jun 2009) | 6 lines - Status register should be set last in RESTORE_CPU in order to prevent race over k0, k1 registers. - Update interrupts mask in saved status register for MipsUserIntr and MipsUserGenException. It might be modified by intr filter or ithread.
r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines - Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default we assume that there is no FPU, because majority of SoC does not have it.
r192794 | gonzo | 2009-05-26 00:20:50 -0600 (Tue, 26 May 2009) | 5 lines - Preserve INT_MASK fields in Status register across context switches. They should be modified only by interrupt setup/teardown and pre_ithread/post_ithread functions
r192793 | gonzo | 2009-05-26 00:02:38 -0600 (Tue, 26 May 2009) | 2 lines - Remove erroneus "break" instruction, it was meant for debug
r192792 | gonzo | 2009-05-26 00:01:17 -0600 (Tue, 26 May 2009) | 2 lines - Remove now unused NetBSDism intr.h
r192791 | gonzo | 2009-05-25 23:59:05 -0600 (Mon, 25 May 2009) | 7 lines - Provide proper pre_ithread/post_ithread functions for both hard and soft interrupts - Do not handle masked interrupts - Do not write Cause register because most bytes are read-only and writing the same byte to RW fields are pointless. And in case of software interrupt utterly wrong
r192664 | gonzo | 2009-05-23 13:42:23 -0600 (Sat, 23 May 2009) | 4 lines - cpu_establish_hardintr modifies INT_MASK of Status register, so we should use disableintr/restoreintr that modifies only IE bit.
r192655 | gonzo | 2009-05-23 12:00:20 -0600 (Sat, 23 May 2009) | 6 lines - Remove stale comments - Replace a1 with k1 to while restoring context. a1 was there by mistake, interrupts are disabled at this point and it's safe to use k0, k1. This code never was reached beacasue current Status register handling prevented interrupta from user mode.
r192496 | gonzo | 2009-05-20 17:07:10 -0600 (Wed, 20 May 2009) | 4 lines - Invalidate caches for respective areain KSEG0 in order to prevent further overwriting of KSEG1 data with writeback.
r192364 | gonzo | 2009-05-18 20:43:21 -0600 (Mon, 18 May 2009) | 6 lines - Cleanup ticker initialization code. For some MIPS cpu Counter register increments only every second cycle. The only timing references for us is Count value. Therefore it's better to convert frequencies related to it and use them. Besides cleanup this commit fixes twice more then requested sleep interval problem.
r192176 | gonzo | 2009-05-15 20:34:03 -0600 (Fri, 15 May 2009) | 3 lines - Add informational title for cache info lines to separate them from environment variables dump
r192119 | gonzo | 2009-05-14 15:26:07 -0600 (Thu, 14 May 2009) | 3 lines - Off by one check fix. Check for last address in region to fit in KSEG1
r191841 | gonzo | 2009-05-05 20:55:43 -0600 (Tue, 05 May 2009) | 5 lines - Use index ops in order to avoid TLBMiss exceptions when flushing caches on mapping removal - Writeback all VA for page that is being copied in pmap_copy_page to guaranty up-to-date data in SDRAM
r191613 | gonzo | 2009-04-27 20:59:18 -0600 (Mon, 27 Apr 2009) | 4 lines - When destroying va -> pa mapping writeback all caches or we may endup with partial page content in SDRAM - style(9) fix
r191583 | gonzo | 2009-04-27 12:46:57 -0600 (Mon, 27 Apr 2009) | 5 lines - Use new spacebus - Be a bit more verbose on failures - style(9) fixes - Use default rid value of 0 instead of MIPS_MEM_RID (0x20)
r191577 | gonzo | 2009-04-27 12:29:59 -0600 (Mon, 27 Apr 2009) | 4 lines - Use naming convention the same as MIPS spec does: eliminate _sel1 sufix and just use selector number. e.g. mips_rd_config_sel1 -> mips_rd_config1 - Add WatchHi/WatchLo accessors for selctors 1..3 (for debug purposes)
r191453 | gonzo | 2009-04-23 23:28:44 -0600 (Thu, 23 Apr 2009) | 4 lines Fix cut'n'paste code. cfg3 should get the value of selector 3 Spotted by: thompa@
r191452 | gonzo | 2009-04-23 22:18:16 -0600 (Thu, 23 Apr 2009) | 2 lines - Print supported CPU capabilities during stratup
r191448 | gonzo | 2009-04-23 21:38:51 -0600 (Thu, 23 Apr 2009) | 2 lines - Fix whitespace to conform style(9)
r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines - Make mips_bus_space_generic be of type bus_space_tag_t instead of struct bus_space and update all relevant places.
r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines Use FreeBSD/arm approach for handling bus space access: space tag is a pointer to bus_space structure that defines access methods and hence every bus can define own accessors. Default space is mips_bus_space_generic. It's a simple interface to physical memory, values are read with regard to host system byte order.
r191083 | gonzo | 2009-04-14 19:47:52 -0600 (Tue, 14 Apr 2009) | 4 lines - Cleanout stale #ifdef'ed chunk of code - Fix whitespaces - Explicitly undefine NEXUS_DEBUG flag
r191079 | gonzo | 2009-04-14 16:53:22 -0600 (Tue, 14 Apr 2009) | 2 lines - Revert changes accidentally killed by merge operation
------------------------------------------------------------------------ r187512 | gonzo | 2009-01-20 22:49:30 -0700 (Tue, 20 Jan 2009) | 4 lines - Check if maddr/msize hints are there before setting hinted resources to device - Check for irq hint too
r187418 | gonzo | 2009-01-18 19:37:10 -0700 (Sun, 18 Jan 2009) | 4 lines - Add trampoline stuff for bootloaders that do not support ELF - Replace arm'ish KERNPHYSADDR/KERNVIRTADDR with KERNLOADADDR/TRAMPLOADADDR and clean configs
|
202044 |
10-Jan-2010 |
imp |
Fix mis-merge from projects/mips... the diff didn't apply correctly and I didn't notice until after the commit.
|
202041 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
copy over the generic bus space implementation...
|
202040 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy over elf_trampoline.c for crunched kernel support.
|
202039 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy over sys_machdep.c
|
202038 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy over inckern.S for crunched kernel support.
|
202037 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the BSP. Provide a missing prototype.
r201845 | imp | 2010-01-08 15:48:21 -0700 (Fri, 08 Jan 2010) | 2 lines Centralize initialization of pcpu, and set curthread early...
r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-)
r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines Does 4 things: 1) Adds future RMI directories 2) Places intr_machdep.c in specfic files.arch pointing to the generic intr_machdep.c. This allows us to have an architecture dependant intr_machdep.c (which we will need for RMI) in the machine specific directory 3) removes intr_machdep.c from files.mips 4) Adds some TARGET_XLR_XLS ifdef's for the machine specific intra_machdep.h. We may need to look at finding a better place to put this. But first I want to get this thing compiling.
r194213 | gonzo | 2009-06-14 15:04:54 -0600 (Sun, 14 Jun 2009) | 2 lines - Fix prototype and implementation of admsw_shutdown
r192790 | gonzo | 2009-05-25 23:52:24 -0600 (Mon, 25 May 2009) | 2 lines - Provide proper pre_ithread/post_ithread functions
r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines - Make mips_bus_space_generic be of type bus_space_tag_t instead of struct bus_space and update all relevant places.
r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines Use FreeBSD/arm approach for handling bus space access: space tag is a pointer to bus_space structure that defines access methods and hence every bus can define own accessors. Default space is mips_bus_space_generic. It's a simple interface to physical memory, values are read with regard to host system byte order.
|
202036 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the BSP. Provide a missing prototype.
r201845 | imp | 2010-01-08 15:48:21 -0700 (Fri, 08 Jan 2010) | 2 lines Centralize initialization of pcpu, and set curthread early...
r201631 | neel | 2010-01-05 23:42:08 -0700 (Tue, 05 Jan 2010) | 5 lines Remove all CFE-specific code from locore.S. The CFE entrypoint initialization is now done in platform-specific code. Approved by: imp (mentor)
r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-)
r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines
Does 4 things: 1) Adds future RMI directories 2) Places intr_machdep.c in specfic files.arch pointing to the generic intr_machdep.c. This allows us to have an architecture dependant intr_machdep.c (which we will need for RMI) in the machine specific directory 3) removes intr_machdep.c from files.mips 4) Adds some TARGET_XLR_XLS ifdef's for the machine specific intra_machdep.h. We may need to look at finding a better place to put this. But first I want to get this thing compiling.
r196236 | imp | 2009-08-14 19:03:13 -0600 (Fri, 14 Aug 2009) | 3 lines Fix style error replicated multiple times. Move to mips_bus_space_generic for octeon obio impl.
r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines - Make mips_bus_space_generic be of type bus_space_tag_t instead of struct bus_space and update all relevant places.
r187415 | gonzo | 2009-01-18 16:49:02 -0700 (Sun, 18 Jan 2009) | 3 lines - Move Silicon Backplanes code out to system-wide level (dev/siba) as it's going to be used not only for siba5 devices.
|
202035 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the BSP. Provide a missing prototype.
r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-)
r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines Does 4 things: 1) Adds future RMI directories 2) Places intr_machdep.c in specfic files.arch pointing to the generic intr_machdep.c. This allows us to have an architecture dependant intr_machdep.c (which we will need for RMI) in the machine specific directory 3) removes intr_machdep.c from files.mips 4) Adds some TARGET_XLR_XLS ifdef's for the machine specific intra_machdep.h. We may need to look at finding a better place to put this. But first I want to get this thing compiling.
r196836 | gonzo | 2009-09-04 13:02:11 -0600 (Fri, 04 Sep 2009) | 2 lines - Clean out some XXXMIPS comments that's not relevant now
r196236 | imp | 2009-08-14 19:03:13 -0600 (Fri, 14 Aug 2009) | 3 lines Fix style error replicated multiple times. Move to mips_bus_space_generic for octeon obio impl.
r195496 | imp | 2009-07-09 09:04:52 -0600 (Thu, 09 Jul 2009) | 2 lines Don't force ISA_MIPS32.
r195495 | imp | 2009-07-09 09:04:24 -0600 (Thu, 09 Jul 2009) | 4 lines Make the yamon function pointer stuff 64-bit safe. Make the base unsigned long, and sign extend the address of the function we're calling through.
r195494 | imp | 2009-07-09 08:54:09 -0600 (Thu, 09 Jul 2009) | 3 lines Addresses should be unsigned long. Make the address constants unsigned long.
r194929 | gonzo | 2009-06-24 16:42:52 -0600 (Wed, 24 Jun 2009) | 6 lines - Do not use hardcoded uart speed - Call mips_timer_early_init before initializing uart in order to make DELAY usable for ns8250 driver Submitted by: Neelkanth Natu
r194212 | gonzo | 2009-06-14 14:54:46 -0600 (Sun, 14 Jun 2009) | 2 lines - Fix prototypes to make compiler happy
r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines - Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default we assume that there is no FPU, because majority of SoC does not have it.
r192788 | gonzo | 2009-05-25 22:51:56 -0600 (Mon, 25 May 2009) | 3 lines - Provide proper pre_thread/post_ithread functions for GT PCI controller.
r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines - Make mips_bus_space_generic be of type bus_space_tag_t instead of struct bus_space and update all relevant places.
r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines Use FreeBSD/arm approach for handling bus space access: space tag is a pointer to bus_space structure that defines access methods and hence every bus can define own accessors. Default space is mips_bus_space_generic. It's a simple interface to physical memory, values are read with regard to host system byte order.
|
202034 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
I think these are the relevant changes, but definitely are a superset of them. Software archaeologists are invited to check the branch itself for the details.
r199695 | imp | 2009-11-23 00:49:50 -0700 (Mon, 23 Nov 2009) | 2 lines Specify loader script and load address
r198263 | neel | 2009-10-19 22:31:20 -0600 (Mon, 19 Oct 2009) | 7 lines The default KERNLOADADDR does not work on MALTA hardware. On my platform the "First free SDRAM address" reported by YAMON is 0x800b6e61. So use a conservative KERNLOADADDR of 0x80100000. Approved by: imp (mentor)
r194163 | imp | 2009-06-14 00:12:21 -0600 (Sun, 14 Jun 2009) | 2 lines Kludge: pretend to be ISA_MIPS32 for the moment.
r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines - Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default we assume that there is no FPU, because majority of SoC does not have it.
r187461 | gonzo | 2009-01-19 21:24:03 -0700 (Mon, 19 Jan 2009) | 3 lines - KERNLOADADDR should be defined with makeoption. Redboot loads kernel now
r187418 | gonzo | 2009-01-18 19:37:10 -0700 (Sun, 18 Jan 2009) | 4 lines - Add trampoline stuff for bootloaders that do not support ELF - Replace arm'ish KERNPHYSADDR/KERNVIRTADDR with KERNLOADADDR/TRAMPLOADADDR and clean configs
|
202033 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
ALCHEMY config file.
|
202032 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Merge support for very early alchemy port. I wouldn't merge this except I don't want it to get lost when we retire projects/mips. Should be consiered pre-alpha at this stage. Also, alchemy is now owned by rmi, but started out life as a separate processor line, so I'm leaving it in its own directory rather than try to shoe-horn it into the unrelated rmi directory. Its future location is an open question.
|
202031 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the BSP. Provide a missing prototype.
r200343 | imp | 2009-12-09 18:44:11 -0700 (Wed, 09 Dec 2009) | 4 lines Get the sense of this right. We use uintpr_t for bus_addr_t when we're building everything except octeon && 32-bit. As note before, we need a clearner way, but at least now the hack is right.
r199760 | imp | 2009-11-24 10:15:22 -0700 (Tue, 24 Nov 2009) | 2 lines Add in Cavium's CID. Report what the unknown CID is.
r199754 | imp | 2009-11-24 09:32:31 -0700 (Tue, 24 Nov 2009) | 6 lines Include opt_cputype.h for all .c and .S files referencing TARGET_OCTEON. Spell ld script name right.
r199599 | imp | 2009-11-20 09:32:26 -0700 (Fri, 20 Nov 2009) | 2 lines Another kludge for 64-bit bus_addr_t with 32-bit pointers...
r199496 | gonzo | 2009-11-18 15:52:05 -0700 (Wed, 18 Nov 2009) | 5 lines - Add cpu_init_interrupts function that is supposed to prepeare stuff required for spinning out interrupts later - Add API for managing intrcnt/intrnames arrays - Some minor style(9) fixes
r198958 | rrs | 2009-11-05 11:15:47 -0700 (Thu, 05 Nov 2009) | 2 lines For XLR adds extern for its bus space routines
r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-)
r198666 | imp | 2009-10-29 18:37:50 -0600 (Thu, 29 Oct 2009) | 2 lines Add some newer MIPS CO cores.
r198665 | imp | 2009-10-29 18:37:04 -0600 (Thu, 29 Oct 2009) | 4 lines db_expr_t is really closer to a register_t. Submitted by: bde@
r198531 | gonzo | 2009-10-27 18:01:20 -0600 (Tue, 27 Oct 2009) | 3 lines - Remove bunch of declared but not defined cach-related variables - Add mips_picache_linesize and mips_pdcache_linesize variables
r198354 | neel | 2009-10-21 20:51:31 -0600 (Wed, 21 Oct 2009) | 9 lines Get rid of the hardcoded constants to define cacheable memory: SDRAM_ADDR_START, SDRAM_ADDR_END and SDRAM_MEM_SIZE
Instead we now keep a copy of the memory regions enumerated by platform-specific code and use that to determine whether an address is cacheable or not.
r198310 | gonzo | 2009-10-20 17:13:08 -0600 (Tue, 20 Oct 2009) | 5 lines - Commit missing part of "bt" fix: store PC register in pcb_context struct in cpu_switch and use it in stack_trace function later. pcb_regs contains state of the process stored by exception handler and therefor is not valid for sleeping processes.
r198207 | imp | 2009-10-18 08:57:04 -0600 (Sun, 18 Oct 2009) | 2 lines Undo spamage of last MFC.
r198206 | imp | 2009-10-18 08:56:33 -0600 (Sun, 18 Oct 2009) | 3 lines _ALIGN has to return u_long, since pointers don't fit into u_int in 64-bit mips.
r198182 | gonzo | 2009-10-16 18:22:07 -0600 (Fri, 16 Oct 2009) | 11 lines - Use PC/RA/SP values as arguments for stacktrace_subr instead of trapframe. Context info could be obtained from other sources (see below) no only from td_pcb field - Do not show a0..a3 values unless they're obtained from the stack. These are only confirmed values. - Fix bt command in DDB. Previous implementation used thread's trapframe structure as a source info for trace unwinding, but this structure is filled only when exception occurs. Valid register values for sleeping processes are in pcb_context array. For curthread use pc/sp/ra for current frame
r198181 | gonzo | 2009-10-16 16:52:18 -0600 (Fri, 16 Oct 2009) | 2 lines - Get rid of label_t. It came from NetBSD and was used only in one place
r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines
Does 4 things: 1) Adds future RMI directories 2) Places intr_machdep.c in specfic files.arch pointing to the generic intr_machdep.c. This allows us to have an architecture dependant intr_machdep.c (which we will need for RMI) in the machine specific directory 3) removes intr_machdep.c from files.mips 4) Adds some TARGET_XLR_XLS ifdef's for the machine specific intra_machdep.h. We may need to look at finding a better place to put this. But first I want to get this thing compiling.
r198066 | gonzo | 2009-10-13 19:43:53 -0600 (Tue, 13 Oct 2009) | 5 lines - Move stack tracing function to db_trace.c - Axe unused extern MipsXXX declarations - Move all declarations for functions in exceptions.S/swtch.S from trap.c to respective headers
r197685 | gonzo | 2009-10-01 14:05:36 -0600 (Thu, 01 Oct 2009) | 2 lines - Sync caches properly when dealing with sf_buf
r196215 | imp | 2009-08-14 10:15:18 -0600 (Fri, 14 Aug 2009) | 6 lines (u_int) is the wrong type here. Use unsigned long instead, even though that's only less wrong...
r196199 | imp | 2009-08-13 13:47:13 -0600 (Thu, 13 Aug 2009) | 7 lines Use unsigned long instead of unsigned for the integer casts here. The former works for both ILP32 and LP64 programming models, while the latter fails LP64.
r196089 | gonzo | 2009-08-09 19:49:59 -0600 (Sun, 09 Aug 2009) | 4 lines - Make i/d cache size field 32-bit to prevent overflow Submited by: Neelkanth Natu
r195582 | imp | 2009-07-10 13:07:07 -0600 (Fri, 10 Jul 2009) | 2 lines fix prototype for MipsEmulateBranch.
r195581 | imp | 2009-07-10 13:06:43 -0600 (Fri, 10 Jul 2009) | 2 lines Better definitions for a few types for n32/n64.
r195580 | imp | 2009-07-10 13:06:15 -0600 (Fri, 10 Jul 2009) | 5 lines Fixed aligned macros...
r195478 | gonzo | 2009-07-08 16:28:36 -0600 (Wed, 08 Jul 2009) | 5 lines - Port busdma code from FreeBSD/arm. This is more mature version that takes into account all limitation to DMA memory (boundaries, alignment) and implements bounce pages. - Add BUS_DMASYNC_POSTREAD case to bus_dmamap_sync_buf
r195440 | imp | 2009-07-08 00:01:37 -0600 (Wed, 08 Jul 2009) | 2 lines Fix atomic_store_64 prototype for 64-bit systems.
r195392 | imp | 2009-07-05 20:27:03 -0600 (Sun, 05 Jul 2009) | 3 lines The MCOUNT macro isn't going to work in 64-bit mode. Add a note to this effect.
r195391 | imp | 2009-07-05 20:22:51 -0600 (Sun, 05 Jul 2009) | 3 lines Provide a macro for PTR_ADDU as well. We may need to implement this differently for N32... Use PTR_ADDU in DO_AST macro.
r195390 | imp | 2009-07-05 20:22:06 -0600 (Sun, 05 Jul 2009) | 4 lines Change the addu here to daddu. addu paranoina prodded by: jmallet@
r195382 | imp | 2009-07-05 15:16:26 -0600 (Sun, 05 Jul 2009) | 5 lines addu and subu are special. We need to use daddu and dsubu here to get proper behavior. Submitted by: jmallet@
r195370 | imp | 2009-07-05 09:20:16 -0600 (Sun, 05 Jul 2009) | 6 lines The SB1 has cohernet memory, so add it. Also, Maxmem is better as a long. Submitted by: Neelkanth Natu
r195369 | imp | 2009-07-05 09:19:28 -0600 (Sun, 05 Jul 2009) | 4 lines The SB1 needs a special value for the cache field of the pte. Submitted by: Neelkanth Natu
r195368 | imp | 2009-07-05 09:18:06 -0600 (Sun, 05 Jul 2009) | 2 lines compute the areas to save registers in for 64-bit access correctly.
r195367 | imp | 2009-07-05 09:17:11 -0600 (Sun, 05 Jul 2009) | 3 lines First cut at 64-bit types. not 100% sure these are all correct for N32 ABI.
r195366 | imp | 2009-07-05 09:16:27 -0600 (Sun, 05 Jul 2009) | 3 lines Trim unreferenced goo. SDRAM likely should be next, but it is still referenced.
r195365 | imp | 2009-07-05 09:13:24 -0600 (Sun, 05 Jul 2009) | 9 lines
First cut at atomics for 64-bit machines and SMP machines. # Note: Cavium provided a port that has atomics similar to these, but # that does a syncw; sync; atomic; sync; syncw where we just do the classic # mips 'atomic' operation (eg ll; frob; sc). It is unclear to me why # the extra is needed. Since my initial target is one core, I'll defer # investigation until I bring up multiple cores. syncw is an octeon specific # instruction.
r195359 | imp | 2009-07-05 02:14:00 -0600 (Sun, 05 Jul 2009) | 4 lines Bring in cdefs.h from NetBSD to define ABI goo. Obtained from: NetBSD
r195358 | imp | 2009-07-05 02:13:19 -0600 (Sun, 05 Jul 2009) | 4 lines Pull in machine/cdefs.h for the ABI definitions. Provide a PTR_LA, ala sgi, and use it in preference to a bare 'la' so that it gets translated to a 'dla' for the 64-bit pointer ABIs.
r195357 | imp | 2009-07-05 01:01:34 -0600 (Sun, 05 Jul 2009) | 2 lines Use uintptr_t rather than unsigned here for 64-bit correctness.
r195356 | imp | 2009-07-05 01:00:51 -0600 (Sun, 05 Jul 2009) | 6 lines Define __ELF_WORD_SIZE appropriately for n64. Note for N32 I believe this is correct. While registers are 64-bit, n32 is a 32-bit ABI and lives in a 32-bit world (with explicit 64-bit registers, however). Change an 8, which was 4 + 4 or sizeof(int) + SZREG to be a simple '4 + SZREG' to reflect the actual offset of the structure in question.
r195355 | imp | 2009-07-05 00:56:51 -0600 (Sun, 05 Jul 2009) | 7 lines (1) Use uintptr_t in preference to unsigned. The latter isn't right for 64-bit case, while the former is. (2) include a SB1 specific coherency mapping Submitted by: Neelkanth Nath (2)
r195352 | imp | 2009-07-05 00:44:37 -0600 (Sun, 05 Jul 2009) | 3 lines db_expr_t should be a intptr_t, not an int. These expressions can be addresses or numbers, and that's a intptr_t if I ever saw one.
r195351 | imp | 2009-07-05 00:43:01 -0600 (Sun, 05 Jul 2009) | 4 lines Define COP0_SYNC for SB1 CPU. Submitted by: Neelkanth Natu
r195350 | imp | 2009-07-05 00:39:37 -0600 (Sun, 05 Jul 2009) | 7 lines Switch to ABI agnostic ta0-ta3. Provide defs for this in the right places. Provide n32/n64 register name defintions. This should have no effect for the O32 builds that everybody else uses, but should help make N64 builds possible (lots of other changes are needed for that). Obtained from: NetBSD (for the regdef.h changes)
r195128 | gonzo | 2009-06-27 17:27:41 -0600 (Sat, 27 Jun 2009) | 4 lines - Add support for handling TLS area address in kernel space. From the userland point of view get/set operations are performed using sysarch(2) call.
r195076 | gonzo | 2009-06-26 13:54:06 -0600 (Fri, 26 Jun 2009) | 2 lines - Add guards to ensure that these files are included only once
r194469 | gonzo | 2009-06-18 22:43:49 -0600 (Thu, 18 Jun 2009) | 16 lines - Mark temp variable as "earlyclobber" in assembler inline in atomic_fetchadd_32. Without it gcc would use it as input register for v and sometimes generate following code for function call like atomic_fetchadd_32(&(fp)->f_count, -1): 801238b4: 2402ffff li v0,-1 801238b8: c2230018 ll v1,24(s1) 801238bc: 00431021 addu v0,v0,v1 801238c0: e2220018 sc v0,24(s1) 801238c4: 1040fffc beqz v0,801238b8 <dupfdopen+0x2e8> 801238c8: 00000000 nop Which is definitly wrong because if sc fails v0 is set to 0 and previous value of -1 is overriden hence whole operation turns to bogus
r194164 | imp | 2009-06-14 00:14:25 -0600 (Sun, 14 Jun 2009) | 3 lines bye bye. This is no longer referenced, but much code from it will resurface for a bus-space implementation.
r194160 | imp | 2009-06-14 00:10:36 -0600 (Sun, 14 Jun 2009) | 3 lines Cavium-specific goo is no longer necessary here. Of course, I now have to write a bus space for cavium, but that shouldn't be too hard.
r194157 | imp | 2009-06-14 00:01:46 -0600 (Sun, 14 Jun 2009) | 2 lines Move this to a more approrpiate plae.
r194156 | imp | 2009-06-13 23:29:13 -0600 (Sat, 13 Jun 2009) | 2 lines Bring this in from the cavium port.
r193487 | gonzo | 2009-06-05 02:37:11 -0600 (Fri, 05 Jun 2009) | 2 lines - Use restoreintr instead of enableint while accessing pcpu in DO_AST
r192864 | gonzo | 2009-05-26 16:40:12 -0600 (Tue, 26 May 2009) | 4 lines - Replace CPU_NOFPU and SOFTFLOAT options with CPU_FPU. By default we assume that there is no FPU, because majority of SoC does not have it.
r192817 | gonzo | 2009-05-26 10:35:05 -0600 (Tue, 26 May 2009) | 2 lines - Add type cast for atomic_cmpset_acq_ptr arguments
r192792 | gonzo | 2009-05-26 00:01:17 -0600 (Tue, 26 May 2009) | 2 lines - Remove now unused NetBSDism intr.h
r192177 | gonzo | 2009-05-15 20:39:13 -0600 (Fri, 15 May 2009) | 4 lines - Add MIPS_IS_KSEG0_ADDR, MIPS_IS_KSEG1_ADDR and MIPS_IS_VALID_PTR macroses thet check if address belongs to KSEG0, KSEG1 or both of them respectively.
r191589 | gonzo | 2009-04-27 13:18:55 -0600 (Mon, 27 Apr 2009) | 3 lines - Cast argument to proper type in order to avoid warnings like "shift value is too large for given type"
r191577 | gonzo | 2009-04-27 12:29:59 -0600 (Mon, 27 Apr 2009) | 4 lines - Use naming convention the same as MIPS spec does: eliminate _sel1 sufix and just use selector number. e.g. mips_rd_config_sel1 -> mips_rd_config1 - Add WatchHi/WatchLo accessors for selctors 1..3 (for debug purposes)
r191451 | gonzo | 2009-04-23 22:17:21 -0600 (Thu, 23 Apr 2009) | 4 lines - Define accessor functions for CP0 Config(16) register selects 1, 2, 3. Content of these registers is defined in MIPS spec and can be used for obtaining info about CPU capabilities.
r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines - Make mips_bus_space_generic be of type bus_space_tag_t instead of struct bus_space and update all relevant places.
r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines Use FreeBSD/arm approach for handling bus space access: space tag is a pointer to bus_space structure that defines access methods and hence every bus can define own accessors. Default space is mips_bus_space_generic. It's a simple interface to physical memory, values are read with regard to host system byte order.
|
202030 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Merge in rmi's fls64 code...
|
202029 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy over new cdefs.h..
|
202028 |
10-Jan-2010 |
imp |
Remove files that were deleted in the projects/mips branch.
|
202027 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
r201881 | imp | 2010-01-08 20:08:22 -0700 (Fri, 08 Jan 2010) | 3 lines Rename mips_pcpu_init to mips_pcpu0_init since it applies only to the BSP. Provide a missing prototype.
r201845 | imp | 2010-01-08 15:48:21 -0700 (Fri, 08 Jan 2010) | 2 lines Centralize initialization of pcpu, and set curthread early...
r198669 | rrs | 2009-10-30 02:53:11 -0600 (Fri, 30 Oct 2009) | 5 lines With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-)
r198154 | rrs | 2009-10-15 15:03:32 -0600 (Thu, 15 Oct 2009) | 10 lines Does 4 things: 1) Adds future RMI directories 2) Places intr_machdep.c in specfic files.arch pointing to the generic intr_machdep.c. This allows us to have an architecture dependant intr_machdep.c (which we will need for RMI) in the machine specific directory 3) removes intr_machdep.c from files.mips 4) Adds some TARGET_XLR_XLS ifdef's for the machine specific intra_machdep.h. We may need to look at finding a better place to put this. But first I want to get this thing compiling.
r194216 | gonzo | 2009-06-14 15:16:23 -0600 (Sun, 14 Jun 2009) | 2 lines - Fix prototypes to make compiler happy
r194215 | gonzo | 2009-06-14 15:16:04 -0600 (Sun, 14 Jun 2009) | 2 lines - Get rid of mask_fn and fix pre_filter/post_filter functions' prototypes
r191282 | gonzo | 2009-04-19 16:02:14 -0600 (Sun, 19 Apr 2009) | 3 lines - Make mips_bus_space_generic be of type bus_space_tag_t instead of struct bus_space and update all relevant places.
r191084 | gonzo | 2009-04-14 20:28:26 -0600 (Tue, 14 Apr 2009) | 6 lines Use FreeBSD/arm approach for handling bus space access: space tag is a pointer to bus_space structure that defines access methods and hence every bus can define own accessors. Default space is mips_bus_space_generic. It's a simple interface to physical memory, values are read with regard to host system byte order.
|
201979 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy sys/dev/rmi to sys/mips/rmi/dev [sic]. For devices that are on only one SoC, or family of SoC, we place them under sys/<vendor>/dev. I'll fix the build problems this causes as best I can since rmi kernel require external toolchains due to lack of support for rmi op-codes in the ancient binutils we have in the tree.
|
201977 |
10-Jan-2010 |
imp |
These files have been moved on the branch. Delete them here before copying them from the branch.
|
201976 |
10-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Placeholder for ptrace machine specific stuff... This will likely be used to report CP2 or CP3 registers on those CPUs that have them...
|
201921 |
09-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy the support files for the Octeon 1 CPU from sys/mips/octeon1 on the projects/mips side to sys/mips/cavium on the head side to conform to the other vendor code. This code was contributed by Cavium to the project and forward ported by Warner Losh, with some additional code from Randal Stewart.
# I'll fix the building problems the move creates in a future commit.
|
201917 |
09-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy over the support files (except sys/conf and sys/mips/conf) for RMI XLR processor support. This port has been contributed by RMI and brought up to date by Randal Stewart (rrs@). This port is a work in progress, and there might still be significant changes. The port makes it to multi-user, but is still early beta.
|
201916 |
09-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy over MALTA64, the 64-bit varianat of the malta board...
|
201915 |
09-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy over XLR kernel config file.
|
201914 |
09-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy over the OCTEON1 kernel config file. This is the 64-bit version.
|
201913 |
09-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy over OCTEON1.hints file.
|
201912 |
09-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy over OCTEON1-32 file: the 32-bit variant of the octeon kernel config file.
|
201911 |
09-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy over AR71XX.hints file.
|
201910 |
09-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy over the AR71XX config file.
|
201909 |
09-Jan-2010 |
imp |
Merge from projects/mips to head by hand.
Copy over the SWARM.hints file.
|
201908 |
09-Jan-2010 |
imp |
Merge from pprojects/mips to head by hand.
Copy over the SWARM config file.
|
201906 |
09-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Merge support files for the Atheros AR71xx (and soon AR9xxx) processors, except files from sys/conf and sys/mips/conf. This work was done primarily by Olecksandr Tymoshenko and works on the RouterStation and RouterStation PRO. Other AR71xx-based boards have been reported as working as well (RouterBoard, for example).
|
201905 |
09-Jan-2010 |
imp |
Merge from projects/mips to head by hand:
Copy the files for the sibyte support (except files in sys/conf and sys/mips/conf). This targets the Broadcom SWARM board (bcm91250) and the SB-1 core in the BCM1250 SoC. This work was done by Neel Natu.
|
201883 |
09-Jan-2010 |
imp |
Merge r195128 from project/mips to head.
r195128 | gonzo | 2009-06-27 17:27:41 -0600 (Sat, 27 Jun 2009) | 4 lines - Add support for handling TLS area address in kernel space. From the userland point of view get/set operations are performed using sysarch(2) call.
|
201758 |
07-Jan-2010 |
mbr |
Remove extraneous semicolons, no functional changes.
Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
|
201534 |
04-Jan-2010 |
imp |
Revert 200594. This file isn't intended for these sorts of things.
|
201223 |
29-Dec-2009 |
rnoland |
Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.
This replaces d_mmap() with the d_mmap2() implementation and also changes the type of offset to vm_ooffset_t.
Purge d_mmap2().
All driver modules will need to be rebuilt since D_VERSION is also bumped.
Reviewed by: jhb@ MFC after: Not in this lifetime...
|
200594 |
16-Dec-2009 |
dougb |
Add INCLUDE_CONFIG_FILE, and a note in comments about how to also include the comments with CONFIGARGS
|
200484 |
13-Dec-2009 |
bz |
Make admsw(4) compile again fixing typos and adding the missing variable after r199762.
|
199868 |
27-Nov-2009 |
alc |
Simplify the invocation of vm_fault(). Specifically, eliminate the flag VM_FAULT_DIRTY. The information provided by this flag can be trivially inferred by vm_fault().
Discussed with: kib
|
199762 |
24-Nov-2009 |
jhb |
Use a single private timer to drive the transmit watchdog rather than using if_watchdog and if_timer from the first port.
Reviewed by: gonzo
|
199135 |
10-Nov-2009 |
kib |
Extract the code that records syscall results in the frame into MD function cpu_set_syscall_retval().
Suggested by: marcel Reviewed by: marcel, davidxu PowerPC, ARM, ia64 changes: marcel Sparc64 tested and reviewed by: marius, also sunv reviewed MIPS tested by: gonzo MFC after: 1 month
|
199114 |
09-Nov-2009 |
gonzo |
Unbreak booting of FreeBSD/mips by merging r195429 from projects/mips: - Move dpcpu initialization to mips_proc0_init. It's more appropriate place for it. Besides dpcpu_init requires pmap module to be initialized and calling it int pmap.c hangs the system
|
198507 |
27-Oct-2009 |
kib |
In r197963, a race with thread being selected for signal delivery while in kernel mode, and later changing signal mask to block the signal, was fixed for sigprocmask(2) and ptread_exit(3). The same race exists for sigreturn(2), setcontext(2) and swapcontext(2) syscalls.
Use kern_sigprocmask() instead of direct manipulation of td_sigmask to reschedule newly blocked signals, closing the race.
Reviewed by: davidxu Tested by: pho MFC after: 1 month
|
198341 |
21-Oct-2009 |
marcel |
o Introduce vm_sync_icache() for making the I-cache coherent with the memory or D-cache, depending on the semantics of the platform. vm_sync_icache() is basically a wrapper around pmap_sync_icache(), that translates the vm_map_t argumument to pmap_t. o Introduce pmap_sync_icache() to all PMAP implementation. For powerpc it replaces the pmap_page_executable() function, added to solve the I-cache problem in uiomove_fromphys(). o In proc_rwmem() call vm_sync_icache() when writing to a page that has execute permissions. This assures that when breakpoints are written, the I-cache will be coherent and the process will actually hit the breakpoint. o This also fixes the Book-E PMAP implementation that was missing necessary locking while trying to deal with the I-cache coherency in pmap_enter() (read: mmu_booke_enter_locked).
The key property of this change is that the I-cache is made coherent *after* writes have been done. Doing it in the PMAP layer when adding or changing a mapping means that the I-cache is made coherent *before* any writes happen. The difference is key when the I-cache prefetches.
|
197933 |
10-Oct-2009 |
kib |
Define architectural load bases for PIE binaries. Addresses were selected by looking at the bases used for non-relocatable executables by gnu ld(1), and adjusting it slightly.
Discussed with: bz Reviewed by: kan Tested by: bz (i386, amd64), bsam (linux) MFC after: some time
|
197729 |
03-Oct-2009 |
bz |
Make sure that the primary native brandinfo always gets added first and the native ia32 compat as middle (before other things). o(ld)brandinfo as well as third party like linux, kfreebsd, etc. stays on SI_ORDER_ANY coming last.
The reason for this is only to make sure that even in case we would overflow the MAX_BRANDS sized array, the native FreeBSD brandinfo would still be there and the system would be operational.
Reviewed by: kib MFC after: 1 month
|
197316 |
18-Sep-2009 |
alc |
Add a new sysctl for reporting all of the supported page sizes.
Reviewed by: jhb MFC after: 3 weeks
|
196994 |
08-Sep-2009 |
phk |
Get rid of the _NO_NAMESPACE_POLLUTION kludge by creating an architecture specific include file containing the _ALIGN* stuff which <sys/socket.h> needs.
|
196196 |
13-Aug-2009 |
attilio |
* Completely Remove the option STOP_NMI from the kernel. This option has proven to have a good effect when entering KDB by using a NMI, but it completely violates all the good rules about interrupts disabled while holding a spinlock in other occasions. This can be the cause of deadlocks on events where a normal IPI_STOP is expected. * Adds an new IPI called IPI_STOP_HARD on all the supported architectures. This IPI is responsible for sending a stop message among CPUs using a privileged channel when disponible. In other cases it just does match a normal IPI_STOP. Right now the IPI_STOP_HARD functionality uses a NMI on ia32 and amd64 architectures, while on the other has a normal IPI_STOP effect. It is responsibility of maintainers to eventually implement an hard stop when necessary and possible. * Use the new IPI facility in order to implement a new userend SMP kernel function called stop_cpus_hard(). That is specular to stop_cpu() but it does use the privileged channel for the stopping facility. * Let KDB use the newly introduced function stop_cpus_hard() and leave stop_cpus() for all the other cases * Disable interrupts on CPU0 when starting the process of APs suspension. * Style cleanup and comments adding
This patch should fix the reboot/shutdown deadlocks many users are constantly reporting on mailing lists.
Please don't forget to update your config file with the STOP_NMI option removal
Reviewed by: jhb Tested by: pho, bz, rink Approved by: re (kib)
|
195840 |
24-Jul-2009 |
jhb |
Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to a device pager (OBJT_DEVICE) object in that it uses fictitious pages to provide aliases to other memory addresses. The primary difference is that it uses an sglist(9) to determine the physical addresses for a given offset into the object instead of invoking the d_mmap() method in a device driver.
Reviewed by: alc Approved by: re (kensmith) MFC after: 2 weeks
|
195649 |
12-Jul-2009 |
alc |
Add support to the virtual memory system for configuring machine- dependent memory attributes:
Rename vm_cache_mode_t to vm_memattr_t. The new name reflects the fact that there are machine-dependent memory attributes that have nothing to do with controlling the cache's behavior.
Introduce vm_object_set_memattr() for setting the default memory attributes that will be given to an object's pages.
Introduce and use pmap_page_{get,set}_memattr() for getting and setting a page's machine-dependent memory attributes. Add full support for these functions on amd64 and i386 and stubs for them on the other architectures. The function pmap_page_set_memattr() is also responsible for any other machine-dependent aspects of changing a page's memory attributes, such as flushing the cache or updating the direct map. The uses include kmem_alloc_contig(), vm_page_alloc(), and the device pager:
kmem_alloc_contig() can now be used to allocate kernel memory with non-default memory attributes on amd64 and i386.
vm_page_alloc() and the device pager will set the memory attributes for the real or fictitious page according to the object's default memory attributes.
Update the various pmap functions on amd64 and i386 that map pages to incorporate each page's memory attributes in the mapping.
Notes: (1) Inherent to this design are safety features that prevent the specification of inconsistent memory attributes by different mappings on amd64 and i386. In addition, the device pager provides a warning when a device driver creates a fictitious page with memory attributes that are inconsistent with the real page that the fictitious page is an alias for. (2) Storing the machine-dependent memory attributes for amd64 and i386 as a dedicated "int" in "struct md_page" represents a compromise between space efficiency and the ease of MFCing these changes to RELENG_7.
In collaboration with: jhb
Approved by: re (kib)
|
195376 |
05-Jul-2009 |
sam |
Cleanup ALIGNED_POINTER: o add to platforms where it was missing (arm, i386, powerpc, sparc64, sun4v) o define as "1" on amd64 and i386 where there is no restriction o make the type returned consistent with ALIGN o remove _ALIGNED_POINTER o make associated comments consistent
Reviewed by: bde, imp, marcel Approved by: re (kensmith)
|
195162 |
29-Jun-2009 |
imp |
Fix copyrights to reflect the origin of these files.
Approved by: re@ (rwatson)
|
195060 |
26-Jun-2009 |
alc |
Correct the #endif comment.
Noticed by: jmallett Approved by: re (kib)
|
195049 |
26-Jun-2009 |
rwatson |
Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface.
For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list.
Approved by: re (kib) MFC after: 6 weeks
|
195033 |
26-Jun-2009 |
alc |
This change is the next step in implementing the cache control functionality required by video card drivers. Specifically, this change introduces vm_cache_mode_t with an appropriate VM_CACHE_DEFAULT definition on all architectures. In addition, this changes adds a vm_cache_mode_t parameter to kmem_alloc_contig() and vm_phys_alloc_contig(). These will be the interfaces for allocating mapped kernel memory and physical memory, respectively, with non-default cache modes.
In collaboration with: jhb
|
194784 |
23-Jun-2009 |
jeff |
Implement a facility for dynamic per-cpu variables. - Modules and kernel code alike may use DPCPU_DEFINE(), DPCPU_GET(), DPCPU_SET(), etc. akin to the statically defined PCPU_*. Requires only one extra instruction more than PCPU_* and is virtually the same as __thread for builtin and much faster for shared objects. DPCPU variables can be initialized when defined. - Modules are supported by relocating the module's per-cpu linker set over space reserved in the kernel. Modules may fail to load if there is insufficient space available. - Track space available for modules with a one-off extent allocator. Free may block for memory to allocate space for an extent.
Reviewed by: jhb, rwatson, kan, sam, grehan, marius, marcel, stas
|
194344 |
17-Jun-2009 |
bz |
Add a .cvsignore file and along with that put an svn:ignore proprty on the directory like we have for all other target architectures.
Discussed with: imp (kind of)
|
194343 |
17-Jun-2009 |
bz |
Make compile again using proper protoypes for pcib_read/write_config DEVMETHOD.
|
194342 |
17-Jun-2009 |
bz |
Make compile again using the correct prototype for the device shutdown method.
|
194145 |
14-Jun-2009 |
imp |
Fix typo... bad imp.
|
194142 |
14-Jun-2009 |
imp |
After Marcel's change to DEFAULTS, we were bringing in a bogus copy of uart_8250. Remove it here since the UART on the ADM5120 isn't the typical 16550: its completely different.
|
194141 |
14-Jun-2009 |
imp |
Formatting nit.
|
194082 |
12-Jun-2009 |
jmallett |
Fix MALTA build; some prototypes were wrong and blew up when kobj method signature checking was turned on.
|
192671 |
23-May-2009 |
alc |
pmap_enter() *must* set PG_WRITEABLE on the given page if it creates a mapping that permits write access. Otherwise, pmap_remove_write() will not remove write access from any of the page's mappings.
|
192659 |
23-May-2009 |
alc |
Give pmap_enter()'s third parameter the same name that it has on amd64 and i386. Otherwise, my next to last commit (r192628) to this file doesn't actually compile.
|
192658 |
23-May-2009 |
alc |
When a page is mapped for write access on a read fault, the PTE should be configured to trap on a write access unless *all* of the page's dirty bits are set.
|
192628 |
23-May-2009 |
alc |
Preset the modified bit in the PTE when pmap_enter() is called during a write fault or while wiring a mapping that must support write access.
In general, this change should reduce the number of traps that occur for the purpose of setting the modified bit. More specifically, this change should prevent traps while holding locks in a sysctl handler. See kern/kern_sysctl.c revisions 1.168 and 1.195 (svn r192160) for further details.
Tested by: gonzo
|
192323 |
18-May-2009 |
marcel |
Add cpu_flush_dcache() for use after non-DMA based I/O so that a possible future I-cache coherency operation can succeed. On ARM for example the L1 cache can be (is) virtually mapped, which means that any I/O that uses temporary mappings will not see the I-cache made coherent. On ia64 a similar behaviour has been observed. By flushing the D-cache, execution of binaries backed by md(4) and/or NFS work reliably. For Book-E (powerpc), execution over NFS exhibits SIGILL once in a while as well, though cpu_flush_dcache() hasn't been implemented yet.
Doing an explicit D-cache flush as part of the non-DMA based I/O read operation eliminates the need to do it as part of the I-cache coherency operation itself and as such avoids pessimizing the DMA-based I/O read operations for which D-cache are already flushed/invalidated. It also allows future optimizations whereby the bcopy() followed by the D-cache flush can be integrated in a single operation, which could be implemented using on-chips DMA engines, by-passing the D-cache altogether.
|
192199 |
16-May-2009 |
lulf |
- Fix spelling.
|
191954 |
10-May-2009 |
kuriyama |
- Use "device\t" and "options \t" for consistency.
|
191735 |
02-May-2009 |
alc |
A variety of changes:
Reimplement "kernel_pmap" in the standard way.
Eliminate unused variables. (These are mostly variables that were discarded by the machine-independent layer after FreeBSD 4.x.)
Properly handle a vm_page_alloc() failure in pmap_init().
Eliminate dead or legacy (FreeBSD 4.x) code.
Eliminate unnecessary page queues locking.
Eliminate some excess white space.
Correct the synchronization of pmap_page_exists_quick().
Tested by: gonzo
|
191309 |
20-Apr-2009 |
rwatson |
Don't conditionally define CACHE_LINE_SHIFT, as we anticipate sizing a fair number of static data structures, making this an unlikely option to try to change without also changing source code. [1]
Change default cache line size on ia64, sparc64, and sun4v to 128 bytes, as this was what rtld-elf was already using on those platforms. [2]
Suggested by: bde [1], jhb [2] MFC after: 2 weeks
|
191300 |
20-Apr-2009 |
alc |
MFamd64/i386 Introduce pmap_try_insert_pv_entry(), a function that conditionally creates a pv entry if the number of entries is below the high water mark for pv entries.
Introduce pmap_enter_quick_locked() and use it to reimplement pmap_enter_object(). The old implementation was broken. For example, it could block while holding a mutex lock.
Change pmap_enter_quick_locked() to fail rather than wait if it is unable to allocate a page table page. This prevents a race between pmap_enter_object() and the page daemon. Specifically, an inactive page that is a successor to the page that was given to pmap_enter_quick_locked() might become a cache page while pmap_enter_quick_locked() waits and later pmap_enter_object() maps the cache page violating the invariant that cache pages are never mapped. Similarly, change pmap_enter_quick_locked() to call pmap_try_insert_pv_entry() rather than pmap_insert_entry(). Generally speaking, pmap_enter_quick_locked() is used to create speculative mappings. So, it should not try hard to allocate memory if free memory is scarce.
Tested by: gonzo
|
191278 |
19-Apr-2009 |
rwatson |
Add description and cautionary note regarding CACHE_LINE_SIZE.
MFC after: 2 weeks Suggested by: alc
|
191276 |
19-Apr-2009 |
rwatson |
For each architecture, define CACHE_LINE_SHIFT and a derived CACHE_LINE_SIZE constant. These constants are intended to over-estimate the cache line size, and be used at compile-time when a run-time tuning alternative isn't appropriate or available.
Defaults for all architectures are 64 bytes, except powerpc where it is 128 bytes (used on G5 systems).
MFC after: 2 weeks Discussed on: arch@
|
190708 |
05-Apr-2009 |
dchagin |
Fix KBI breakage by r190520 which affects older linux.ko binaries:
1) Move the new field (brand_note) to the end of the Brandinfo structure. 2) Add a new flag BI_BRAND_NOTE that indicates that the brand_note pointer is valid. 3) Use the brand_note field if the flag BI_BRAND_NOTE is set and as old modules won't have the flag set, so the new field brand_note would be ignored.
Suggested by: jhb Reviewed by: jhb Approved by: kib (mentor) MFC after: 6 days
|
190634 |
01-Apr-2009 |
jhb |
Remove some pointless mergeinfo that is the result of doing a local 'svn cp' and having svn create empty mergeinfo for the file.
|
190633 |
01-Apr-2009 |
piso |
Implement an ipfw action to reassemble ip packets: reass.
|
190581 |
30-Mar-2009 |
mav |
Integrate user/mav/ata branch:
Add ch_suspend/ch_resume methods for PCI controllers and implement them for AHCI. Refactor AHCI channel initialization according to it.
Fix Port Multipliers operation. It is far from perfect yet, but works now. Tested with JMicron JMB363 AHCI + SiI 3726 PMP pair. Previous version was also tested with SiI 4726 PMP.
Hardware sponsored by: Vitsch Electronics / VEHosting.nl
|
190515 |
28-Mar-2009 |
bz |
Mark the declaration of bus_space_map 'static' as the implementation is. Follow one of the two most common indent schemes in this file. This unbreaks a few mips kernel builds.
|
189926 |
17-Mar-2009 |
kib |
Add AT_EXECPATH ELF auxinfo entry type. The value's a_ptr is a pointer to the full path of the image that is being executed. Increase AT_COUNT.
Remove no longer true comment about types used in Linux ELF binaries, listed types contain FreeBSD-specific entries.
Reviewed by: kan
|
189771 |
13-Mar-2009 |
dchagin |
Implement new way of branding ELF binaries by looking to a ".note.ABI-tag" section.
The search order of a brand is changed, now first of all the ".note.ABI-tag" is looked through.
Move code which fetch osreldate for ELF binary to check_note() handler.
PR: 118473 Approved by: kib (mentor)
|
189319 |
03-Mar-2009 |
imp |
make loop clearer that it isn't a mistake...
|
188653 |
15-Feb-2009 |
imp |
It appears that none of the contents of this file are necessary, so replace the amd64-ish version with a blank version.
|
188627 |
15-Feb-2009 |
imp |
Remove stray __P()
|
188507 |
12-Feb-2009 |
imp |
Rewrite get_pv_entry() to match expectations of the rest of the kernel. Rather than just kick off the page daemon, we actively retire more mappings. The inner loop now looks a lot like the inner loop of pmap_remove_all.
Also, get_pv_entry can't return NULL now, so remove panic if it did.
Reviewed by: alc@
|
188506 |
12-Feb-2009 |
imp |
pmap_kenrel() was recently deleted from pmap.h. It was still used here, but inconsistently. Change all instances of it to kernel_pmap to match rest of code.
|
188431 |
10-Feb-2009 |
alc |
Eliminate an unused definition.
|
188353 |
08-Feb-2009 |
gonzo |
- Fix in_cksum for big-endian MIPS: use correct compile-time check.
|
188304 |
08-Feb-2009 |
imp |
Retire NO_DMA completely.
|
187327 |
16-Jan-2009 |
imp |
Eliminate the PMAP_INLINE macro. It isn't really used here. If we need to bring it back, we can.
|
187326 |
16-Jan-2009 |
imp |
Remove unused variable. Minor style nits.
|
187319 |
15-Jan-2009 |
gonzo |
- pmap_track_modified was retired in r178606. Reintroducing it was a mistake.
Spotted by: alc@
|
187305 |
15-Jan-2009 |
imp |
Reduce diffs to p4 that were the result of a mismerge on my part.
|
187301 |
15-Jan-2009 |
gonzo |
MFp4:
- Add debug output - Fix pmap_zero_page and related places: use uncached segments and invalidate cache after zeroing memory. - Do not test for modified bit if it's not neccessary (merged from mips-juniper p4 branch) - Some #includes reorganization
|
187295 |
15-Jan-2009 |
imp |
MFp4:
Remove Maxmem. It isn't used elsewhere in the system at this point... realmem is used instead.
|
187294 |
15-Jan-2009 |
imp |
Call platform_reset() instead of looping forever on reboot. # We likely need to have a default one of these that jumps to the rom boot # address that's defined in the MIPS ISA.
|
187293 |
15-Jan-2009 |
imp |
Reverse order of dumpsys and cpu_idle_wakeup to reduce diffs to p4.
|
187292 |
15-Jan-2009 |
imp |
MFp4:
Remove #if'd 0 code. It is interfering with other diffs.
|
187252 |
14-Jan-2009 |
gonzo |
o Code cleanup, remove unused fields of idtpci_softc
|
187251 |
14-Jan-2009 |
gonzo |
o Simplify code: trade 15 lines of case for one multiplication
|
187238 |
14-Jan-2009 |
gonzo |
o Make debug output conditional
|
187237 |
14-Jan-2009 |
gonzo |
o NO_DMA is no longer required as bug with PIIX4 emulation has been fixed in GXEmul
|
187236 |
14-Jan-2009 |
gonzo |
o Move $FreeBSD$ from comment to __FBSDID macro o Be a bit more verbose about CPU type during boot process (print manufacturer, chip info, MMU and cache parameters)
|
187192 |
13-Jan-2009 |
thompsa |
Restore the if_*var.h and if_*reg.h to their original names, they dont need to be different.
|
186640 |
31-Dec-2008 |
imp |
First pass at 64-bit elf support
|
186240 |
17-Dec-2008 |
marcel |
Make gpart the default partitioning class on all platforms. Both ia64 and powerpc were using gpart exclusively already so there's no change for those two.
Discussed on: arch@
|
186212 |
17-Dec-2008 |
imp |
AT_DEBUG and AT_BRK were OBE like 10 years ago, so retire them.
Reviewed by: peter
|
186191 |
16-Dec-2008 |
imp |
Start to clean up the MIPS elf machine dependent file. o Add support for compiling elf64 for this file (the rest of the changes are coming later) o Fill in some misssing relocation types. We need to support these in elf_machdep.c's relocation routines eventually, but that's future work too.
|
186190 |
16-Dec-2008 |
imp |
Mips never had /usr/libexec/ld-elf.so.1, so remove it. We don't have any binaries that need it. This was moved before FreeBSD 5.x.
|
185915 |
11-Dec-2008 |
imp |
Remove redundant assignment.
|
185522 |
01-Dec-2008 |
sam |
Switch to ath hal source code. Note this removes the ath_hal module; the ath module now brings in the hal support. Kernel config files are almost backwards compatible; supplying
device ath_hal
gives you the same chip support that the binary hal did but you must also include
options AH_SUPPORT_AR5416
to enable the extended format descriptors used by 11n parts. It is now possible to control the chip support included in a build by specifying exactly which chips are to be supported in the config file; consult ath_hal(4) for information.
|
185471 |
30-Nov-2008 |
imp |
On FreeBSD, printing the version is centralized, so no need to repeat it here. I think that gonzo@ has also made this change to p4.
|
185427 |
29-Nov-2008 |
imp |
Unbreak mips build by taking first WAG at mb(), wmb() and rmb(). The latter two are likely pessimal...
|
185169 |
22-Nov-2008 |
kib |
Add sv_flags field to struct sysentvec with intention to provide description of the ABI of the currently executing image. Change some places to test the flags instead of explicit comparing with address of known sysentvec structures to determine ABI features.
Discussed with: dchagin, imp, jhb, peter
|
184550 |
02-Nov-2008 |
imp |
Remove cardbus attachment. It likely was a cut-n-paste left over from whatever template was used to create this driver. It is not necessary, and wouldn't work anyway since (a) this device will never be in a cardbus tin-can and (b) the driver isn't even PCI, but instead a built-in NIC on the IDT RC32434 on its internal bus.
|
184194 |
23-Oct-2008 |
marcel |
Add mips/conf/DEFAULTS and populate it with: machine arm device mem device uart_ns8250 options GEOM_BSD options GEOM_MBR
Remove the first three from all kernel configuration files (sometimes commented-out) and change geom_bsd and geom_mbr from standard to optional.
|
183816 |
13-Oct-2008 |
bms |
Point this config at the required linker script.
|
183771 |
12-Oct-2008 |
imp |
opt_msgbuf.h is needed for MSGBUF_SIZE overrides, if any.
Submitted by: alc@
|
183714 |
09-Oct-2008 |
peter |
Clean out some empty mergeinfo records, presumably by people doing local cp/mv operations. The full repo-relative URL should be specified for the source in these cases.
|
183510 |
01-Oct-2008 |
imp |
Remove critical_enter() and critical_exit(): pmap_growkernel is called with kernel_map->system_mtx held so these aren't needed. Add an assertion to make sure this is the case.
Also, fix a minor style(9) nit.
Reviewed by: alc@
|
183441 |
28-Sep-2008 |
imp |
Catch up with svn r96606 (cvs rev 1.127 2002/05/14 20:35:29) of sys/param.h and move the MI numbers out of here. Also move the MI defines. Also remove a couple defines not in use (not sure if it is age, or OpenBSD origins for thse). Note the current values that are overrides that appear to be odd in some way.
More cleanup could be done here: NBPG appears to be spelled PAGE_SIZE these days. There's new ways to spell PGOFSET and PGSHIFT too, I think. These constants duplicate the MI constants and are sprinkled into the mips code only. Further investigation is needed.
|
183439 |
28-Sep-2008 |
marius |
Remove ipi_all() and ipi_self() as the former hasn't been used at all to date and the latter also is only used in ia64 and powerpc code which no longer serves a real purpose after bring-up and just can be removed as well. Note that architectures like sun4u also provide no means of implementing IPI'ing a CPU itself natively in the first place.
Suggested by: jhb Reviewed by: arch, grehan, jhb
|
183428 |
28-Sep-2008 |
imp |
Fix comments to relate to FreeBSD's current interrupt blocking functionality, as opposed to the legacy spl means.
|
183427 |
28-Sep-2008 |
imp |
Fix comment about needing to call something from splnet, which doesn't exist in freebsd.
|
183426 |
28-Sep-2008 |
imp |
Remove stale comment. splhigh -> critical_enter transition happend some time ago, and no longer needs special attention.
|
183397 |
27-Sep-2008 |
ed |
Replace all calls to minor() with dev2unit().
After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere.
This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware.
Reviewed by: kib
|
183372 |
26-Sep-2008 |
imp |
Remove reference to machine/tlb.h. It no longer exists, and isn't needed as this compiles fine w/o it.
|
183322 |
24-Sep-2008 |
kib |
Change the static struct sysentvec and struct Elf_Brandinfo initializers to the C99 style. At least, it is easier to read sysent definitions that way, and search for the actual instances of sigcode etc.
Explicitely initialize sysentvec.sv_maxssiz that was missed in most sysvecs.
No objection from: jhb MFC after: 1 month
|
183299 |
23-Sep-2008 |
obrien |
The kernel implemented 'memcmp' is an alias for 'bcmp'. However, memcmp and bcmp are not the same thing. 'man bcmp' states that the return is "non-zero" if the two byte strings are not identical. Where as, 'man memcmp' states that the return is the "difference between the first two differing bytes (treated as unsigned char values" if the two byte strings are not identical.
So provide a proper memcmp(9), but it is a C implementation not a tuned assembly implementation. Therefore bcmp(9) should be preferred over memcmp(9).
|
183174 |
19-Sep-2008 |
imp |
MFp4: Merge interrupt code from p4
Submitted by: gonzo@
|
183173 |
19-Sep-2008 |
imp |
MFp4: Update the interrupt code from perforce.
Submitted by: gonzo@
|
183172 |
19-Sep-2008 |
imp |
Merge from p4: add bpf
|
183148 |
18-Sep-2008 |
obrien |
Catch up with intr_event_create() API changes.
|
183147 |
18-Sep-2008 |
obrien |
Catch up with intr_event_create() API changes.
|
182901 |
10-Sep-2008 |
gonzo |
Fix path in all includes: remove /mips32 subdirectory
|
182765 |
04-Sep-2008 |
obrien |
style(9)
|
182738 |
03-Sep-2008 |
obrien |
Catch up with the move from mips32/.
|
182736 |
03-Sep-2008 |
obrien |
Catch up with the move from mips32/.
|
182735 |
03-Sep-2008 |
obrien |
Style(9).
|
182087 |
23-Aug-2008 |
imp |
White space nit.
|
181875 |
19-Aug-2008 |
jhb |
Export 'struct pcpu' to userland w/o requiring _KERNEL. A few ports already define _KERNEL to get to this and I'm about to add hooks to libkvm to access per-CPU data.
MFC after: 1 week
|
181236 |
03-Aug-2008 |
trhodes |
Document a few sysctls.
Approved by: imp
|
180353 |
07-Jul-2008 |
alc |
In FreeBSD 7.0 and beyond, pmap_growkernel() should pass VM_ALLOC_INTERRUPT to vm_page_alloc() instead of VM_ALLOC_SYSTEM.
|
180332 |
06-Jul-2008 |
imp |
As discussed on IRC and at BSDcan, move the mips32/* directories up a level. The distinction was artificial. Some more movement around the deck charis is likely depending on the fallout from this one.
Paths were corrected after the svn mv. Hope that's OK.
|
180209 |
03-Jul-2008 |
peter |
Exclude .cvsignore files from $FreeBSD$ checking
|
179990 |
25-Jun-2008 |
ed |
Remove the unused major/minor numbers from iodev and memdev.
Now that st_rdev is being automatically generated by the kernel, there is no need to define static major/minor numbers for the iodev and memdev. We still need the minor numbers for the memdev, however, to distinguish between /dev/mem and /dev/kmem.
Approved by: philip (mentor)
|
179648 |
08-Jun-2008 |
wkoszek |
Fix spelling of "virtual".
There should be no visible change.
Reviewed by: rink
|
179081 |
18-May-2008 |
alc |
Retire pmap_addr_hint(). It is no longer used.
|
178893 |
09-May-2008 |
alc |
Add a stub for pmap_align_superpage() on machines that don't (yet) implement pmap-level support for superpages.
|
178748 |
03-May-2008 |
gonzo |
Add FLT_EVAL_METHOD and DECIMAL_DIG, required by C99 standard.
Approved by: cognet (mentor)
|
178745 |
03-May-2008 |
imp |
These files are unused, so remove them for now. If they turn out to be needed later, they can be restored.
|
178729 |
02-May-2008 |
imp |
This file is unused, so remove it for now.
|
178688 |
30-Apr-2008 |
alc |
Eliminate an unused field from the pmap.
|
178608 |
27-Apr-2008 |
alc |
Remove two unused declarations. These variables are now fields within vm.h's struct kva_md_info.
|
178607 |
27-Apr-2008 |
alc |
Remove an XXX comment. sys/amd64/amd64/pmap.c revision 1.516 explains why "pmap_initialized" no longer exists.
|
178606 |
26-Apr-2008 |
alc |
MFamd64 revision 1.544/i386 revision 1.549 Retire pmap_track_modified(). We no longer need it because we do not create managed mappings within the clean submap. To prevent regressions, add assertions blocking the creation of managed mappings within the clean submap.
Approved by: imp
|
178471 |
25-Apr-2008 |
jeff |
- Add an integer argument to idle to indicate how likely we are to wake from idle over the next tick. - Add a new MD routine, cpu_wake_idle() to wakeup idle threads who are suspended in cpu specific states. This function can fail and cause the scheduler to fall back to another mechanism (ipi). - Implement support for mwait in cpu_idle() on i386/amd64 machines that support it. mwait is a higher performance way to synchronize cpus as compared to hlt & ipis. - Allow selecting the idle routine by name via sysctl machdep.idle. This replaces machdep.cpu_idle_hlt. Only idle routines supported by the current machine are permitted.
Sponsored by: Nokia
|
178372 |
21-Apr-2008 |
phk |
Make genclock standard on all platforms.
Thanks to: grehan & marcel for platform support on ia64 and ppc.
|
178354 |
20-Apr-2008 |
sam |
Multi-bss (aka vap) support for 802.11 devices.
Note this includes changes to all drivers and moves some device firmware loading to use firmware(9) and a separate module (e.g. ral). Also there no longer are separate wlan_scan* modules; this functionality is now bundled into the wlan module.
Supported by: Hobnob and Marvell Reviewed by: many Obtained from: Atheros (some bits)
|
178218 |
15-Apr-2008 |
imp |
This file shows signs of heavy borrowing from NetBSD's cache.c file, so credit its authors with contributions to this file. Remove prototype copyright notice, although one might be warranted if someone wanted to claim it badly enough.
Noticed by: Simon Burge.
|
178217 |
15-Apr-2008 |
imp |
Add copyright notice and license to reflect origin of most of the routines in this file. Remove 'place holder' copyright since the amount that's actually original is small relative to the length of the file. The contents of this file appear to have originated at DECWRL by way of NetBSD.
Noticed by: Simon Burge
|
178212 |
15-Apr-2008 |
imp |
This isn't used, so remove it. It isn't relevant to most mips platforms.
|
178211 |
15-Apr-2008 |
imp |
Copied from amd64, where it wasn't used, into mips, where it wasn't used. Remove it.
|
178209 |
15-Apr-2008 |
imp |
Remove $P4$ tag. Rumor has it that p4 importer hates it.
|
178185 |
13-Apr-2008 |
imp |
fix comments for these files.
Noticed by: stass
|
178173 |
13-Apr-2008 |
imp |
FreeBSD/mips port. The FreeBSD/mips port targets mips32, mips64, mips32r2 and mips64r2 (and close relatives) processors. There presently is support for ADMtek ADM5120, A mips 4Kc in a malta board, the RB533 routerboard (based on IDT RC32434) and some preliminary support for sibtye/broadcom designs. Other hardware support will be forthcomcing.
This port boots multiuser under gxemul emulating the malta board and also bootstraps on the hardware whose support is forthcoming...
Oleksandr Tymoshenko, Wojciech Koszek, Warner Losh, Olivier Houchard, Randall Stewert and others that have contributed to the mips2 and/or mips2-jnpr perforce branches. Juniper contirbuted a generic mips port late in the life cycle of the misp2 branch. Warner Losh merged the mips2 and Juniper code bases, and others list above have worked for the past several months to get to multiuser.
In addition, the mips2 work owe a debt to the trail blazing efforts of the original mips branch in perforce done by Juli Mallett.
|
178172 |
13-Apr-2008 |
imp |
FreeBSD/mips port. The FreeBSD/mips port targets mips32, mips64, mips32r2 and mips64r2 (and close relatives) processors. There presently is support for ADMtek ADM5120, A mips 4Kc in a malta board, the RB533 routerboard (based on IDT RC32434) and some preliminary support for sibtye/broadcom designs. Other hardware support will be forthcomcing.
This port boots multiuser under gxemul emulating the malta board and also bootstraps on the hardware whose support is forthcoming...
Oleksandr Tymoshenko, Wojciech Koszek, Warner Losh, Olivier Houchard, Randall Stewert and others that have contributed to the mips2 and/or mips2-jnpr perforce branches. Juniper contirbuted a generic mips port late in the life cycle of the misp2 branch. Warner Losh merged the mips2 and Juniper code bases, and others list above have worked for the past several months to get to multiuser.
In addition, the mips2 work owe a debt to the trail blazing efforts of the original mips branch in perforce done by Juli Mallett.
|
178171 |
13-Apr-2008 |
imp |
FreeBSD/mips port. The FreeBSD/mips port targets mips32, mips64, mips32r2 and mips64r2 (and close relatives) processors. There presently is support for ADMtek ADM5120, A mips 4Kc in a malta board, the RB533 routerboard (based on IDT RC32434) and some preliminary support for sibtye/broadcom designs. Other hardware support will be forthcomcing.
This port boots multiuser under gxemul emulating the malta board and also bootstraps on the hardware whose support is forthcoming...
Oleksandr Tymoshenko, Wojciech Koszek, Warner Losh, Olivier Houchard, Randall Stewert and others that have contributed to the mips2 and/or mips2-jnpr perforce branches. Juniper contirbuted a generic mips port late in the life cycle of the misp2 branch. Warner Losh merged the mips2 and Juniper code bases, and others list above have worked for the past several months to get to multiuser.
In addition, the mips2 work owe a debt to the trail blazing efforts of the original mips branch in perforce done by Juli Mallett.
|