Commit graph

31 commits

Author SHA1 Message Date
Michael Sevakis
307cb04948 AS3525v1/2: Enable nested handling of interrupts
Mostly for the sake of reducing latency for audio servicing where other service
routines can take a long time to complete, leading to occasional drops of a
few samples, especially in recording, where they are fairly frequent.

One mystery that remains is GPIOA IRQ being interrupted causes strange
undefined instruction exceptions, most easily produced on my Fuze V2 with a
scrollwheel. Making GPIOA the top ISR for now, thus not interruptible, cures it.

SVC mode is used during the actual calls. Hopefully the SVC stack size is
sufficient. Prologue and epilogue code only uses the IRQ stack and is large
enough.

Any routine code that should not be interrupted should disable IRQ itself from
here on in.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31642 a1c6a512-1295-4272-9138-f99709370657
2012-01-08 22:29:25 +00:00
Marcin Bukat
bf056d5372 Switch to SYS mode on arm FS#12322 by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30741 a1c6a512-1295-4272-9138-f99709370657
2011-10-11 16:06:03 +00:00
Rafaël Carré
3e690ac60d arm/crt0.S: comment why the reset vector doesn't use absolute addressing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26929 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 18:31:14 +00:00
Rafaël Carré
fd715fa95c as3525*: enable MMU in bootloader
Reserve 1MB of DRAM for loading rockbox and use the rest as BSS
Write sdram setup in assembler and move it to a separate file, together
with MMU init code

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26926 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 17:33:51 +00:00
Rafaël Carré
646a999e35 Sansa AMS: call the exception handler with the correct address when the exception happened in Thumb state
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26818 a1c6a512-1295-4272-9138-f99709370657
2010-06-12 16:55:51 +00:00
Rafaël Carré
1596128296 arm/crt0.S: s58l* don't use this file, no need for 'DFUC' string
adjust vectors offsets

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26709 a1c6a512-1295-4272-9138-f99709370657
2010-06-08 23:26:21 +00:00
Rafaël Carré
37862a2157 as3525: Fix previous commit, IRAM_ORIG can not be represented as an immediate value on targets with 2MB of ram
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25230 a1c6a512-1295-4272-9138-f99709370657
2010-03-17 05:10:41 +00:00
Rafaël Carré
ab7365610b as3525*: revert r25198 and inline memory_init in crt0.S
We do not need a stack pointer at this step, and we are sure to not use
memory not initialized yet (like bss)

