summaryrefslogtreecommitdiff
path: root/sys/mips
Commit message (Collapse)AuthorAgeFilesLines
* Replace manyinstances of VM_WAIT with blocking page allocation flagsJeff Roberson2017-11-081-0/+4
| | | | | | | | | | | | | | | | | | | similar to the kernel memory allocator. This simplifies NUMA allocation because the domain will be known at wait time and races between failure and sleeping are eliminated. This also reduces boilerplate code and simplifies callers. A wait primitive is supplied for uma zones for similar reasons. This eliminates some non-specific VM_WAIT calls in favor of more explicit sleeps that may be satisfied without new pages. Reviewed by: alc, kib, markj Tested by: pho Sponsored by: Netflix, Dell/EMC Isilon Notes: svn path=/head/; revision=325530
* Remove badsect(8).Konstantin Belousov2017-11-051-1/+0
| | | | | | | | | | | | | | Failure modes of the modern (that is, produced in the last 25 years) hard drives and SSDs made the utility outdated. Since the kernel interface to support it was removed in r324853, cut the userspace remnants as well. Discussed with: bde (who does not like the removal) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Notes: svn path=/head/; revision=325452
* [mips] Pin control configuration for MediaTek RT2880Michael Zhilin2017-10-312-0/+23
| | | | | | | | | | | | RT2880 is MIPS4Kc SoC used in many SOHO routers. This commits adds GPIO pin control configuration of RT2880. Submitted by: Hiroki Mori <yamori83@yahoo.co.jp> Reviewed by: mizhka, sgalabov Differential Revision: https://reviews.freebsd.org/D12648 Notes: svn path=/head/; revision=325231
* Update several more URLsEitan Adler2017-10-2914-28/+28
| | | | | | | | - Primarily http -> https - Primarily FreeBSD project URLs Notes: svn path=/head/; revision=325096
* Add AT_HWCAP2 ELF auxiliary vector.Michal Meloun2017-10-211-1/+2
| | | | | | | | | | | | | - allocate value for new AT_HWCAP2 auxiliary vector on all platforms. - expand 'struct sysentvec' by new 'u_long *sv_hwcap2', in exactly same way as for AT_HWCAP. MFC after: 1 month Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D12699 Notes: svn path=/head/; revision=324814
* With r181803 on 2008-08-17 23:27:27Z the first VIMAGE commit went intoBjoern A. Zeeb2017-10-203-0/+8
| | | | | | | | | | | | | | | | | | | | | HEAD. Enable VIMAGE in GENERIC kernels and some others (where GENERIC does not exist) on HEAD. Disable building LINT-VIMAGE with VIMAGE being default. This should give it a lot more exposure in the run-up to 12 to help us evaluate whether to keep it on by default or not. We are also hoping to get better performance testing. The feature can be disabled using nooptions. Requested by: many Reviewed by: kristof, emaste, hiren X-MFC after: never Relnotes: yes Differential Revision: https://reviews.freebsd.org/D12639 Notes: svn path=/head/; revision=324810
* Remove CPU_HAVEFPU.John Baldwin2017-10-181-7/+8
| | | | | | | | | | | | | Instead, use a runtime decision to handle COP1 traps. If floating point support is present in the current CPU, enable saving of the floating point state. If support is not present, fail with SIGILL. Reviewed by: imp, br Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D12707 Notes: svn path=/head/; revision=324724
* Move kernel dump offset tracking into MI code.Mark Johnston2017-10-181-5/+3
| | | | | | | | | | | | | | | | | | | | | | All of the kernel dump implementations keep track of the current offset ("dumplo") within the dump device. However, except for textdumps, they all write the dump sequentially, so we can reduce code duplication by having the MI code keep track of the current offset. The new dump_append() API can be used to write at the current offset. This is needed to implement support for kernel dump compression in the MI kernel dump code. Also simplify dump_encrypted_write() somewhat: use dump_write() instead of duplicating its bounds checks, and get rid of the redundant offset tracking. Reviewed by: cem Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11722 Notes: svn path=/head/; revision=324722
* bhnd: Add support for supplying bus I/O callbacks when initializing an EROMLandon J. Fuller2017-09-272-16/+50
| | | | | | | | | | | | | | | | parser. This allows us to use the EROM parser API in cases where the standard bus space I/O APIs are unsuitable. In particular, this will allow us to parse the device enumeration table directly from bhndb(4) drivers, prior to full attach and configuration of the bridge. Approved by: adrian (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12510 Notes: svn path=/head/; revision=324071
* bhnd: Implement bhnd(4) platform device registration.Landon J. Fuller2017-09-274-15/+69
| | | | | | | | | | | | | | | | | | Add bhnd(4) API for explicitly registering BHND platform devices (ChipCommon, PMU, NVRAM, etc) with the bus, rather than walking the newbus hierarchy to discover platform devices. These devices are now also refcounted; attempting to deregister an actively used platform device will return EBUSY. This resolves a lock ordering incompatibility with bwn(4)'s firmware loading threads; previously it was necessary to acquire Giant to protect newbus access when locating and querying the NVRAM device. Approved by: adrian (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12392 Notes: svn path=/head/; revision=324070
* Add MIPS32/64 Rev2 CP0 intctl register definitions.Landon J. Fuller2017-09-152-0/+21
| | | | | | | | Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D12300 Notes: svn path=/head/; revision=323621
* Add AT_HWCAP and AT_EHDRFLAGS on all platforms.John Baldwin2017-09-141-1/+3
| | | | | | | | | | | | | | | | | | A new 'u_long *sv_hwcap' field is added to 'struct sysentvec'. A process ABI can set this field to point to a value holding a mask of architecture-specific CPU feature flags. If an ABI does not wish to supply AT_HWCAP to processes the field can be left as NULL. The support code for AT_EHDRFLAGS was already present on all systems, just the #define was not present. This is a step towards unifying the AT_* constants across platforms. Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D12290 Notes: svn path=/head/; revision=323579
* Deorbit catman. The tradeoff of disk for performance has long since tippedGordon Tetlow2017-09-131-1/+0
| | | | | | | | | | | | | in favor of just rendering the manpage instead of relying on pre-formatted catpages. Note, this does not impede the ability to use existing catpages, it just removes the utility to generate them. Reviewed by: imp, allanjude Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D12317 Notes: svn path=/head/; revision=323550
* Enable dtrace support for mips64 and the ERL kernel configKurt Lidl2017-09-061-4/+5
| | | | | | | | | | | | | | Turn on the required options in the ERL config file, and ensure that the fbt module is listed as a dependency for mips in the modules/dtrace/dtraceall/dtraceall.c file. PR: 220346 Reviewed by: gnn, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12227 Notes: svn path=/head/; revision=323206
* Fix whitespace on "options" to be <space><tab>, no functional changeKurt Lidl2017-09-041-2/+2
| | | | Notes: svn path=/head/; revision=323156
* xls_ehci: eliminate 'format string is not a string literal' warningEd Maste2017-08-301-1/+1
| | | | | | | | | Reported by: Clang MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=323040
* octeon_ebt3000_cf: eliminate 'format string is not a string literal' warningEd Maste2017-08-301-1/+2
| | | | | | | | | Reported by: Clang MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=323039
* Apply 64k padding to stack pointer for 32-bit processes.John Baldwin2017-08-301-8/+5
| | | | | | | | | | | | | In particular, MIPS now has COMPAT_FREEBSD32 for n64 kernels so this cannot be ignored for n64. On the other hand, it is unneeded for o32 MIPS kernels as the issue is only present when using 64-bit registers, so remove the workaround from o32 kernels. Reviewed by: jmallett Sponsored by: DARPA / AFRL Notes: svn path=/head/; revision=323029
* arge: correct bzero sizeof (pointed-to object, not pointer)Ed Maste2017-08-301-2/+2
| | | | | | | | | Reported by: Clang MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=323022
* Allow execution of FreeBSD/mips shared objects.John Baldwin2017-08-302-3/+3
| | | | | | | | | | This was applied to all other FreeBSD architectures in r169846 but wasn't included in the intial MIPS import. Sponsored by: DARPA / AFRL Notes: svn path=/head/; revision=323007
* Fix limits.h constants to have correct type on MIPSConrad Meyer2017-08-261-9/+15
| | | | | | | | | | | | | Use correctly typed constants to avoid bogus errors like https://lists.freebsd.org/pipermail/svn-src-all/2017-August/150400.html (like x86 _limits.h). Reported by: bde, asomers Reviewed by: mjoras, tinderbox Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=322920
* Enable hardfloat CPU instructions in the FP exception handler.John Baldwin2017-08-211-0/+3
| | | | | | | | | This permits compiling with clang's integrated assembler. Sponsored by: DARPA / AFRL Notes: svn path=/head/; revision=322772
* Use better hard-coded defaults for the cursor shape, and remove nearbyBruce Evans2017-08-191-3/+0
| | | | | | | | | | | | | | | | | | | | | redundant initializations. Hard-code base = 0, height = (approx. 1/8 of the boot-time font height) in all cases, and remove the BIOS/MD support for setting these values. This asks for an underline cursor sized for the boot-time font instead of various less hard-coded but worse values. I used that think that the x86 BIOS always gave the same values as the above hard-coding, but on 1 of my systems it gives the wrong value of base = 1. The remaining BIOS fields are shift_state and bell_pitch. These are now consistently not explicitly reinitialized to 0. All sc_get_bios_value() functions except x86's are now empty, and the only useful thing that x86 returns is shift_state. This really belongs in atkbdc, but heavier use of the BIOS to read the more useful typematic rate has been removed there. fb still makes much heavier use of the BIOS. Notes: svn path=/head/; revision=322705
* Rename mkdumpheader() and group EKCD functions in kern_shutdown.c.Mark Johnston2017-08-181-2/+2
| | | | | | | | | | | | | | This helps simplify the code in kern_shutdown.c and reduces the number of globally visible functions. No functional change intended. Reviewed by: cem, def Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11603 Notes: svn path=/head/; revision=322645
* Factor out duplicated kernel dump code into dump_{start,finish}().Mark Johnston2017-08-181-43/+6
| | | | | | | | | | | | | | | | | | dump_start() and dump_finish() are responsible for writing kernel dump headers, optionally writing the key when encryption is enabled, and initializing the initial offset into the dump device. Also remove the unused dump_pad(), and make some functions static now that they're only called from kern_shutdown.c. No functional change intended. Reviewed by: cem, def Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11584 Notes: svn path=/head/; revision=322644
* Plug memory leak in arge_encap().Xin LI2017-08-151-0/+1
| | | | | | | | | | Reported by: Ilja Van Sprundel <ivansprundel ioactive.com> Submitted by: Domagoj Stolfa <domagoj.stolfa gmail.com> Reviewed by: adrian MFC after: 3 days Notes: svn path=/head/; revision=322527
* Remove the old ds1374 driver and use the ds13rtc driver instead. AdjustIan Lepore2017-08-136-7/+18
| | | | | | | several mips config files accordingly. Notes: svn path=/head/; revision=322476
* [ar71xx] get rid of ath_pci - it's built as a module now.Adrian Chadd2017-07-281-2/+1
| | | | Notes: svn path=/head/; revision=321635
* [ar933x] make carambola2 work again!Adrian Chadd2017-07-232-4/+13
| | | | | | | | | | | | | * Add in the hints needed for AR933x ath(4) support - this is the nicer way that allows ath to be a module; * ATH_EEPROM_FIRMWARE is also required for all AR933x chipsets. Tested: * Carambola2, AR933x Notes: svn path=/head/; revision=321380
* [ar933x] re-add the ar71xx_apb device for AR933x.Adrian Chadd2017-07-231-1/+7
| | | | | | | | | | | This prevents the console from working! Tested: * carambola2, AR933x Notes: svn path=/head/; revision=321379
* Make ddb(4) disassembler (x/i) use n32 register names.Edward Tomasz Napierala2017-07-061-0/+4
| | | | | | | | | Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=320739
* [ar724x] put in explicit memory barriers now that read/write register no longerAdrian Chadd2017-07-061-1/+8
| | | | | | | | | | | | | | implicitly do them. They were removed as part of my "fix this to actually work" a few commits ago in this file. Tested: * AP93, AR7240 + AR9280 PCI Notes: svn path=/head/; revision=320704
* [ar71xx] Start migrating the AR934x based boards over to the new world order.Adrian Chadd2017-07-062-0/+20
| | | | | | | | | | | This unifies the PCI hints with the AHB/NOR hint syntax. Tested: * DIR825C1, AR9344 SoC / 2x2 2G + AR9580 PCI 2x2 5G Notes: svn path=/head/; revision=320700
* Clean up MD pollution of bus_dma.h:Jason A. Harmening2017-07-012-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --Remove special-case handling of sparc64 bus_dmamap* functions. Replace with a more generic mechanism that allows MD busdma implementations to generate inline mapping functions by defining WANT_INLINE_DMAMAP in <machine/bus_dma.h>. This is currently useful for sparc64, x86, and arm64, which all implement non-load dmamap operations as simple wrappers around map objects which may be bus- or device-specific. --Remove NULL-checked bus_dmamap macros. Implement the equivalent NULL checks in the inlined x86 implementation. For non-x86 platforms, these checks are a minor pessimization as those platforms do not currently allow NULL maps. NULL maps were originally allowed on arm64, which appears to have been the motivation behind adding arm[64]-specific barriers to bus_dma.h, but that support was removed in r299463. --Simplify the internal interface used by the bus_dmamap_load* variants and move it to bus_dma_internal.h --Fix some drivers that directly include sys/bus_dma.h despite the recommendations of bus_dma(9) Reviewed by: kib (previous revision), marius Differential Revision: https://reviews.freebsd.org/D10729 Notes: svn path=/head/; revision=320528
* [mips] [ar71xx] Since the wlan/ath drivers use ALQ, ensure we build the moduleAdrian Chadd2017-06-291-0/+1
| | | | | | | here otherwise we can't load said module. Notes: svn path=/head/; revision=320465
* [mips] make this compile again after all of the config changes.Adrian Chadd2017-06-291-7/+0
| | | | Notes: svn path=/head/; revision=320464
* Add IPSEC support to mips ERL kernel config fileKurt Lidl2017-06-261-1/+2
| | | | Notes: svn path=/head/; revision=320369
* [ar71xx] migrate all of the duplicate configuration out into a shared config ↵Adrian Chadd2017-06-169-509/+136
| | | | | | | | | | | | | | | | file. This brings the default configurations (drivers, net80211 settings, etc) and some of the shared configuration into std.AR_MIPS_BASE. I haven't yet moved the -current settings (witness, memguard, etc) into it. This should simplify building a lot of the same test images for my MIPS AP board development and testing. This is a work in progress; it's not designed to be perfect! Notes: svn path=/head/; revision=319994
* Move struct syscall_args syscall arguments parameters container intoKonstantin Belousov2017-06-121-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | struct thread. For all architectures, the syscall trap handlers have to allocate the structure on the stack. The structure takes 88 bytes on 64bit arches which is not negligible. Also, it cannot be easily found by other code, which e.g. caused duplication of some members of the structure to struct thread already. The change removes td_dbg_sc_code and td_dbg_sc_nargs which were directly copied from syscall_args. The structure is put into the copied on fork part of the struct thread to make the syscall arguments information correct in the child after fork. This move will also allow several more uses shortly. Reviewed by: jhb (previous version) Sponsored by: The FreeBSD Foundation MFC after: 3 weeks X-Differential revision: https://reviews.freebsd.org/D11080 Notes: svn path=/head/; revision=319873
* Make struct syscall_args visible to userspace compilation environmentKonstantin Belousov2017-06-121-2/+0
| | | | | | | | | | | | from machine/proc.h, consistently on all architectures. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 3 weeks X-Differential revision: https://reviews.freebsd.org/D11080 Notes: svn path=/head/; revision=319871
* Remove unused tlb_write_random().Edward Tomasz Napierala2017-06-051-7/+0
| | | | | | | Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=319598
* Remove extraneous parentheses.Edward Tomasz Napierala2017-06-051-2/+1
| | | | | | | Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=319597
* [ar71xx] rename AR724X_BASE -> std.AR724XAdrian Chadd2017-05-317-7/+7
| | | | Notes: svn path=/head/; revision=319343
* [AP93] fix up the arge0/arge1 hints.Adrian Chadd2017-05-291-0/+2
| | | | Notes: svn path=/head/; revision=319102
* [ar71xx] [ar724x] update to workAdrian Chadd2017-05-291-2/+8
| | | | | | | | | | | | | | | | | | | | | * add EARLY_PRINTF for debugging * update module list to be much larger * add random, otherwise well, stuff doesn't work. * IPFIREWALL_DEFAULT_TO_ACCEPT Tested: * AP93 (AR7240 + AR9280) TODO: * rename to std.AR724X * unify the built module list between all of the mips24k/mips74k atheros config files - now that the HAL, hwpmc, USB, etc are per-chip/per-arch modules it is easy to just compile them all and only include the ones you care about. Notes: svn path=/head/; revision=319101
* Update AP93 support to the new world order.Adrian Chadd2017-05-291-20/+6
| | | | | | | | | | | | | * Map change: create a combined kernel+rootfs image. The instructions I'll post on the wiki (which will be for a very outdated dev board, but at least will explain the what/why for posterity) will include how to reset the boot command. Tested: * AP93 dev board (AR7240 + AR9280) Notes: svn path=/head/; revision=319100
* [mips] [bhnd] Support of old PMU for BMIPS and siba SoCMichael Zhilin2017-05-281-2/+2
| | | | | | | | | | | - Fix typo of PLL Type 4 - Don't panic of frequency getters Submitted by: Hiroki Mori <yamori813@yahoo.co.jp> Differential Revision: https://reviews.freebsd.org/D10967 Notes: svn path=/head/; revision=319069
* [ar71xx] undo read-after-write to flush; some bus devices dislike this.Adrian Chadd2017-05-281-6/+7
| | | | | | | | | | | | This broke the PCI fixup on at least the AR7240 + AR9280 reference design board that I have. Tested: * Atheros AP93 reference design - AR7240 + AR9280 Notes: svn path=/head/; revision=319055
* Remove superfluous parentheses.Edward Tomasz Napierala2017-05-231-2/+2
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=318741
* [ar71xx] remove dead code!Adrian Chadd2017-05-231-40/+0
| | | | Notes: svn path=/head/; revision=318697