@@ -360,6 +360,84 @@ __STATIC_FORCEINLINE uint32_t __get_CNTP_CTL(void)
360360 return result ;
361361}
362362
363+ /******************************* VIRTUAL TIMER *******************************/
364+ /** see [ARM DDI 0406C.d] :
365+ . §B4.1.31 "CNTV_CTL, Counter-timer Virtual Timer Control register"
366+ . §B4.1.32 "CNTV_CVAL, Counter-timer Virtual Timer CompareValue register"
367+ . §B4.1.33 "CNTV_TVAL, Counter-timer Virtual Timer TimerValue register"
368+ . §B4.1.34 "CNTVCT, Counter-timer Virtual Count register"
369+ **/
370+ /** \brief Set CNTV_TVAL
371+ This function assigns the given value to VL1 Virtual Timer Value Register (CNTV_TVAL).
372+ \param [in] value CNTV_TVAL Register value to set
373+ */
374+ __STATIC_FORCEINLINE void __set_CNTV_TVAL (uint32_t value )
375+ {
376+ __set_CP (15 , 0 , value , 14 , 3 , 0 );
377+ }
378+
379+ /** \brief Get CNTV_TVAL
380+ This function returns the value of the VL1 Virtual Timer Value Register (CNTV_TVAL).
381+ \return CNTV_TVAL Register value
382+ */
383+ __STATIC_FORCEINLINE uint32_t __get_CNTV_TVAL (void )
384+ {
385+ uint32_t result ;
386+ __get_CP (15 , 0 , result , 14 , 3 , 0 );
387+ return result ;
388+ }
389+
390+ /** \brief Get CNTVCT
391+ This function returns the value of the 64 bits VL1 Virtual Count Register (CNTVCT).
392+ \return CNTVCT Register value
393+ */
394+ __STATIC_FORCEINLINE uint64_t __get_CNTVCT (void )
395+ {
396+ uint64_t result ;
397+ __get_CP64 (15 , 1 , result , 14 );
398+ return result ;
399+ }
400+
401+ /** \brief Set CNTV_CVAL
402+ This function assigns the given value to 64bits VL1 Virtual Timer CompareValue Register (CNTV_CVAL).
403+ \param [in] value CNTV_CVAL Register value to set
404+ */
405+ __STATIC_FORCEINLINE void __set_CNTV_CVAL (uint64_t value )
406+ {
407+ __set_CP64 (15 , 3 , value , 14 );
408+ }
409+
410+ /** \brief Get CNTV_CVAL
411+ This function returns the value of the 64 bits VL1 Virtual Timer CompareValue Register (CNTV_CVAL).
412+ \return CNTV_CVAL Register value
413+ */
414+ __STATIC_FORCEINLINE uint64_t __get_CNTV_CVAL (void )
415+ {
416+ uint64_t result ;
417+ __get_CP64 (15 , 3 , result , 14 );
418+ return result ;
419+ }
420+
421+ /** \brief Set CNTV_CTL
422+ This function assigns the given value to VL1 Virtual Timer Control Register (CNTV_CTL).
423+ \param [in] value CNTV_CTL Register value to set
424+ */
425+ __STATIC_FORCEINLINE void __set_CNTV_CTL (uint32_t value )
426+ {
427+ __set_CP (15 , 0 , value , 14 , 3 , 1 );
428+ }
429+
430+ /** \brief Get CNTV_CTL register
431+ \return CNTV_CTL Register value
432+ */
433+ __STATIC_FORCEINLINE uint32_t __get_CNTV_CTL (void )
434+ {
435+ uint32_t result ;
436+ __get_CP (15 , 0 , result , 14 , 3 , 1 );
437+ return result ;
438+ }
439+
440+ /***************************** VIRTUAL TIMER END *****************************/
363441#endif
364442
365443/** \brief Set TLBIALL
0 commit comments