Fixes FS#11114 (tested on Fuze)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25229 a1c6a512-1295-4272-9138-f99709370657
2010-03-17 05:02:42 +00:00
Rafaël Carré
1e422d0ea4 as3525* : make sure sp is setup in bootloader
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25199 a1c6a512-1295-4272-9138-f99709370657
2010-03-15 11:29:19 +00:00
Rafaël Carré
191857cc8d as3525*: setup stack pointer before we use it
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25198 a1c6a512-1295-4272-9138-f99709370657
2010-03-15 11:26:49 +00:00
Thomas Martitz
9b810734f8 Really fix bootloaders now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25017 a1c6a512-1295-4272-9138-f99709370657
2010-03-03 23:52:36 +00:00
Thomas Martitz
f8edc32589 FS#10756 - Free unused init code
Introduce a new .init section for initialisation code, so that it can be copied to an area which is later overwritten before calling. The stack/bss can then overwrite that code, effectively freeing the code size that the initialisation routines need. Gives a few kB ram usage back.
Only implemented for PP and as3525 so far. More targets could be added, as well as more functions.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25013 a1c6a512-1295-4272-9138-f99709370657
2010-03-03 23:20:32 +00:00
Rafaël Carré
9db0e78ac0 crt0: init correctly as3525v2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24853 a1c6a512-1295-4272-9138-f99709370657
2010-02-22 08:28:58 +00:00
Rafaël Carré
b2323be33b ARM: lr addresses the next instruction after the failing one in undefined instruction vector
Substract 4 before passing the argument to UIE so the correct address is displayed

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24321 a1c6a512-1295-4272-9138-f99709370657
2010-01-24 15:04:21 +00:00
Rafaël Carré
f504153857 FS#10048 : enable MMU and data cache on Sansa AMS to give a major speed up
- cache IRAM and DRAM
- map IRAM just next to DRAM to remove the need for -mlong-calls and reduce binsize
- tweak delays in Fuze button code
- tweak delays in Clip button code (down button sometimes doesn't respond anyway : an alternate driver is being worked on)

Before reporting any problem, please check your filesystem or format your player from the OF

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21228 a1c6a512-1295-4272-9138-f99709370657
2009-06-08 23:05:33 +00:00
Rafaël Carré
678b6d02ac Sansa AMS: Use IRAM (in app linker script and crt0.S)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19137 a1c6a512-1295-4272-9138-f99709370657
2008-11-18 17:15:56 +00:00
Rafaël Carré
308f21dc68 ARM C Runtime : prepare to exception vectors if not in the bootloader
For example if running from SDRAM, we need to copy the vectors to offset 0

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19044 a1c6a512-1295-4272-9138-f99709370657
2008-11-09 06:17:16 +00:00
Frank Gevaerts
b56b0a37f4 remove dead code from firmware/target/arm/crt0.S, and conditionalise bits of it
make the meizu builds compile with the new crt0.S location


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18776 a1c6a512-1295-4272-9138-f99709370657
2008-10-11 18:32:17 +00:00
Dave Chapman
e0f8c31216 Move the S5L8700 (Meizu) crt0.S file up one level - it can be used as a generic ARM crt0.S (the uncommitted patch for the Sansa V2s uses it).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18775 a1c6a512-1295-4272-9138-f99709370657
2008-10-11 18:15:42 +00:00
Will Robertson
32f6109fb1 Gigabeat S memory management stuff.
* Moved crt0.S to imx31 subdirectory, as it was the last target using the unified file.
* DRAM is now remapped to 0x0, facilitating interrupts (which aren't done yet)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15965 a1c6a512-1295-4272-9138-f99709370657
2007-12-23 12:19:40 +00:00
Karl Kurbjun
31ea780ee0 Seperate the Gigabeat F/X crt0.s, cleanup some #ifdefs in app.lds, add an extra reg to the debug menu.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15579 a1c6a512-1295-4272-9138-f99709370657
2007-11-11 17:58:13 +00:00
Karl Kurbjun
0a632680e9 Some small cleanups and code for testing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15312 a1c6a512-1295-4272-9138-f99709370657
2007-10-26 05:17:15 +00:00
Dave Chapman
8383bff582 TAB policing - no code changes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15000 a1c6a512-1295-4272-9138-f99709370657
2007-10-06 08:38:25 +00:00
Karl Kurbjun
4a42723c33 Seperate M:Robe crt0.S, fix the vector tables for the bootloader, and show touchscreen values on single line.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14814 a1c6a512-1295-4272-9138-f99709370657
2007-09-22 06:04:14 +00:00
Will Robertson
590501cfe4 Merge the Gigabeat S branch back into trunk. Fingers crossed nothing breaks.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14805 a1c6a512-1295-4272-9138-f99709370657
2007-09-21 15:51:53 +00:00
Karl Kurbjun
7b97fe21c0 Beginning of an M:Robe 500i port. Currently only in the bootloader stage. Needs another piece of code to start the boot process - will be in the wiki.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14763 a1c6a512-1295-4272-9138-f99709370657
2007-09-20 04:46:41 +00:00
Michael Sevakis
60efd38bbe Gigabeat: Use vectored IRQ mode interrupts and add a trap for unhandled ones.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13792 a1c6a512-1295-4272-9138-f99709370657
2007-07-05 07:14:24 +00:00
Michael Sevakis
f48e0b514c Gigabeat: Get rid of the obsolete FIQ wrapper (not used on PP anymore FIY, but no change there). Use the FIQ stack for DMA address and size variables instead of globals.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13309 a1c6a512-1295-4272-9138-f99709370657
2007-05-03 12:39:36 +00:00
Tomasz Malesinski
cd630c9e0a PNX0101 changes:
Make PNX0101-specific system.c and crt0.S.
Add new register names from LPC2880 user manual.
Add support for timer.
Enable CPU frequency changing. 


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12904 a1c6a512-1295-4272-9138-f99709370657
2007-03-24 19:26:13 +00:00
Marcoen Hirschberg
295367686e merge a big part of the unofficial gigabeat cvs back. Includes working bootloader and rockbox with audio.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11850 a1c6a512-1295-4272-9138-f99709370657
2006-12-29 02:49:12 +00:00
Daniel Ankers
41997d3d89 Clean up crt0.S and move it to the target tree
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10830 a1c6a512-1295-4272-9138-f99709370657
2006-08-31 19:45:05 +00:00