Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/libgfxinit/+/68111 )
Change subject: gma: Correct Global annotation for Initialize()
......................................................................
gma: Correct Global annotation for Initialize()
On G45, we use the private PCI device `Dev` during
Power_And_Clocks.Initialize(). As its `Dev.PCI_State`
is not directly visible in the sub-package, it is
assumed that the whole, abstract `Device_State` can
be altered. This includes `Registers.GTT_State`.
Correcting the `Globals` aspect for G45 makes it
excessive for other platforms, hence we need the
same forest of additional justifications and anno-
tations as we have for Power_Up_VGA().
Change-Id: I7086b024d96f0a17f19f46f60ceac6757eb91867
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M common/hw-gfx-gma.adb
1 file changed, 35 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/11/68111/1
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index 87c8fb0..1db493f 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -436,6 +436,11 @@
----------------------------------------------------------------------------
+ pragma Warnings
+ (GNATprove, Off, """Registers.GTT_State"" * is not modified*",
+ Reason => "The whole, abstract Device_State is modified in certain configurations.");
+ pragma Warnings
+ (GNATprove, Off, "no check message justified*", Reason => "see below");
procedure Initialize
(Write_Delay : in Word64 := 0;
Clean_State : in Boolean := False;
@@ -443,7 +448,9 @@
with
Refined_Global =>
(Input => (Time.State),
- In_Out => (Dev.PCI_State, Registers.Register_State, Port_IO.State),
+ In_Out =>
+ (Dev.PCI_State, Port_IO.State,
+ Registers.Register_State, Registers.GTT_State),
Output =>
(PCI_Usable,
Config.Variable,
@@ -592,6 +599,12 @@
Initialized := True;
end Initialize;
+ pragma Annotate
+ (GNATprove, Intentional, "unused global",
+ "The whole, abstract Device_State is modified in certain configurations.");
+ pragma Warnings (GNATprove, On, "no check message justified*");
+ pragma Warnings
+ (GNATprove, On, """Registers.GTT_State"" * is not modified*");
function Is_Initialized return Boolean
with
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/68111
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: I7086b024d96f0a17f19f46f60ceac6757eb91867
Gerrit-Change-Number: 68111
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/libgfxinit/+/68110 )
Change subject: gma: Make HW.GFX.GMA.SPLL package private
......................................................................
gma: Make HW.GFX.GMA.SPLL package private
If it's not private, newer GNATprove versions assume the less
specific `GMA.Device_State` would be used as global input/output.
Change-Id: I8a8258fecc5433510555f9a1165356a769c02be7
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M common/broxton/hw-gfx-gma-spll.ads
M common/haswell/hw-gfx-gma-spll.ads
M common/skylake/hw-gfx-gma-spll.ads
3 files changed, 16 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/10/68110/1
diff --git a/common/broxton/hw-gfx-gma-spll.ads b/common/broxton/hw-gfx-gma-spll.ads
index 571dde9..277a8c1 100644
--- a/common/broxton/hw-gfx-gma-spll.ads
+++ b/common/broxton/hw-gfx-gma-spll.ads
@@ -12,7 +12,7 @@
-- GNU General Public License for more details.
--
-package HW.GFX.GMA.SPLL is
+private package HW.GFX.GMA.SPLL is
-- Just for a common interface with Haswell's DDI.
-- There is no SPLL (no FDI) on Broxton.
diff --git a/common/haswell/hw-gfx-gma-spll.ads b/common/haswell/hw-gfx-gma-spll.ads
index 60222ed..bd1402c 100644
--- a/common/haswell/hw-gfx-gma-spll.ads
+++ b/common/haswell/hw-gfx-gma-spll.ads
@@ -12,7 +12,7 @@
-- GNU General Public License for more details.
--
-package HW.GFX.GMA.SPLL is
+private package HW.GFX.GMA.SPLL is
procedure On;
diff --git a/common/skylake/hw-gfx-gma-spll.ads b/common/skylake/hw-gfx-gma-spll.ads
index 6b9dc01..7b038df 100644
--- a/common/skylake/hw-gfx-gma-spll.ads
+++ b/common/skylake/hw-gfx-gma-spll.ads
@@ -12,7 +12,7 @@
-- GNU General Public License for more details.
--
-package HW.GFX.GMA.SPLL is
+private package HW.GFX.GMA.SPLL is
-- Just for a common interface with Haswell's DDI.
-- There is no SPLL (no FDI) on Skylake.
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/68110
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: I8a8258fecc5433510555f9a1165356a769c02be7
Gerrit-Change-Number: 68110
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/libgfxinit/+/68108 )
Change subject: gma: Shuffle warning justifications to support old and new tooling
......................................................................
gma: Shuffle warning justifications to support old and new tooling
We annotate a check message because the actual behaviour of Power_Up_VGA
depends on the platform we compile for. For the same reason we have to
justify a warning that the annotation may be spurious. SPARK rules state
that the annotation has to directly follow the subprogram's body. Appa-
rently that also accounts for the warning justification, so move it
above the subprogram body.
Change-Id: I8f879e73b3ea43de7e10532fba6a9b2bb9eecfcf
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M common/hw-gfx-gma.adb
1 file changed, 19 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/08/68108/1
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index 851686e..87c8fb0 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -606,6 +606,8 @@
pragma Warnings
(GNATprove, Off, """Registers.Register_State"" * is not modified*",
Reason => "Power_Up_VGA is only effective in certain configurations.");
+ pragma Warnings
+ (GNATprove, Off, "no check message justified*", Reason => "see below");
procedure Power_Up_VGA
with
Refined_Global =>
@@ -627,8 +629,6 @@
begin
Power_And_Clocks.Power_Up (Cur_Configs, Fake_Config);
end Power_Up_VGA;
- pragma Warnings
- (GNATprove, Off, "no check message justified*", Reason => "see below");
pragma Annotate
(GNATprove, Intentional, "unused global",
"Power_Up_VGA is only effective in certain configurations.");
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/68108
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: I8f879e73b3ea43de7e10532fba6a9b2bb9eecfcf
Gerrit-Change-Number: 68108
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/libgfxinit/+/68107 )
Change subject: display probing: Update warning justification
......................................................................
display probing: Update warning justification
The wording for the unused-assignment warning changed. To support
both older and newer version of GNATprove, add another justification
to the existing one.
Change-Id: I832d40a8e515eff63be2b196b18ca7b6f0114914
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M common/hw-gfx-gma-display_probing.adb
1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/07/68107/1
diff --git a/common/hw-gfx-gma-display_probing.adb b/common/hw-gfx-gma-display_probing.adb
index 79421c9..67f8ddf 100644
--- a/common/hw-gfx-gma-display_probing.adb
+++ b/common/hw-gfx-gma-display_probing.adb
@@ -132,6 +132,8 @@
pragma Warnings (GNATprove, Off, "unused assignment to ""Raw_EDID""",
Reason => "We just want to check if it's readable.");
+ pragma Warnings (GNATprove, Off, """Raw_EDID"" is set by * but*",
+ Reason => "We just want to check if it's readable.");
if Has_Sibling_Port (Port) then
-- Probe sibling port too and bail out if something is detected.
-- This is a precaution for adapters that expose the pins of a
@@ -148,6 +150,7 @@
end if;
end;
end if;
+ pragma Warnings (GNATprove, On, """Raw_EDID"" is set by * but*");
pragma Warnings (GNATprove, On, "unused assignment to ""Raw_EDID""");
else
Success := False;
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/68107
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: I832d40a8e515eff63be2b196b18ca7b6f0114914
Gerrit-Change-Number: 68107
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/libgfxinit/+/68106 )
Change subject: framebuffer filler: Extend loop invariant to assist prover
......................................................................
framebuffer filler: Extend loop invariant to assist prover
Automatically proving that `Linux_Start + Col` is still within
`Width * Height` only worked sporadically. So we let GNATprove
show an intermediate step first to assist it.
Change-Id: I34d5b4d5840fd2b45c4bf3d72abba88487dda2dd
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M common/hw-gfx-framebuffer_filler.adb
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/06/68106/1
diff --git a/common/hw-gfx-framebuffer_filler.adb b/common/hw-gfx-framebuffer_filler.adb
index 29c7da6..c6f1841 100644
--- a/common/hw-gfx-framebuffer_filler.adb
+++ b/common/hw-gfx-framebuffer_filler.adb
@@ -38,7 +38,9 @@
for Line in 0 .. Framebuffer.Height - 1 loop
pragma Loop_Invariant (Line_Start = Line * Framebuffer.Stride);
for Col in 0 .. Framebuffer.Width - 1 loop
- pragma Loop_Invariant (Line_Start = Line * Framebuffer.Stride);
+ pragma Loop_Invariant
+ (Line_Start = Line * Framebuffer.Stride and
+ Line_Start <= (Height_Type'Last - 1) * Width_Type'Last);
FB.Write (FB_Index (Line_Start + Col), 16#ff000000#);
end loop;
Line_Start := Line_Start + Framebuffer.Stride;
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/68106
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: I34d5b4d5840fd2b45c4bf3d72abba88487dda2dd
Gerrit-Change-Number: 68106
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/libgfxinit/+/68105 )
Change subject: dp info: Provide Link_Status'Object_Size and padding
......................................................................
dp info: Provide Link_Status'Object_Size and padding
We convert a plane byte buffer to a `Link_Status` object via an
`Unchecked_Conversion`. While the situation is actually clear
to the compiler because of the record representation clause for
`Link_Status`, SPARK rules demand an explicit `'Object_Size`.
Change-Id: Id7f6b9f50105d9357adcb60fd551b719d9eccd30
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M common/hw-gfx-dp_info.adb
M common/hw-gfx-dp_info.ads
2 files changed, 23 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/05/68105/1
diff --git a/common/hw-gfx-dp_info.adb b/common/hw-gfx-dp_info.adb
index 392fee1..74e77a2 100644
--- a/common/hw-gfx-dp_info.adb
+++ b/common/hw-gfx-dp_info.adb
@@ -356,7 +356,9 @@
Success : out Boolean)
is
subtype Status_Index is DP_Defs.Aux_Payload_Index range 0 .. 5;
- subtype Status_Buffer is Buffer (Status_Index);
+ subtype Status_Buffer is Buffer (Status_Index)
+ with
+ Object_Size => 48;
function Buffer_As_Status is new Ada.Unchecked_Conversion
(Source => Status_Buffer, Target => Link_Status);
diff --git a/common/hw-gfx-dp_info.ads b/common/hw-gfx-dp_info.ads
index 6d22bcc..732894b 100644
--- a/common/hw-gfx-dp_info.ads
+++ b/common/hw-gfx-dp_info.ads
@@ -63,16 +63,21 @@
type Adjust_Requests_Array is array (Lane_Index) of Adjust_Request;
pragma Pack (Adjust_Requests_Array);
+ type Link_Status_Padding is mod 2**15;
type Link_Status is record
Lanes : Lanes_Status;
Interlane_Align_Done : Boolean;
+ Padding : Link_Status_Padding;
Adjust_Requests : Adjust_Requests_Array;
end record;
for Link_Status use record
Lanes at 16#00# range 0 .. 15;
Interlane_Align_Done at 16#02# range 0 .. 0;
+ Padding at 16#02# range 1 .. 15;
Adjust_Requests at 16#04# range 0 .. 15;
end record;
+ for Link_Status'Size use 48;
+ for Link_Status'Object_Size use 48;
----------------------------------------------------------------------------
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/68105
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: Id7f6b9f50105d9357adcb60fd551b719d9eccd30
Gerrit-Change-Number: 68105
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Attention is currently required from: Jeff Daly, Fabio Aiuto, Mariusz Szafrański, Suresh Bellampalli, Stefan Reinauer, Vanessa Eusebio.
Hello build bot (Jenkins), Jeff Daly, Mariusz Szafrański, Stefan Reinauer, Suresh Bellampalli, Vanessa Eusebio,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/68102
to look at the new patch set (#2).
Change subject: treewide: use helpers to check for enabled pci devices
......................................................................
treewide: use helpers to check for enabled pci devices
use helpers to check for pci devices instead of open-coded
solution.
TEST: compiled and qemu run successfully
Signed-off-by: Fabio Aiuto <fabioaiuto83(a)gmail.com>
Change-Id: Idb992904112db611119b2d33c8b1dd912b2c8539
---
M src/arch/x86/mpspec.c
M src/soc/intel/broadwell/pch/lpc.c
M src/soc/intel/common/block/lpc/lpc_lib.c
M src/soc/intel/denverton_ns/lpc.c
M src/southbridge/intel/bd82x6x/lpc.c
M src/southbridge/intel/i82801gx/lpc.c
M src/southbridge/intel/i82801ix/lpc.c
M src/southbridge/intel/i82801jx/lpc.c
M src/southbridge/intel/ibexpeak/lpc.c
M src/southbridge/intel/lynxpoint/lpc.c
10 files changed, 26 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/68102/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/68102
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idb992904112db611119b2d33c8b1dd912b2c8539
Gerrit-Change-Number: 68102
Gerrit-PatchSet: 2
Gerrit-Owner: Fabio Aiuto <fabioaiuto83(a)gmail.com>
Gerrit-Reviewer: Jeff Daly <jeffd(a)silicom-usa.com>
Gerrit-Reviewer: Mariusz Szafrański <mariuszx.szafranski(a)intel.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: Suresh Bellampalli <suresh.bellampalli(a)intel.com>
Gerrit-Reviewer: Vanessa Eusebio <vanessa.f.eusebio(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Jeff Daly <jeffd(a)silicom-usa.com>
Gerrit-Attention: Fabio Aiuto <fabioaiuto83(a)gmail.com>
Gerrit-Attention: Mariusz Szafrański <mariuszx.szafranski(a)intel.com>
Gerrit-Attention: Suresh Bellampalli <suresh.bellampalli(a)intel.com>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Vanessa Eusebio <vanessa.f.eusebio(a)intel.com>
Gerrit-MessageType: newpatchset