Hung-Te Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36056 )
Change subject: soc/mediatek/mt8183: Share console for calibration blob output
......................................................................
soc/mediatek/mt8183: Share console for calibration blob output
Most coreboot debug messages are sent to UART and cbmem console, and we
also want to collect DRAM calibration module output, especially for
cbmem console (so we can see the logs after kernel is up).
Instead of sharing whole cbmem/cbtable/cbmemconsole implementations, we
want to simplify that by a simple function pointer so output can be
preserved by do_putchar, which internally sends data to all registered
consoles (usually cbmem console and UART).
BUG=b:139099592
TEST=make; boots properly for full-k, with and without serial console.
BRANCH=kukui
Change-Id: I1cf16711caf3831e99e17b522b86694524425116
Signed-off-by: Hung-Te Lin <hungte(a)chromium.org>
---
M src/soc/mediatek/mt8183/include/soc/dramc_param.h
M src/soc/mediatek/mt8183/memory.c
2 files changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/36056/1
diff --git a/src/soc/mediatek/mt8183/include/soc/dramc_param.h b/src/soc/mediatek/mt8183/include/soc/dramc_param.h
index c2df459..564b43d 100644
--- a/src/soc/mediatek/mt8183/include/soc/dramc_param.h
+++ b/src/soc/mediatek/mt8183/include/soc/dramc_param.h
@@ -61,6 +61,7 @@
struct dramc_param {
struct dramc_param_header header;
+ void (*do_putc)(unsigned char c);
struct sdram_params freq_params[DRAM_DFS_SHUFFLE_MAX];
};
diff --git a/src/soc/mediatek/mt8183/memory.c b/src/soc/mediatek/mt8183/memory.c
index b536ebc..7bd6498 100644
--- a/src/soc/mediatek/mt8183/memory.c
+++ b/src/soc/mediatek/mt8183/memory.c
@@ -117,6 +117,7 @@
if (cbfs_prog_stage_load(&dram))
return -2;
+ dparam->do_putc = do_putchar;
prog_set_entry(&dram, prog_entry(&dram), dparam);
prog_run(&dram);
--
To view, visit https://review.coreboot.org/c/coreboot/+/36056
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1cf16711caf3831e99e17b522b86694524425116
Gerrit-Change-Number: 36056
Gerrit-PatchSet: 1
Gerrit-Owner: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-MessageType: newchange
Hello Arthur Heymans, Matt DeVillier, Thomas Heijligen,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/libgfxinit/+/35716
to review the following change.
Change subject: gma irl: Handle CDClk and calculate dot-clock limits
......................................................................
gma irl: Handle CDClk and calculate dot-clock limits
This one is easy, the CDClk always runs at the same fixed rate. We
only have to limit dot clocks to 90% of CDClk.
Change-Id: I475a276d050f5a109b44c02ee250c9f4a9ebe863
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.adb
M common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.ads
2 files changed, 20 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/16/35716/1
diff --git a/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.adb b/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.adb
index a7b1035..42aabbd 100644
--- a/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.adb
+++ b/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.adb
@@ -51,7 +51,18 @@
Time.U_Delay (20); -- DMI latency
end if;
+ Config.CDClk := Config.Default_CDClk_Freq;
+ Config.Max_CDClk := Config.Default_CDClk_Freq;
Config.Raw_Clock := Config.Default_RawClk_Freq;
end Initialize;
+ procedure Limit_Dotclocks
+ (Configs : in out Pipe_Configs;
+ CDClk_Switch : out Boolean)
+ is
+ begin
+ Config_Helpers.Limit_Dotclocks (Configs, Config.CDClk * 90 / 100);
+ CDClk_Switch := False;
+ end Limit_Dotclocks;
+
end HW.GFX.GMA.Power_And_Clocks_Ironlake;
diff --git a/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.ads b/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.ads
index fc58d75..18b9c19 100644
--- a/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.ads
+++ b/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.ads
@@ -12,10 +12,19 @@
-- GNU General Public License for more details.
--
+with HW.GFX.GMA.Config_Helpers;
+
private package HW.GFX.GMA.Power_And_Clocks_Ironlake is
procedure Initialize;
+ procedure Limit_Dotclocks
+ (Configs : in out Pipe_Configs;
+ CDClk_Switch : out Boolean)
+ with
+ Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
+ procedure Update_CDClk (Configs : in out Pipe_Configs) is null;
+
procedure Pre_All_Off is null;
procedure Post_All_Off is null;
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/35716
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: I475a276d050f5a109b44c02ee250c9f4a9ebe863
Gerrit-Change-Number: 35716
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: newchange
Hello Arthur Heymans, Matt DeVillier, Thomas Heijligen,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/libgfxinit/+/35714
to review the following change.
Change subject: gma config: Allow to cache CDClk in variable config state
......................................................................
gma config: Allow to cache CDClk in variable config state
Add `CDClk` and `Max_CDClk` fields to the variable config state.
They will be used to cache the current hardware state, so that
we don't have to poke registers in every call to Update_Outputs().
Also introduce `CDClk_Range`, which is chosen such that common
dot-clock limits (90% of CDClk) are in range of `Frequency_Type`.
Change-Id: I3d9c956eabcedb2f8299a1642ff0172cd7f54e45
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M common/hw-gfx-gma-config.ads.template
M common/hw-gfx-gma.ads
2 files changed, 15 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/14/35714/1
diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template
index d5bd2ba..bbfdc05 100644
--- a/common/hw-gfx-gma-config.ads.template
+++ b/common/hw-gfx-gma-config.ads.template
@@ -60,6 +60,8 @@
type Valid_Port_Array is array (Port_Type) of Boolean;
type Variable_Config is record
Valid_Port : Valid_Port_Array;
+ CDClk : CDClk_Range;
+ Max_CDClk : CDClk_Range;
Raw_Clock : Frequency_Type;
Dyn_CPU : Gen_CPU_Type;
Dyn_CPU_Var : Gen_CPU_Variant;
@@ -67,6 +69,8 @@
Initial_Settings : constant Variable_Config :=
(Valid_Port => (others => False),
+ CDClk => CDClk_Range'First,
+ Max_CDClk => CDClk_Range'First,
Raw_Clock => Frequency_Type'First,
Dyn_CPU => Gen_CPU_Type'First,
Dyn_CPU_Var => Gen_CPU_Variant'First);
@@ -74,6 +78,8 @@
Variable : Variable_Config with Part_Of => GMA.State;
Valid_Port : Valid_Port_Array renames Variable.Valid_Port;
+ CDClk : CDClk_Range renames Variable.CDClk;
+ Max_CDClk : CDClk_Range renames Variable.Max_CDClk;
Raw_Clock : Frequency_Type renames Variable.Raw_Clock;
CPU : Gen_CPU_Type renames Variable.Dyn_CPU;
CPU_Var : Gen_CPU_Variant renames Variable.Dyn_CPU_Var;
@@ -271,7 +277,7 @@
----------------------------------------------------------------------------
- Default_CDClk_Freq : <ilkhswvar> Frequency_Type :=
+ Default_CDClk_Freq : <ilkhswvar> CDClk_Range :=
(if Gen_G45 then 320_000_000 -- unused
elsif CPU_Ironlake then 450_000_000
elsif CPU_Sandybridge or CPU_Ivybridge then 400_000_000
@@ -279,7 +285,7 @@
elsif Gen_Haswell then 450_000_000
elsif Gen_Broxton then 288_000_000
elsif Gen_Skylake then 337_500_000
- else Frequency_Type'First);
+ else CDClk_Range'First);
Default_RawClk_Freq : <hswvar> Frequency_Type :=
(if Gen_G45 then 100_000_000 -- unused, depends on FSB
diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads
index bdc4704..69df07d 100644
--- a/common/hw-gfx-gma.ads
+++ b/common/hw-gfx-gma.ads
@@ -206,6 +206,13 @@
private
+ -- Older Generations only allow dot clocks <= 90% of the CDClk.
+ -- Hence, to calculate the limit, CDClk must start higher.
+ subtype CDClk_Range is Frequency_Type
+ range Frequency_Type'First * 10 / 9 + 1 .. Frequency_Type'Last;
+
+ ----------------------------------------------------------------------------
+
PCI_Usable : Boolean with Part_Of => State;
use type HW.PCI.Index;
procedure PCI_Read16 (Value : out Word16; Offset : HW.PCI.Index)
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/35714
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: I3d9c956eabcedb2f8299a1642ff0172cd7f54e45
Gerrit-Change-Number: 35714
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-MessageType: newchange
Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35137 )
Change subject: util/abuild: Have abuild generate the .xcompile if it doesn't exist
......................................................................
util/abuild: Have abuild generate the .xcompile if it doesn't exist
Previously if .xcompile was missing, abuild would silently ignore the
error. With https://review.coreboot.org/c/coreboot/+/34241 we now check
the return code so abuild started failing.
We should generate the .xcompile if it doesn't exist. The Makefile will
handle that so we include it as the first Makefile.
We then need to override the default target so we don't use the one from
the Makefile.
BUG=b:112267918
TEST=ran abuild and made sure it generated a .xcompile in the root.
Change-Id: I79ded36d47b0219d0b126adff80a57be1c2bdf07
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
---
M util/abuild/abuild
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/35137/1
diff --git a/util/abuild/abuild b/util/abuild/abuild
index 4a62cfa..23b22aa 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -471,13 +471,14 @@
required_arches=$(grep -E "^CONFIG_ARCH_(BOOTBLOCK|R.MSTAGE|VERSTAGE)" "$TARGET/${BUILD_NAME}/config.build" | \
sed "s,^CONFIG_ARCH_[^_]*_\([^=]*\)=.*$,\1," |sort -u |tr 'A-Z\n\r' 'a-z ')
- missing_arches="$($MAKE --no-print-directory -f - \
- REQUIRED_ARCHES="$required_arches" <<'EOF'
+ missing_arches="$($MAKE --no-print-directory -f Makefile -f - \
+ REQUIRED_ARCHES="$required_arches" obj="${build_dir}" <<'EOF'
include .xcompile
.PHONY: missing_arches
missing_arches:
$(if $(XCOMPILE_COMPLETE),,$(error .xcompile is invalid.))
@echo $(foreach arch,$(REQUIRED_ARCHES),$(if $(filter $(arch),$(SUBARCH_SUPPORTED)),,$(arch)))
+.DEFAULT_GOAL := missing_arches
EOF
)"
# shellcheck disable=SC2181
--
To view, visit https://review.coreboot.org/c/coreboot/+/35137
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I79ded36d47b0219d0b126adff80a57be1c2bdf07
Gerrit-Change-Number: 35137
Gerrit-PatchSet: 1
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-MessageType: newchange
Nico Huber has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/29483 )
Change subject: util/abuild: Ensure .xcompile exists
......................................................................
Abandoned
run over by a more twisted solution that was more urgent to review
--
To view, visit https://review.coreboot.org/c/coreboot/+/29483
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib485e7741b7700fa241c192e60900ae5f1d977f5
Gerrit-Change-Number: 29483
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: abandon