summaryrefslogtreecommitdiffstats
path: root/sys/arm/s3c2xx0
Commit message (Collapse)AuthorAgeFilesLines
* MFC 262952, 262958, 262966, 262979, 262980, 262986, 262987, 262995, 262997,ian2014-05-172-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 263030, 263033, 263034, 263056, 263057, Remove all the redundant external declarations of exception vectors and runtime setting of the pointers that's scattered around various places. Remove all traces of support for ARM chips prior to the arm9 series. Make the default exception handler vectors point to where I thought they were already pointing: the default handlers (not a panic that says there is no default handler). Eliminate irq_dispatch.S. Move the data items it contained into arm/intr.c and the functionality it provided into arm/exception.S. Move the exception vector table (so-called "page0" data) into exception.S and eliminate vectors.S. Change the way the asm GET_CURTHREAD_PTR() macro is defined so that code using it doesn't have to have an "AST_LOCALS" macro somewhere in the file. Arrange for arm fork_trampoline() to return to userland via the standard swi_exit code in exception.S instead of having its own inline expansion of the DO_AST and PULLFRAME macros. Now that the PUSHFRAME and PULLFRAME macros are used only in the swi entry/exit code, they don't need to be macros. Except that didn't work and the whole change was reverted. Remove some unnecessary indirection and jump right to the handler functions. Use panic rather than printf to "handle" an arm26 address exception (should never happen on arm32). Remove the unreferenced DATA() macro. Remove #include <machine/asmacros.h> from files that don't need it.
* MFC r261643, r261646, r261648, r261649, r261651, r261656, r261657, r261663,ian2014-05-151-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r261676, r261677, r261698, r261778 Consolidate code related to setting up physical memory configuration into a new physmem.c file. Replace compile-time constant KERNPHYSADDR with abp_physaddr Calculate the kernel's load address from the PC in the elf / gzip trampoline instead of relying on KERNPHYSADDR as a compile-time constant. It turns out a global variable is the only straightforward way to communicate the kernel's physical load address from where it's known in initarm() into cpu_mp_start() which is called from non-arm code and takes no parameters. Remove the now unused MMU_INIT macro. Use vm_paddr_t, not vm_offset_t, when dealing with physical addresses. No need to set physmem in each initarm() instance anymore, it's handled in common code now. Pass the pagetable used from locore.S to initarm to allow it to map data in as required. Fix the physmem exclude-region clipping logic for the edge-trim case. Add some extra debugging output when DEBUG is defined. Update legacy platforms to use new arm_physmem helper routines.
* MFC r261423, r261424, r261516, r261513, r261562, r261563, r261564, r261565,ian2014-05-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | r261596, r261606 Add the imx sdhci controller. Move Open Firmware device root on PowerPC, ARM, and MIPS systems to a sub-node of nexus (ofwbus) rather than direct attach under nexus. This fixes FDT on x86 and will make coexistence with ACPI on ARM systems easier. SPARC is unchanged. Add the missing ')' at end of sentence. Reword it to use a more common idiom. Pass the kernel physical address to initarm through the boot param struct. Make functions only used in vfp.c static, and remove vfp_enable. Fix __syscall on armeb EABI. As it returns a 64-bit value it needs to place 32-bit data in r1, not r0. 64-bit data is already packed correctly. Use abp_physaddr for the physical address over KERNPHYSADDR. This helps us remove the need to load the kernel at a fixed address. Remove references to PHYSADDR where it's used only in debugging output. Dynamically generate the page table. This will allow us to detect the physical address we are loaded at to change the mapping.
* MFC r261252, r261279, r261304, r261305, r261322, r261336, r261337, r261338,ian2014-05-151-1/+0
| | | | | | | | | | | | | | | | | r261353 Fix the name of the dts file for the HL201... When mapping an address, the bsh needs the same offset we do for other things. Add explicit depends on bus_if.h and device_if.h to avoid a chicken and egg problem in some compilation environments. Switch to using PAs rather than VAs for the addresses we map for devices. This is a nop, except for what's reported by atmelbus for the resources. Comment cleanups. Move things around for diff reduction against FDT work.
* MFC r257334, r257336, r257337, r257338, r257341, r257342, r257343, r257370,ian2014-05-141-1/+1
| | | | | | | r257368, r257416 Hints-only devices should return BUS_PROBE_NOWILDCARD from their probe methods.
* MFC: r260889, r260890, r260911:imp2014-03-011-1/+23
| | | | | | | | | | | | | | | | | r260911 | imp | 2014-01-20 10:45:36 -0700 (Mon, 20 Jan 2014) | 5 lines Don't lock in the generic grab just to lock again in the specific grabs. r260890 | imp | 2014-01-19 12:39:13 -0700 (Sun, 19 Jan 2014) | 11 lines Introduce grab and ungrab upcalls. When the kernel desires to grab the console, it calls the grab functions. These functions should turn off the RX interrupts, and any others that interfere. This makes mountroot prompt work again. If there's more generalized need other than prompting, many of these routines should be expanded to do those new things. Reviewed by: bde (with reservations)
* MFC r258392, r258412:ian2013-12-141-0/+1
| | | | | | | | | | | | Call cpu_setup() immediately after the page tables are installed. This enables data cache and other chip-specific features. It was previously done via an early SYSINIT, but it was being done after pmap and vm setup, and those setups need to use mutexes. On some modern ARM platforms, the ldrex/strex instructions that implement mutexes require the data cache to be enabled. Call cpu_setup() from the initarm() routine on platforms that don't use the common FDT-aware initarm() in arm/machdep.c.
* MFC r257648, r257649, r257660:ian2013-12-131-2/+3
| | | | | | | | | | | | | | | | | Begin reducing code duplication in arm pmap.c and pmap-v6.c by factoring out common code related to mapping device memory into a new devmap.c file. Remove the growing duplication of code that used pmap_devmap_find_pa() and then did some math with the returned results to generate a virtual address, and likewise in reverse to get a physical address. Now there are a pair of functions, arm_devmap_vtop() and arm_devmap_ptov(), to do that. The bus_space_map() implementations are rewritten in terms of these. Move remaining code and data related to static device mapping into the new devmap.[ch] files. Emphasize the MD nature of these things by using the prefix arm_devmap_ on the function and type names (already a few of these things found their way into MI code, hopefully it will be harder to do by accident in the future).
* MFC r257639:ian2013-12-132-91/+8
| | | | | | | Remove the duplicated implementations of some bus_space functions and use the essentially identical generic implementations instead. The generic implementations differ only in the spelling of a couple variable names and some formatting differences.
* Remove redundant redeclarations of uart_s3c2410_class indim2013-10-092-3/+0
| | | | | | | | sys/arm/s3c2xx0/uart_bus_s3c2410.c and uart_cpu_s3c2410.c, to silence two gcc warnings. Approved by: re (gjb) X-MFC-With: r252394
* Use the correct address when calling kva_free()cognet2013-08-101-1/+1
| | | | | Pointy hat to: cognet Spotted out by: alc
* - The address lies in the bus space handle, not in the cookiecognet2013-08-101-5/+5
| | | | | | - Use the right address when calling kva_free() (Is there any reason why the s3c2xx0 comes with its own version of bs_map/ bs_unmap ? It seems to be just the same as in bus_space_generic.c)
* Replace kernel virtual address space allocation with vmem. This providesjeff2013-08-071-2/+2
| | | | | | | | | | | | | transparent layering and better fragmentation. - Normalize functions that allocate memory to use kmem_* - Those that allocate address space are named kva_* - Those that operate on maps are named kmap_* - Implement recursive allocation handling for kmem_arena in vmem. Reviewed by: alc Tested by: pho Sponsored by: EMC / Isilon Storage Division
* Fix low-level uart drivers that set their fifo sizes in the softc too late.ian2013-04-011-9/+9
| | | | | | | | | uart(4) allocates send and receiver buffers in attach() before it calls the low-level driver's attach routine. Many low-level drivers set the fifo sizes in their attach routine, which is too late. Other drivers set them in the probe() routine, so that they're available when uart(4) allocates buffers. This fixes the ones that were setting the values too late by moving the code to probe().
* Eliminate a redundant #include: machine/pmap.h is already includedalc2013-03-011-1/+0
| | | | through vm/pmap.h.
* Complete r247297:attilio2013-02-281-2/+0
| | | | | | Remove unused inclusions of vm/vm_pager.h and vm/vnode_pager.h. Sponsored by: EMC / Isilon storage division
* Initialize vm_max_kernel_address on non-FDT platforms. (This should havealc2013-02-201-1/+2
| | | | | | | | been included in r246926.) The second parameter to pmap_bootstrap() is redundant. Eliminate it. Reviewed by: andrew
* Create a common set_stackptrs in sys/arm/machdep.c.andrew2012-09-221-11/+1
| | | | | | | On single core devices set_stackptrs is only ever called with cpu = 0 in initarm and will be identical to the existing function. On SMP this needs to be implemented for sys/arm/mp_machdep.c, but the implementations are identical for each SoC.
* Set machine correctly on ARM. This allows universe to use the correct worldandrew2012-08-181-0/+1
| | | | | | when building each kernel. Reviewed by: imp
* Merging projects/armv6, part 1gonzo2012-08-153-5/+3
| | | | | | | | | Cummulative patch of changes that are not vendor-specific: - ARMv6 and ARMv7 architecture support - ARM SMP support - VFP/Neon support - ARM Generic Interrupt Controller driver - Simplification of startup code for all platforms
* Move unmask IRQ function call up to nexus device level.gonzo2012-07-171-1/+0
| | | | | | | | | | FDT-enabled targets were broken after r238043 that relies on device up the hierarchy to properly setup interrupt. nexus device for ARM platforms did job only partially: setting handler but not unmasking interrupt. Unmasking was performed by platform code. Reviewed by: andrew@
* Remove some unused variables/externs that have been copied too many times...imp2012-07-101-9/+0
|
* Remove stray line from merge.imp2012-06-151-1/+0
|
* More Linux boot support. Create arm_dump_avail_init() to initializeimp2012-06-141-12/+2
| | | | | | this array either from Linux boot data, when enabled, or in the typical way that most ports do it. arm_pyhs_avail_init is coming soon since it must be a separate function.
* Modify all the arm platform files to call parse_boot_param passing inimp2012-06-141-3/+2
| | | | | | | | | | | | | the boot parameters from initarm first thing. parse_boot_param parses the boot arguments and converts them to the /boot/loader metadata the rest of the kernel uses. parse_boot_param is a weak alias to fake_preload_metadata, which all the platforms use now, but may become more extensive in the future. Since it is a weak symbol, specific boards may define their own parse_boot_param to interface to custom boot loaders. Reviewed by: cognet@, Ian Lapore
* Trim trailing whitespace...imp2012-06-135-20/+20
|
* Pull out the common code to initialise proc0 & thread0 from initarm to aandrew2012-06-101-10/+2
| | | | | | common function. Reviewed by: imp
* Minor rearrangement of the locore <-> initarm interface. Pass in aimp2012-06-031-1/+1
| | | | | | structure with the first 4 registers to allow a wider range of boot loaders to work. Future commits will make use of this to centralize support for the different loaders.
* Get myself a brain, move the call to init_param1() before the first use incognet2011-02-211-2/+3
| | | | | | | at91_machdep.c, and do it for the files I forgot the first time Reported by: andrew Submitted by: pluknet
* Move the load address of the kernel to the start of KVA as theandrew2011-01-291-4/+4
| | | | | | s3c24x0 copy of initarm expects the kernel to be loaded there. Approved by: imp (mentor)
* Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize.pluknet2011-01-211-4/+3
| | | | | | | Submitted by: perryh pluto.rain.com (previous version) Reviewed by: jhb Approved by: kib (mentor) Tested by: universe
* Remove bogus usage of INTR_FAST. "Fast" interrupts are now indicated byjhb2011-01-061-1/+1
| | | | | registering a filter handler rather than a threaded handler. Also remove a bogus use of INTR_MPSAFE for a filter.
* Allow external interrupts.andrew2010-07-242-7/+163
| | | | | | | | - Set the external pin to interrupt in bus_setup_intr - Implement bus_config_intr for external interrupts - Extend arm_{,un}mask_irq to work with external interrupts Approved by: imp (mentor)
* Add the s3c24x0 real time clock driverandrew2010-07-224-1/+194
| | | | Approved by: imp (mentor)
* Rework how device memory is allocated on the s3c24x0 CPU's.andrew2010-07-225-81/+67
| | | | | | | | | | | The device virtual addresses are now able to be allocated at runtime rather than from the static pmap_devmap at boot. The only exception is memory required before we have had a chance to dynamically allocate it. While here reduce the space between the statically allocated devices by reducing the distance between the virtual addresses. Approved by: imp (mentor)
* Add support for the Samsung S3C2xx0 family of ARM SoCs written byimp2010-03-2020-0/+3577
Andrew Turner. The kernel supports the LN2410SBC evaluation board, and likely others. These parts (or similar ones) are in some open hardware designs for phones. Submitted by: Andrew Turner
OpenPOWER on IntegriCloud