267911 |
26-Jun-2014 |
gavin |
Merge r267738 from stable/9:
Remove send-pr and fix up all references to it. Replace it with a stub send-pr directing people towards the web site.
Approved by: re (gjb), bugmeister |
267654 |
20-Jun-2014 |
gjb |
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
265729 |
09-May-2014 |
ken |
MFC the mpr(4) driver for LSI's 12Gb SAS cards.
This includes r265236, r265237, r265241, r265261, r265386, r265424, and r265473.
------------------------------------------------------------------------ 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@avagotech.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@avagotech.com> 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.
------------------------------------------------------------------------ ------------------------------------------------------------------------ r265386 | ken | 2014-05-05 13:53:03 -0600 (Mon, 05 May 2014) | 15 lines
Adjust #if statements inside mprsas_send_smpcmd() to more accurately reflect when unmapped I/O support was added.
For FreeBSD 10, it arrived just prior to __FreeBSD_version 1000028. For FreeBSD 9, it arrived just prior to __FreeBSD_version 902001.
Also, fix compiler warnings in mprsas_send_smpcmd() that happen in the i386 PAE build for non-unmapped I/O builds. These were fixed in mps(4) in revision 241145, but didn't make it into the mpr(4) driver. This change should only affect FreeBSD versions outside the above revisions, and thus doesn't affect head.
Sponsored by: Spectra Logic Corporation
------------------------------------------------------------------------ ------------------------------------------------------------------------ r265424 | ken | 2014-05-06 00:18:43 -0600 (Tue, 06 May 2014) | 33 lines
Fix a problem with async notifications in the mpr(4) driver.
This problem only occurs on versions of FreeBSD prior to the recent CAM locking changes. (i.e. stable/9 and older versions of stable/10) This change should be a no-op for head and stable/10.
If a path isn't specified, xpt_register_async() will create a fully wildcarded path and acquire a lock (the XPT lock in older versions, and via xpt_path_lock() in newer versions) to call xpt_action() for the XPT_SASYNC_CB CCB. It will then drop the lock and if the requested event includes AC_FOUND_DEVICE or AC_PATH_REGISTERED, it will get the caller up to date with any device arrivals or path registrations.
The issue is that before the locking changes, each SIM lock would get acquired in turn during the EDT tree traversal process. If a path is specified for xpt_register_async(), it won't acquire and drop its own lock, but instead expects the caller to hold its own SIM lock. That works for the first part of xpt_register_async(), but causes a recursive lock acquisition once the EDT traversal happens and it comes to the SIM in question. And it isn't possible to call xpt_action() without holding a SIM lock.
The locking changes fix this by using the XPT topology lock for EDT traversal, so it is no longer an issue to hold the SIM lock while calling xpt_register_async().
The solution for FreeBSD versions before the locking changes is to request notification of all device arrivals (so we pass a NULL path into xpt_register_async()) and then filter out the arrivals that are not ours.
Sponsored by: Spectra Logic Corporation
------------------------------------------------------------------------ ------------------------------------------------------------------------ r265473 | ken | 2014-05-06 16:13:38 -0600 (Tue, 06 May 2014) | 7 lines
Change the device name for mpr(4) from /dev/mpr_N to /dev/mprN.
This is more consistent with the existing mps(4) behavior.
Reviewed by: Steve McConnell <stephen.mcconnell@avagotech.com>
------------------------------------------------------------------------
Submitted by: Steve McConnell <Stephen.McConnell@avagotech.com> Tested by: Chris Reeves <chrisr@spectralogic.com> Sponsored by: LSI, Spectra Logic Relnotes: LSI 12Gb SAS driver mpr(4) added
|
263688 |
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
|
262933 |
08-Mar-2014 |
dumbbell |
MFC vm_page_alloc_contig()
This function will be used by TTM, a memory manager used by the Radeon KMS driver.
Compared to HEAD, the type of the "boundary" argument to several functions is left as "unsigned long" (instead of "vm_paddr_t" in HEAD) to prevent an API change in a stable branch.
The following revisions were merged in this single commit:
MFC r226928: Eliminate vm_phys_bootstrap_alloc(). It was a failed attempt at eliminating duplicated code in the various pmap implementations.
Micro-optimize vm_phys_free_pages().
Introduce vm_phys_free_contig(). It is fast routine for freeing an arbitrary number of physically contiguous pages. In particular, it doesn't require the number of pages to be a power of two.
Use "u_long" instead of "unsigned long".
Bruce Evans (bde@) has convinced me that the "boundary" parameters to kmem_alloc_contig(), vm_phys_alloc_contig(), and vm_reserv_reclaim_contig() should be of type "vm_paddr_t" and not "u_long". Make this change.
MFC r227012: 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@
MFC r227072: Simplify the implementation of the failure case in kmem_alloc_attr().
MFC r227127: Wake up the page daemon in vm_page_alloc_freelist() if it couldn't allocate the requested page because too few pages are cached or free.
Document the VM_ALLOC_COUNT() option to vm_page_alloc() and vm_page_alloc_freelist().
Make style changes to vm_page_alloc() and vm_page_alloc_freelist(), such as using a variable name that more closely corresponds to the comments.
MFC r227568: Refactor the code that performs physically contiguous memory allocation, yielding a new public interface, vm_page_alloc_contig(). This new function addresses some of the limitations of the current interfaces, contigmalloc() and kmem_alloc_contig(). For example, the physically contiguous memory that is allocated with those interfaces can only be allocated to the kernel vm object and must be mapped into the kernel virtual address space. It also provides functionality that vm_phys_alloc_contig() doesn't, such as wiring the returned pages. Moreover, unlike that function, it respects the low water marks on the paging queues and wakes up the page daemon when necessary. That said, at present, this new function can't be applied to all types of vm objects. However, that restriction will be eliminated in the coming weeks.
From a design standpoint, this change also addresses an inconsistency between vm_phys_alloc_contig() and the other vm_phys_alloc*() functions. Specifically, vm_phys_alloc_contig() manipulated vm_page fields that other functions in vm/vm_phys.c didn't. Moreover, vm_phys_alloc_contig() knew about vnodes and reservations. Now, vm_page_alloc_contig() is responsible for these things.
Reviewed by: kib Discussed with: jhb
|
259617 |
19-Dec-2013 |
pluknet |
MFC r255194 and prerequisites r229494,229496:
Introduce internal macros for __U/INT64_C to define the U/INT64_MAX/MIN values properly. The previous definition only worked if __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS were defined at the same time.
Newer versions of gcc define __INT64_C and __UINT64_C, so avoid redefining them if gcc provides them.
Applying r255194 fixes stable/9 host to allow source upgrading to the newer versions with usr.bin/dtc included in bootstrap tools.
Approved by: imp (MFC to stable/9)
|
258218 |
16-Nov-2013 |
mav |
MFC r250576 (by eadler): Fix several typos
PR: kern/176054
|
257040 |
24-Oct-2013 |
hselasky |
MFC r241082: 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.
|
256207 |
09-Oct-2013 |
mav |
MFC r251703 (by attilio): - Add a BIT_FFS() macro and use it to replace cpusetffs_obj()
|
254169 |
10-Aug-2013 |
marius |
MFC: r241374
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
|
251897 |
18-Jun-2013 |
scottl |
Merge the second part of the unmapped I/O changes. This enables the infrastructure in the block layer and UFS filesystem as well as a few drivers. The list of MFC revisions is long, so I won't quote changelogs.
r248508,248510,248511,248512,248514,248515,248516,248517,248518, 248519,248520,248521,248550,248568,248789,248790,249032,250936
Submitted by: kib Approved by: kib Obtained from: Netflix
|
251874 |
18-Jun-2013 |
scottl |
Big MFC of the physbio changes necessary for unmapped I/O. These changes have been in production at Netflix for several months with significant success.
MFC r246713:
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.
MFC r249538: Some compilers issue a warning when wider integer is casted to narrow pointer. Supposedly shut down the warning by casting through uintptr_t.
MFC r251479: Simplify the checking of flags for cam_periph_mapmem(). This gets rid of a lot of code redundancy and grossness at very minor expense.
MFC r251837: MFC r251842: Add infrastructure for doing compatibility shims, as has been sorely needed for the last 10 years. Far too much of the internal API is exposed, and every small adjustment causes applications to stop working. To kick this off, bump the API version to 0x17 as should have been done with r246713, but add shims to compensate. Thanks to the shims, there should be no visible change in application behavior.
Submitted by: kib, jeffr Approved by: kib Obtained from: Netflix
|
251868 |
17-Jun-2013 |
scottl |
MFC r240177:
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.
Submitted by: jhb Approved by: marius, adrian Obtained from: Netflix
|
251860 |
17-Jun-2013 |
scottl |
MFC r242465: Free the dma map -after- it's checked, not before. Or you'll be potentially referencing already-freed memory.
MFC r242466: Drop this from 500 to 128, to save a little space on memory constrained platforms.
Submitted by: adrian Obtained from: Netflix
|
250544 |
12-May-2013 |
peter |
Tidy up some CVS workarounds.
|
249550 |
16-Apr-2013 |
dim |
MFC r249449:
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
|
248814 |
28-Mar-2013 |
kib |
MFC r248280: Add pmap function pmap_copy_pages().
|
248085 |
09-Mar-2013 |
marius |
MFC: r227309 (partial)
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.
|
246069 |
29-Jan-2013 |
pfg |
Clean some 'svn:executable' properties in the tree.
Submitted by: Christoph Mallon
While here, merge some other mergeinfo properties that were left behind from my commits
/head/include:r241008,241141,241181 /head/contrib/gcc:r244776,244792 /head/cddl:r238457,238509,238558
|
242544 |
04-Nov-2012 |
eadler |
MFC r241844: remove duplicate semicolons where possible.
Approved by: cperciva (implicit)
|
240815 |
22-Sep-2012 |
kib |
MFC r237433: Implement mechanism to export some kernel timekeeping data to usermode, using shared page.
MFC r237474: Stop updating the struct vdso_timehands from even handler executed in the scheduled task from tc_windup(). Do it directly from tc_windup in interrupt context.
|
240760 |
20-Sep-2012 |
alc |
MFC r237168 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.
|
240754 |
20-Sep-2012 |
alc |
MFC r240317 Simplify pmap_unmapdev().
Don't set PTE_W on the page table entry in pmap_kenter{,_attr}() on MIPS.
|
240151 |
05-Sep-2012 |
kib |
MFC r233122,r237086,r237228,r237264,r237290,r237404,r237414,r237513,r237551, r237592,r237604,r237623,r237684,r237733,r237813,r237855,r238124,r238126, r238163,r238414,r238610,r238889,r238970,r239072,r239137,r240126 (all by alc):
Add fine-grained PV chunk and list locking to the amd64 pmap, enabling concurrent execution of the following functions on different pmaps:
pmap_change_wiring() pmap_copy() pmap_enter() pmap_enter_object() pmap_enter_quick() pmap_page_exists_quick() pmap_page_is_mapped() pmap_protect() pmap_remove() pmap_remove_pages()
Requested and approved by: alc
|
238481 |
15-Jul-2012 |
des |
MFH r236751: document sha256 / sha512 support MFH r236892: remove mention of auth.conf from programs that don't use it MFH r236963: remove dead code relating to auth.conf MFH r236965 r236966 r236967 r237005 r237006 r237011: retire auth.conf
Approved by: re
|
238266 |
08-Jul-2012 |
rwatson |
Merge r231712 from head to stable/9:
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 Sponsored by: DARPA, SRI International
Approved by: re (kib)
|
238228 |
08-Jul-2012 |
bz |
MFC r235941:
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).
Approved by: re
|
237753 |
29-Jun-2012 |
kib |
MFC r237430: Reserve AT_TIMEKEEP auxv entry for providing usermode the pointer to timekeeping information.
|
236238 |
29-May-2012 |
fabient |
MFC r233628, r234598, r235229, r235831, r226986.
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
|
235743 |
21-May-2012 |
jhb |
Toss bogus mergeinfo.
|
235738 |
21-May-2012 |
sbruno |
MFC r235634
Fix and update battery status bits according to linux driver
|
235539 |
17-May-2012 |
dim |
MFC r234785:
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).
|
235405 |
13-May-2012 |
avg |
MFC r228631: kern cons: introduce infrastructure for console grabbing by kernel
|
234179 |
12-Apr-2012 |
jhb |
MFC 233670,233671: - Use VM_MEMATTR_UNCACHEABLE for the constant for UC memory rather than VM_MEMATTR_UNCACHED on mips. - Rename VM_MEMATTR_UNCACHED to VM_MEMATTR_WEAK_UNCACHEABLE on x86 to be less ambiguous and more clearly identify what it means. An alias from VM_MEMATTR_WEAK_UNCACHEABLE to VM_MEMATTR_WEAK_UNCACHED remains on x86 to preserve the KPI. - Remove the VM_MEMATTR_UNCACHED alias from powerpc.
|
232786 |
10-Mar-2012 |
gavin |
Merge r232250 from head:
Correct capitalization of "Hz" in user-visible text (manpages, printf(), etc).
|
231150 |
07-Feb-2012 |
jhb |
MFC 228962: Use curthread rather than PCPU_GET(curthread). 'curthread' uses special-case optimizations on several platforms and is preferred.
|
230733 |
29-Jan-2012 |
marius |
MFC: r228005
Change another instance of amd(4) to esp(4) missed in r227006 (MFC'ed to stable/9 in r227305).
Submitted by: Garrett Cooper
|
229772 |
07-Jan-2012 |
adrian |
MFC r229765 - Fix the ar724x shift calculation when writing to the PCI config space.
|
229461 |
04-Jan-2012 |
eadler |
MFC r227458, r226436:
- change "is is" to "is" or "it is" - change "the the" to "the" - other typo fixes
Approved by: lstewart
|
229376 |
03-Jan-2012 |
kib |
MFC r226112: Remove unused define.
|
229374 |
03-Jan-2012 |
kib |
MFC r226065: Convert MIPS to the syscallenter/syscallret system call sequence handlers.
|
229118 |
31-Dec-2011 |
hselasky |
MFC r227701, r227847 and r227849: Move the device_delete_all_children() function from usb_util.c to kern/subr_bus.c. Simplify this function so that it no longer depends on malloc() to execute. Rename device_delete_all_children() into device_delete_children(). Identify a few other places where it makes sense to use device_delete_children().
|
229096 |
31-Dec-2011 |
hselasky |
MFC r229086, r228483 and r228640: Implement better support for USB controller suspend and resume. Fix some build issues in avr32dci.c
|
229093 |
31-Dec-2011 |
hselasky |
MFC r226173, r227843, r227848 and r227908: Use DEVMETHOD_END to mark end of device methods. Remove superfluous device methods. Add some missing __FBSBID() macros.
|
229057 |
31-Dec-2011 |
yongari |
MFC r226478: 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)
|
225736 |
23-Sep-2011 |
kensmith |
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
|
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.
|