From 83a1b88e571a3b94532386f97486e6e15f8b505b Mon Sep 17 00:00:00 2001 From: nakasima Date: Wed, 17 Dec 2008 10:33:52 +0000 Subject: [PATCH] =?UTF-8?q?osSetTick=E4=BF=AE=E6=AD=A3=E3=81=8B=E3=81=A4?= =?UTF-8?q?=E9=9D=9E=E5=85=AC=E9=96=8B=E5=8C=96=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@116 b871894f-2f95-9b40-918c-086798483c85 --- .../build/libraries/os/ARM11/os_interrupt.c | 12 +++++------ .../build/libraries/os/common/os_tick.c | 20 +++++++++---------- .../bootrom/include/brom/os/ARM11/interrupt.h | 12 +++++------ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/trunk/bootrom/build/libraries/os/ARM11/os_interrupt.c b/trunk/bootrom/build/libraries/os/ARM11/os_interrupt.c index 4eb2ee0..2d1dfa5 100644 --- a/trunk/bootrom/build/libraries/os/ARM11/os_interrupt.c +++ b/trunk/bootrom/build/libraries/os/ARM11/os_interrupt.c @@ -178,7 +178,7 @@ BOOL osRestoreInterruptID( OSIntrID id, BOOL state ) } /*---------------------------------------------------------------------------* - Name: osSetInterruptPending + Name: osSetInterruptPendingID Description: set Interrupt Set Pending Register @@ -187,7 +187,7 @@ BOOL osRestoreInterruptID( OSIntrID id, BOOL state ) Returns: TRUE if last state is pending *---------------------------------------------------------------------------*/ -BOOL osSetInterruptPending( OSIntrID id ) +BOOL osSetInterruptPendingID( OSIntrID id ) { u32 ofs = id/32; u32 sft = id%32; @@ -201,7 +201,7 @@ BOOL osSetInterruptPending( OSIntrID id ) } /*---------------------------------------------------------------------------* - Name: osClearInterruptPending + Name: osClearInterruptPendingID Description: set Interrupt Clear Pending Register @@ -210,7 +210,7 @@ BOOL osSetInterruptPending( OSIntrID id ) Returns: TRUE if last state is pending *---------------------------------------------------------------------------*/ -BOOL osClearInterruptPending( OSIntrID id ) +BOOL osClearInterruptPendingID( OSIntrID id ) { u32 ofs = id/32; u32 sft = id%32; @@ -224,7 +224,7 @@ BOOL osClearInterruptPending( OSIntrID id ) } /*---------------------------------------------------------------------------* - Name: osRestoreInterruptPending + Name: osRestoreInterruptPendingID Description: restore Interrupt Pending @@ -234,7 +234,7 @@ BOOL osClearInterruptPending( OSIntrID id ) Returns: TRUE if last state is pending *---------------------------------------------------------------------------*/ -BOOL osRestoreInterruptPending( OSIntrID id, BOOL state ) +BOOL osRestoreInterruptPendingID( OSIntrID id, BOOL state ) { u32 ofs = id/32; u32 sft = id%32; diff --git a/trunk/bootrom/build/libraries/os/common/os_tick.c b/trunk/bootrom/build/libraries/os/common/os_tick.c index 011355b..d560931 100644 --- a/trunk/bootrom/build/libraries/os/common/os_tick.c +++ b/trunk/bootrom/build/libraries/os/common/os_tick.c @@ -202,7 +202,7 @@ u16 osGetTickLo(void) #endif // SDK_ARM9 /*---------------------------------------------------------------------------* - Name: osSetTick + Name: i_osSetTick Description: set tick value @@ -210,7 +210,7 @@ u16 osGetTickLo(void) Returns: None *---------------------------------------------------------------------------*/ -void osSetTick(u64 count) +void i_osSetTick(u64 count) { OSIntrMode prev; @@ -219,21 +219,21 @@ void osSetTick(u64 count) i_osNeedResetTimer = TRUE; + i_osTickCounter = (u64)(count >> OS_TICK_HI_SHIFT); + #ifdef SDK_ARM11 - osClearInterruptPending(OSi_TICK_IE_TIMER_ID); - - i_osTickCounter = (u64)(count >> OS_TICK_HI_SHIFT); - osStopTimer(); + osClearInterruptPendingID(OSi_TICK_IE_TIMER_ID); + osStartTimer((u32)(count & OS_TICK_LO_MASK), 0); + #else // SDK_ARM9 - reg_OS_IF = OSi_TICK_IE_TIMER; - - i_osTickCounter = (u64)(count >> OS_TICK_HI_SHIFT); - osSetTimerControl(OSi_TICK_TIMER, 0); + osClearInterruptPendingID(OSi_TICK_IE_TIMER_ID); + osSetTimerCount((OSTimer)OSi_TICK_TIMER, (u16)(count & OS_TICK_LO_MASK)); osSetTimerControl(OSi_TICK_TIMER, (u16)OSi_TICK_TIMERCONTROL); + #endif // SDK_ARM9 (void)osRestoreInterrupts(prev); diff --git a/trunk/bootrom/include/brom/os/ARM11/interrupt.h b/trunk/bootrom/include/brom/os/ARM11/interrupt.h index e8afd2b..c3df901 100644 --- a/trunk/bootrom/include/brom/os/ARM11/interrupt.h +++ b/trunk/bootrom/include/brom/os/ARM11/interrupt.h @@ -77,7 +77,7 @@ BOOL osDisableInterruptID( OSIntrID id ); BOOL osRestoreInterruptID( OSIntrID id, BOOL state ); /*---------------------------------------------------------------------------* - Name: osSetInterruptPending + Name: osSetInterruptPendingID Description: set Interrupt Set Pending Register @@ -85,10 +85,10 @@ BOOL osRestoreInterruptID( OSIntrID id, BOOL state ); Returns: TRUE if last state is pending *---------------------------------------------------------------------------*/ -BOOL osSetInterruptPending( OSIntrID id ); +BOOL osSetInterruptPendingID( OSIntrID id ); /*---------------------------------------------------------------------------* - Name: osClearInterruptPending + Name: osClearInterruptPendingID Description: set Interrupt Clear Pending Register @@ -96,10 +96,10 @@ BOOL osSetInterruptPending( OSIntrID id ); Returns: TRUE if last state is pending *---------------------------------------------------------------------------*/ -BOOL osClearInterruptPending( OSIntrID id ); +BOOL osClearInterruptPendingID( OSIntrID id ); /*---------------------------------------------------------------------------* - Name: osRestoreInterruptPending + Name: osRestoreInterruptPendingID Description: restore Interrupt Pending @@ -108,7 +108,7 @@ BOOL osClearInterruptPending( OSIntrID id ); Returns: TRUE if last state is pending *---------------------------------------------------------------------------*/ -BOOL osRestoreInterruptPending( OSIntrID id, BOOL state ); +BOOL osRestoreInterruptPendingID( OSIntrID id, BOOL state ); /*---------------------------------------------------------------------------* Name: osSetEndOfInterruptRegister