Commit e99dc06f authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix coroutines being given less stack space than intended

Detail:
  s/coroutine - Fix coroutines being given less stack space than intended; appeared to be causing a stack overflow when some debug code was enabled
  s/coroutine, h/coroutine - Add comments to remind people to keep the two definitions of the stack size in sync, to avoid more mistakes in future
Admin:
  Tested on Titanium


Version 0.10. Tagged as 'SATADriver-0_10'
parent cfe02b0d
/* (0.09)
/* (0.10)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.09
#define Module_MajorVersion_CMHG 0.10
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 07 Jul 2018
#define Module_Date_CMHG 02 Dec 2018
#define Module_MajorVersion "0.09"
#define Module_Version 9
#define Module_MajorVersion "0.10"
#define Module_Version 10
#define Module_MinorVersion ""
#define Module_Date "07 Jul 2018"
#define Module_Date "02 Dec 2018"
#define Module_ApplicationDate "07-Jul-18"
#define Module_ApplicationDate "02-Dec-18"
#define Module_ComponentName "SATADriver"
#define Module_ComponentPath "cddl/RiscOS/Sources/HWSupport/ATA/SATADriver"
#define Module_FullVersion "0.09"
#define Module_HelpVersion "0.09 (07 Jul 2018)"
#define Module_LibraryVersionInfo "0:9"
#define Module_FullVersion "0.10"
#define Module_HelpVersion "0.10 (02 Dec 2018)"
#define Module_LibraryVersionInfo "0:10"
......@@ -29,7 +29,7 @@
typedef struct
{
uint32_t *sp;
uint32_t stack[512];
uint32_t stack[512]; /* Keep in sync with coroutine_reset! */
}
coroutine_state_t;
......
......@@ -37,7 +37,7 @@ coroutine_reset
; first call of coroutine_resume, we're at the coroutine entry point
ADD a1, a1, #4+560 ; coroutine sl
MOV a4, #0
ADD ip, a1, #256*4-560 ; coroutine sp
ADD ip, a1, #512*4-560 ; coroutine sp. Keep in sync with coroutine.h!
STR a2, [ip, #-4]! ; coroutine pc
STR a4, [ip, #-4]! ; coroutine fp
STR a1, [ip, #-4]! ; coroutine sl
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment