aboutsummaryrefslogtreecommitdiff
path: root/sys/mips/malta
Commit message (Collapse)AuthorAgeFilesLines
* mips: Remove sys/mipsWarner Losh2021-12-3118-3111/+0
| | | | | | | | Remove sys/mips as the next step of decomissioning mips from the tree. Remove mips special cases from the kernel make files. Remove the mips specific linker scripts. Sponsored by: Netflix
* mips: fix build w/ TICK_USE_MALTA_RTC definedMarius Strobl2020-12-251-9/+8
| | | | | | This was mainly broken by 7e82012aff9888d64a85d19aaed51def9ebbff22 and r178192 respectively. Also, remove unused #include.
* Avoid dump_avail[] redefinition.Konstantin Belousov2020-10-141-0/+1
| | | | | | | | | | | | | Move dump_avail[] extern declaration and inlines into a new header vm/vm_dumpset.h. This fixes default gcc build for mips. Reviewed by: alc, scottph Tested by: kevans (previous version) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D26741 Notes: svn path=/head/; revision=366711
* mips: clean up empty lines in .c and .h filesMateusz Guzik2020-09-017-11/+5
| | | | Notes: svn path=/head/; revision=365076
* Move phys_avail definition into MI code. It is consumed in the MI layer andJeff Roberson2019-08-161-0/+2
| | | | | | | | | | | doing so adds more flexibility with less redundant code. Reviewed by: jhb, markj, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21250 Notes: svn path=/head/; revision=351108
* add snps IP uart support / genaralize UARTMatt Macy2018-08-191-1/+1
| | | | | | | | | | | | | | | | This is an amalgam of a patch by Doug Ambrisko to generalize uart_acpi_find_device, imp moving the ACPI table to uart_dev_ns8250.c and advice by jhb to work around a bug in the EPYC 3151 BIOS (the BIOS incorrectly marks the serial ports as disabled) Reviewed by: imp MFC after: 8 weeks Differential Revision: https://reviews.freebsd.org/D16432 Notes: svn path=/head/; revision=338074
* Query MVPConf0.PVPE for number of CPUs.Ruslan Bukin2018-08-141-3/+7
| | | | | | | | | | | | | Rather than hard-coding the number of CPUs to 2, look up the PVPE field in MVPConf0, as the valid VPE numbers are from 0 to PVPE inclusive. Submitted by: "James Clarke" <jrtc4@cam.ac.uk> Reviewed by: br Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16644 Notes: svn path=/head/; revision=337771
* Avoid repeated address calculation for malta_ap_boot.Ruslan Bukin2018-08-141-2/+4
| | | | | | | | | | Submitted by: "James Clarke" <jrtc4@cam.ac.uk> Reviewed by: br, arichardson Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16655 Notes: svn path=/head/; revision=337769
* follow-up to r336635, update TAILQ to CK_SLIST for ie_handlersAndriy Gapon2018-07-231-1/+1
| | | | | | | arm, mips and sparc64 were affected. Notes: svn path=/head/; revision=336639
* Support 2GB of memory on Malta systems with FreeBSD/mips.John Baldwin2018-06-281-0/+9
| | | | | | | | | | | | | | | When 2GB of memory is enabled for QEMU's Malta emulation, the physical memory ends at an address of 2^32 - 1. This causes an integer overflow to zero when computing the upper bound of the second phys_avail[] range. As a result, FreeBSD/mips kernels were only using the first 256MB of RAM and ignoring the remaining 1.75GB. To work around this, truncate the extended memory size to 2GB minus one page for 32-bit mips kernels. Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D16027 Notes: svn path=/head/; revision=335783
* sys/mips: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2714-1/+29
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326259
* Allow setting access-width for UART registers.Ruslan Bukin2017-02-271-1/+1
| | | | | | | | | | | | | | | This is required for FDT's standard "reg-io-width" property (similar to "reg-shift" property) found in many DTS files. This fixes operation on Altera Arria 10 SOC Development Kit, where standard ns8250 uart allows 4-byte access only. Reviewed by: kan, marcel Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9785 Notes: svn path=/head/; revision=314362
* Convert PCIe Hot Plug to using pci_request_featureWarner Losh2017-02-251-0/+1
| | | | | | | | | | | | Convert PCIe hot plug support over to asking the firmware, if any, for permission to use the HotPlug hardware. Implement pci_request_feature for ACPI. All other host pci connections to allowing all valid feature requests. Sponsored by: Netflix Notes: svn path=/head/; revision=314250
* Fix dump_avail[] for MALTA platforms to include the kernel.John Baldwin2016-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | dump_avail[] is supposed to be a superset of phys_avail[] that describes all of the memory ranges that should be included in a full dump. minidumps don't consider pages described by dump_avail[] to be valid and thus they are excluded via the is_dumpable() function. Most MIPS platforms (including MALTA) set dump_avail[] to be identical to phys_avail[]. In particular, phys_avail[] doesn't include the kernel itself, so pages for the kernel and it's global variables are not considered dumpable and not included in the dump. Fix this by setting dump_avail[0] to the first memory address (0) rather than the end of the kernel. Several other MIPS platforms have the same bug, though I am only able to test malta in qemu. The correct fix is to set dump_avail[] to describe RAM and in particular to not set dump_avail[0] to the end of the kernel (kernel_kseg0_end). Sponsored by: DARPA / AFRL Notes: svn path=/head/; revision=310428
* Add SMP support for MTI Malta 34kf CPU.Ruslan Bukin2016-09-122-10/+66
| | | | | | | | Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Notes: svn path=/head/; revision=305743
* Add support for SMP on MIPS Malta platform.Ruslan Bukin2016-09-094-1/+320
| | | | | | | | | | Tested in QEMU on Malta32, Malta64. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Notes: svn path=/head/; revision=305664
* Fixed FreeBSD/mips MALTA support for QEMUOleksandr Tymoshenko2016-06-291-5/+5
| | | | | | | | | | | | | | | | Recource management functions in GT PCI controller driver treated memory/IO resources as KSEG1 addresses, later during activation these values would be increased by KSEG1 base again rendering the address invalid and causing "bus error" trap. Actual logic was converted to use real physical addresses, so mapping takes place only during activation. Submitted by: Aleksandr Rybalko <ray@FreeBSD.org> Approved by: re (gjb) Notes: svn path=/head/; revision=302287
* As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toSvatopluk Kraus2016-02-221-1/+0
| | | | | | | | | | include it explicitly when <vm/pmap.h> is already included. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D5373 Notes: svn path=/head/; revision=295880
* Convert rman to use rman_res_t instead of u_longJustin Hibbits2016-01-273-4/+4
| | | | | | | | | | | | | | | | | | | | | | | Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long. This is step one in migrating rman to use uintmax_t for resources instead of u_long. Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API. This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI. Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075 Notes: svn path=/head/; revision=294883
* [mips]: Don't hard-code PHYS_AVAIL_ENTRIES.Adrian Chadd2015-11-221-1/+1
| | | | Notes: svn path=/head/; revision=291154
* mips: teach the malta platform about extended memory.Adrian Chadd2015-11-211-9/+53
| | | | | | | | | | | | | | | | | | | | | | | Extended memory here is "physical memory above 256MB". "memsize" in the environment only grows to 256MB; "ememsize" is the entire memory range. Extended memory shows up at physical address 0x90000000. This allows for malta64 VMs to be created with > 256MB RAM, all the way up to 2GB RAM. Tested: * qemu-devel package; qemu-system-mips64 -m 2048 (and -m 256 to test the no-ememsize case.) TODO: * testing mips32 with > 256MB RAM. Reviewed by: imp Notes: svn path=/head/; revision=291118
* Add domain support to PCI bus allocationZbigniew Bodek2015-09-161-1/+1
| | | | | | | | | | | | | | | When the system has more than a single PCI domain, the bus numbers are not unique, thus they cannot be used for "pci" device numbering. Change bus numbers to -1 (i.e. to-be-determined automatically) wherever the code did not care about domains. Reviewed by: jhb Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3406 Notes: svn path=/head/; revision=287882
* Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thisEitan Adler2013-11-301-2/+2
| | | | | | | | | | | | | | | | shifts into the sign bit. Instead use (1U << 31) which gets the expected result. This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD. Discussed with: -arch, rdivacky Reviewed by: cperciva Notes: svn path=/head/; revision=258780
* Devices that rely on hints or identify routines for discovery need toNathan Whitehorn2013-10-291-1/+1
| | | | | | | | | | return BUS_PROBE_NOWILDCARD from their probe routines to avoid claiming wildcard devices on their parent bus. Do a sweep through the MIPS tree. MFC after: 2 weeks Notes: svn path=/head/; revision=257338
* YAMON is 32-bit application and uses 32-bit pointers to pass kernelOleksandr Tymoshenko2013-08-311-4/+9
| | | | | | | | arguments and environment names/values. Cast values to proper pointer type to make MALTA kernel 64-bit compatible Notes: svn path=/head/; revision=255088
* Add PCI bus space implementation that converts all 2 and 4 bytesOleksandr Tymoshenko2013-08-304-4/+448
| | | | | | | values to/from little endian according to PCI spec. Notes: svn path=/head/; revision=255083
* Fix GT PCI controller driver on big-endian hardwareOleksandr Tymoshenko2013-08-281-18/+35
| | | | Notes: svn path=/head/; revision=254983
* Fixes for compatibility with QEMU:Oleksandr Tymoshenko2013-08-271-2/+8
| | | | | | | | | | | - Route PCI interrupt for NIC - Make "no mapping" warning more user-friendly: add device name and mention that it's IRQ mapping - Do not overlap ICUs' IO window with PCI devices' IO windows by starting IO rman at offset 0x100 Notes: svn path=/head/; revision=254946
* - Initialize freq variable so we will not end up with random valueOleksandr Tymoshenko2013-08-271-0/+1
| | | | | | | if there is no YAMON present Notes: svn path=/head/; revision=254944
* Add the static kernel boot environment, needed to actually boot this thing.Adrian Chadd2013-04-171-0/+6
| | | | | | | | | | | | (Wasting 4k just as a temporary placeholder for a boot environment seems a bit ridiculous, but hey.) Tested: gxemul: $ gxemul -e malta -d i:/home/adrian/work/freebsd/svn/mfsroot-rspro.img -C 4Kc /tftpboot/kernel.MALTA Notes: svn path=/head/; revision=249589
* Remove all legacy ATA code parts, not used since options ATA_CAM enabled inAlexander Motin2013-04-041-1/+0
| | | | | | | | | | | | most kernels before FreeBSD 9.0. Remove such modules and respective kernel options: atadisk, ataraid, atapicd, atapifd, atapist, atapicam. Remove the atacontrol utility and some man pages. Remove useless now options ATA_CAM. No objections: current@, stable@ MFC after: never Notes: svn path=/head/; revision=249083
* Merge from vmobj-rwlock branch:Attilio Rao2013-02-261-1/+0
| | | | | | | | | | | Remove unused inclusion of vm/vm_pager.h and vm/vnode_pager.h. Sponsored by: EMC / Isilon storage division Tested by: pho Reviewed by: alc Notes: svn path=/head/; revision=247297
* o) Use ABI, not ISA_* options, to determine whether to compile bits if libkernJuli Mallett2012-03-121-1/+0
| | | | | | | | | | required for the ABI the kernel is being built for. XXX This is implemented in a kind-of nasty way that involves including source files, but it's still an improvement. o) Retire ISA_* options since they're unused and were always wrong. Notes: svn path=/head/; revision=232896
* Remove platform APIs which are not used by any code and which had only stubJuli Mallett2012-03-121-25/+0
| | | | | | | | | | | | implementations or no implementation on all platforms. Some of these functions might be good ideas, but their semantics were unclear given the lack of implementation, and an unlucky porter could be fooled into trying to implement them or, worse, being baffled when something like platform_trap_enter() failed to be called. Notes: svn path=/head/; revision=232853
* - There's no need to overwrite the default device method with the defaultMarius Strobl2011-11-222-4/+2
| | | | | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID. Notes: svn path=/head/; revision=227843
* The i8259 controller is initialized incorrectly on MALTA. It writesAdrian Chadd2011-07-161-6/+6
| | | | | | | | | | | | | 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> Notes: svn path=/head/; revision=224072
* Switch the GENERIC kernels for all architectures to the new CAM-based ATAAlexander Motin2011-04-241-1/+6
| | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=220982
* - dump_avail layout should be sequence of [start, end)Oleksandr Tymoshenko2010-12-091-1/+1
| | | | | | | | | pairs, not <start, size>. Spotted by: alc@ Notes: svn path=/head/; revision=216320
* - Populate dump_avail with proper values from phys_availOleksandr Tymoshenko2010-12-091-0/+3
| | | | Notes: svn path=/head/; revision=216318
* Fix MALTA64 build.Juli Mallett2010-04-191-2/+2
| | | | Notes: svn path=/head/; revision=206837
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromJoel Dahl2010-03-031-7/+0
| | | | | | | | | the software. Obtained from: NetBSD Notes: svn path=/head/; revision=204646
* - Call post-boot fixup function in order to get proper staticOleksandr Tymoshenko2010-01-251-2/+4
| | | | | | | | | | 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 Notes: svn path=/head/; revision=202954
* Update from old DDB convetion to initialize debugger to new KDB way.Warner Losh2010-01-231-1/+3
| | | | | | | | Always call kdb_init(). If we have KDB enabled, then provide a handy place to break to the debugger. Notes: svn path=/head/; revision=202849
* Merge from projects/mips to head by hand:Warner Losh2010-01-109-123/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=202035
* Fix copyrights to reflect the origin of these files.Warner Losh2009-06-291-1/+1
| | | | | | | Approved by: re@ (rwatson) Notes: svn path=/head/; revision=195162
* Fix MALTA build; some prototypes were wrong and blew up when kobj methodJuli Mallett2009-06-121-2/+2
| | | | | | | signature checking was turned on. Notes: svn path=/head/; revision=194082
* o Simplify code: trade 15 lines of case for one multiplicationOleksandr Tymoshenko2009-01-141-15/+1
| | | | Notes: svn path=/head/; revision=187251
* MFp4: Merge interrupt code from p4Warner Losh2008-09-191-17/+7
| | | | | | | Submitted by: gonzo@ Notes: svn path=/head/; revision=183174
* Catch up with intr_event_create() API changes.David E. O'Brien2008-09-181-1/+1
| | | | Notes: svn path=/head/; revision=183147
* Fix path in all includes: remove /mips32 subdirectoryOleksandr Tymoshenko2008-09-107-11/+11
| | | | Notes: svn path=/head/; revision=182901