Adrian-Ken Rueegsegger has uploaded this change for review. ( https://review.coreboot.org/c/libhwbase/+/38982 )
Change subject: mutime: Make Sinfo an imported constant ......................................................................
mutime: Make Sinfo an imported constant
The subject info data structure is static and is not changed during runtime. Make Sinfo an imported constant and adjust refinement of abstract timer state and global contract of Hz function accordingly. They are no longer volatile.
Change-Id: I5729bc7f2d77c5c51a6cab2edc7953e95c9e4d29 Signed-off-by: Adrian-Ken Rueegsegger ken@codelabs.ch --- M common/hw-time-timer.ads M common/mutime/hw-time-timer.adb 2 files changed, 3 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/libhwbase refs/changes/82/38982/1
diff --git a/common/hw-time-timer.ads b/common/hw-time-timer.ads index 90978df..2bec99b 100644 --- a/common/hw-time-timer.ads +++ b/common/hw-time-timer.ads @@ -15,8 +15,7 @@ private package HW.Time.Timer with Abstract_State => ((Timer_State with - Part_Of => HW.Time.State, - External => Async_Writers), + Part_Of => HW.Time.State), (Abstract_Time with Part_Of => HW.Time.State, External => Async_Writers)) @@ -38,7 +37,6 @@
function Hz return T with - Volatile_Function, Global => (Input => Timer_State);
end HW.Time.Timer; diff --git a/common/mutime/hw-time-timer.adb b/common/mutime/hw-time-timer.adb index c683d6f..8e9b497 100644 --- a/common/mutime/hw-time-timer.adb +++ b/common/mutime/hw-time-timer.adb @@ -25,10 +25,9 @@ := ((Musinfo.Subject_Info_Type_Size + (16#1000# - 1)) / 16#1000#) * 16#1000#;
- Sinfo : Musinfo.Subject_Info_Type + Sinfo : constant Musinfo.Subject_Info_Type with - Volatile, - Async_Writers, + Import, Address => System'To_Address (Sinfo_Base_Address);
Sched_Info : Muschedinfo.Scheduling_Info_Type
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/libhwbase/+/38982 )
Change subject: mutime: Make Sinfo an imported constant ......................................................................
Patch Set 1: Verified+1
Looks like I didn't verify this before, my (stale) gnatprove complains about some missing Refined annotations. Anyway, doesn't block any standard tests.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/libhwbase/+/38982 )
Change subject: mutime: Make Sinfo an imported constant ......................................................................
Patch Set 1: Code-Review+2
Nico Huber has submitted this change. ( https://review.coreboot.org/c/libhwbase/+/38982 )
Change subject: mutime: Make Sinfo an imported constant ......................................................................
mutime: Make Sinfo an imported constant
The subject info data structure is static and is not changed during runtime. Make Sinfo an imported constant and adjust refinement of abstract timer state and global contract of Hz function accordingly. They are no longer volatile.
Change-Id: I5729bc7f2d77c5c51a6cab2edc7953e95c9e4d29 Signed-off-by: Adrian-Ken Rueegsegger ken@codelabs.ch Reviewed-on: https://review.coreboot.org/c/libhwbase/+/38982 Tested-by: Nico Huber nico.h@gmx.de Reviewed-by: Nico Huber nico.h@gmx.de --- M common/hw-time-timer.ads M common/mutime/hw-time-timer.adb 2 files changed, 3 insertions(+), 6 deletions(-)
Approvals: Nico Huber: Verified; Looks good to me, approved
diff --git a/common/hw-time-timer.ads b/common/hw-time-timer.ads index 90978df..2bec99b 100644 --- a/common/hw-time-timer.ads +++ b/common/hw-time-timer.ads @@ -15,8 +15,7 @@ private package HW.Time.Timer with Abstract_State => ((Timer_State with - Part_Of => HW.Time.State, - External => Async_Writers), + Part_Of => HW.Time.State), (Abstract_Time with Part_Of => HW.Time.State, External => Async_Writers)) @@ -38,7 +37,6 @@
function Hz return T with - Volatile_Function, Global => (Input => Timer_State);
end HW.Time.Timer; diff --git a/common/mutime/hw-time-timer.adb b/common/mutime/hw-time-timer.adb index c683d6f..8e9b497 100644 --- a/common/mutime/hw-time-timer.adb +++ b/common/mutime/hw-time-timer.adb @@ -25,10 +25,9 @@ := ((Musinfo.Subject_Info_Type_Size + (16#1000# - 1)) / 16#1000#) * 16#1000#;
- Sinfo : Musinfo.Subject_Info_Type + Sinfo : constant Musinfo.Subject_Info_Type with - Volatile, - Async_Writers, + Import, Address => System'To_Address (Sinfo_Base_Address);
Sched_Info : Muschedinfo.Scheduling_Info_Type