Commit graph

3,529 commits

Author SHA1 Message Date
Nancy Lin
14595d64de lib/edid_fill_fb: Add dual pipe flag to lb_framebuffer_flags
Extend the lb_framebuffer_flags struct to include one more bitfield
'has_dual_pipe' to indicate dual pipe support.

TEST=firmware display ok, in depthcharge with https://crrev.com/c/7129839
BRANCH=none
BUG=b:424782827

Change-Id: I082be80b4606090ed219820a407d80d9f429ea7e
Signed-off-by: Nancy Lin <nancy.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90038
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-11-18 07:37:20 +00:00
Maximilian Brune
04d5201426 treewide: Fix include guards
Include guards should cover the whole file.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Idbb7b26b31460ad5ac6b8a55a41eb274a8fcec92
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89871
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub "Kuba" Czapiga <czapiga@google.com>
2025-11-13 14:58:40 +00:00
Vince Liu
c63e901b99 mipi: Add panel flags to support C-PHY interface
Add a new member 'flags' to the panel structure in panel.h, and define
`PANEL_FLAG_CPHY` to indicate C-PHY interface support. This change
enables panel drivers to check and handle C-PHY panels.

BUG=b:433422905,b:428854543
BRANCH=skywalker
TEST=build passed

Signed-off-by: Bincai Liu bincai.liu@mediatek.corp-partner.google.com
Signed-off-by: Vince Liu vince-wl.liu@mediatek.corp-partner.google.com
Change-Id: I4c35ad2cb6fc2289598ae47b3abf1c6c706dad42
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89760
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-10-28 04:10:32 +00:00
Maximilian Brune
2c6cf2c2a8 include/cper.h: Update CPER structures with __packed attribute
Change-Id: I79945d40d68d2de93e8745425a046e700be97182
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89678
Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-10-27 19:58:54 +00:00
Maximilian Brune
745f1312aa include/cper.h: Update comments to UEFI spec version 2.10
note: The entire patch was created using AI (besides commit-msg)

Change-Id: I0f80d1d8cd67b26a4ec1014584b5486254115839
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Co-authored-by: aider (openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89677
Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-10-24 21:36:59 +00:00
Elyes Haouas
b87a9795de tree: Use boolean for s3resume
Change-Id: I3e23134f879fcaf817cf62b641e9b59563eb643b
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86331
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-10-23 13:34:15 +00:00
Maciej Strozek
f1c973bbff drivers/soundwire/cs42l43: Support Cirrus Logic CS42L43 codec
CS42L43 is a PC Codec with headphone and class D speaker drivers.

The driver was written based on the datasheet for CS42L43 part and
generates the audio SSDT information.

CS42L43 supports DisCo Version v2.1, but coreboot currently only
supports DisCo v1.0, so ACPI is only generated based on DisCo v1.0.

CS42L43 also supports the SDCA v1.0 Specification (from DisCo v2.1)
is also not currently supported by coreboot, therefore SDCA ACPI
properties are also not generated.

This is currently only tested using QEMU using example configuration:

chip drivers/soundwire/cs42l43
	# SoundWire Link 0 ID 1
	register "desc" = ""CODEC""
	register "sub" = ""1337""
	device generic 0.1 on end
end

Which produces the ACPI:

Device (SW01)
{
    Name (_ADR, 0x00003101FA424301)  // _ADR: Address
    Name (_DDN, "CODEC")  // _DDN: DOS Device Name
    Name (_SUB, "1337")  // _SUB: Subsystem ID
    Method (_STA, 0, NotSerialized)  // _STA: Status
    {
        Return (0x0F)
    }

    Name (_DSD, Package (0x04)  // _DSD: Device-Specific Data
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x0F)
        {
            Package (0x02)
            {
                "mipi-sdw-sw-interface-revision",
                0x00010000
            },

            Package (0x02)
            {
                "mipi-sdw-wake-up-unavailable",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-test-mode-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-clock-stop-mode1-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-simplified-clockstopprepare-sm-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-clockstopprepare-timeout",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-clockstopprepare-hard-reset-behavior",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-slave-channelprepare-timeout",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-highPHY-capable",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-paging-supported",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-bank-delay-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-port15-read-behavior",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-master-count",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-source-port-list",
                0x06
            },

            Package (0x02)
            {
                "mipi-sdw-sink-port-list",
                0x60
            }
        },

        ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b") /* Hierarchical Data Extension */,
        Package (0x06)
        {
            Package (0x02)
            {
                "mipi-sdw-port-bra-mode-0",
                "BRA0"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-0-subproperties",
                "DP0"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-2-source-subproperties",
                "SRC2"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-5-sink-subproperties",
                "SNK5"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-1-sink-subproperties",
                "SNK1"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-6-source-subproperties",
                "SRC6"
            }
        }
    })
    Name (BRA0, Package (0x02)
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x04)
        {
            Package (0x02)
            {
                "mipi-sdw-bra-mode-min-bus-frequency",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-bra-mode-max-bus-frequency",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-bra-mode-max-data-per-frame",
                0x01D6
            },

            Package (0x02)
            {
                "mipi-sdw-bra-mode-min-us-between-transactions",
                Zero
            }
        }
    })
    Name (DP0, Package (0x04)
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x07)
        {
            Package (0x02)
            {
                "mipi-sdw-port-wordlength-configs",
                Package (0x03)
                {
                    0x08,
                    0x10,
                    0x18
                }
            },

            Package (0x02)
            {
                "mipi-sdw-bra-flow-controlled",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-bra-imp-def-response-supported",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-bra-role-supported",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-simplified-channel-prepare-sm",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-imp-def-dp0-interrupts-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-imp-def-bpt-supported",
                Zero
            }
        },

        ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b") /* Hierarchical Data Extension */,
        Package (0x01)
        {
            Package (0x02)
            {
                "mipi-sdw-port-bra-mode-0",
                "BRA0"
            }
        }
    })
    Name (SRC2, Package (0x02)
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x0C)
        {
            Package (0x02)
            {
                "mipi-sdw-data-port-type",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-max-grouping-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-imp-def-dpn-interrupts-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-modes-supported",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-max-async-buffer",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-block-packing-mode",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-port-encoding-type",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-port-wordlength-configs",
                Package (0x03)
                {
                    0x08,
                    0x10,
                    0x18
                }
            },

            Package (0x02)
            {
                "mipi-sdw-simplified-channelprepare-sm",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-port-channelprepare-timeout",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-channel-number-list",
                Package (0x02)
                {
                    Zero,
                    One
                }
            },

            Package (0x02)
            {
                "mipi-sdw-channel-combination-list",
                Package (0x03)
                {
                    0x03,
                    0x02,
                    One
                }
            }
        }
    })
    Name (SNK5, Package (0x02)
    {
        [... Same as SRC2 ...]
    })
    Name (SNK1, Package (0x02)
    {
        [... Same as SRC2 except:]

	Package (0x02)
	{
	    "mipi-sdw-channel-number-list",
	    Package (0x04)
	    {
	        Zero,
	        One,
	        0x02,
	        0x03
	    }
	},

	Package (0x02)
	{
	    "mipi-sdw-channel-combination-list",
	    Package (0x04)
	    {
	        One,
	        0x03,
	        0x07,
	        0x0F
	    }
	}

        [ Same as SRC2 ...]

        }
    })
    Name (SRC6, Package (0x02)
    {
        [... Same as SRC2 ...]
    })
}

Change-Id: I38f40d29945b22f9c308ea4b7ed6157ccadb3c7c
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89230
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-10-18 18:31:09 +00:00
Yidi Lin
0ff213d711 soc/mediatek/common: Conditionally set up framebuffer
To save memory, only allocate and configure the framebuffer when display
output is required during boot.

This is achieved by:
1. Making the `framebuffer` memory region optional.
2. Guarding the framebuffer's uncached MMU configuration with a
   `display_init_required()` check.

This ensures the framebuffer is prepared only when needed, saving
memory on boot paths that do not require display.

BUG=b:319511268
BRANCH=none
TEST=emerge-rauru coreboot

Change-Id: I3808031160e421de7c21f585f4b79d42bfddccc4
Signed-off-by: Yidi Lin <yidilin@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89541
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-10-16 07:04:22 +00:00
Jeremy Compostella
55bf4ea07e cpu/x86/topology: Add tile and die ID CPU topology fields
This commit makes the tile and die ID CPU topology parameters
information available to support the implementation of
EFI_MP_SERVICES_PROTOCOL.GetProcessorInfo() in accordance with the
Platform Initialization Specification 1.7.

TEST=Instrumentation shows that the tile_id and die_id apic_path fields
     are properly populated.

Change-Id: If4d473901c8de02b3d6cef44f5481a1864f14d64
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89461
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-10-13 17:09:18 +00:00
Jeremy Compostella
21f6ccf3a4 soc/intel/pantherlake: Use CPU ID mask for all stepping
This commit refactors the handling of CPU IDs for the Pantherlake and
Wildcat Lake series by using a single CPU ID mask instead of listing
each individual stepping. This change simplifies the code by reducing
redundancy and making it easier to manage CPU IDs.

Previously, each stepping of the Pantherlake series had its own entry,
which led to unnecessary complexity. By consolidating these into a
single entry with a mask, we improve maintainability and reduce
potential errors.

These modifications do not affect the existing functionality but
streamline the codebase for future updates and maintenance.

TEST=CPU ID c06c1 is properly identified as "Pantherlake".

Change-Id: Ie52ed860c096a3d157ae6580aeedf3acb8c723ab
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89375
Reviewed-by: Bora Guvendik <bora.guvendik@intel.corp-partner.google.com>
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-10-01 21:08:08 +00:00
Maxim Polyakov
d5f1ecedf7 {device/azalia_codec,mainboard}: Use node ID enums for Realtek ALC887
Add enums for the output pin widget node IDs for Realtek ALC887 [1] and
use these enums in the motherboard configuration.

[1] Figure 1, Block Diagram, ALC887-GR Datasheet, Rev. 1.0, 24 July 2008

Change-Id: Iaa2ebd7447a19dfc98b006c851f1605851c1ea5d
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89364
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-10-01 13:25:14 +00:00
Maximilian Brune
4431848ee6 acpi: Move most of HEST ACPI table to common code
This moves most of the vendor and architecture independent code into
common ACPI code.

Change-Id: I7dca939612a5f3d8d6a148fa67bf0ce891952584
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88034
Reviewed-by: Anand Vaikar <a.vaikar2021@gmail.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-09-30 23:52:09 +00:00
Nicholas Sudsgaard
31fc5b06a6 device: Introduce reworked azalia verb table
The current implementation of the HDA verb table has been shown to have
some problems. The primary issue is that it requires the programmer to
keep track of the amount of verbs that are going to be loaded. While
this may sound simple, in practice there have been numerous cases where
this "count field" has been forgotten to be updated or miscounted. In
the case where the "count field" is incorrect, coreboot will start
looking for codecs in some random memory location, essentially making
loading further codecs impossible.

Another issue is the "count field" treats 4 32-bit values as a single
group, therefore the amount of verbs in the table must be a multiple
of 4. This makes intuitive sense when only using the AZALIA_PIN_CFG() or
AZALIA_SUBVENDOR() macros. However, once the verb table requires
"controls" that use < 4 verbs (e.g. "Coefficient Index"), we need to add
padding values to ensure the alignment is correct. This adds unnecessary
verbs to the table which can further lead to unnecessary processing.

Therefore, in this change we proprose a solution by separating the codec
entries in the verb table into structures, which allows us to separate
the verbs into an array and automatically calculate the "count field"
using the ARRAY_SIZE() macro. It also makes iteration and access to
member fields easier. We also now count the verbs and not 4 32-bit
groups, eliminating the aforementioned alignment issue.

Additionally, this change also changes the way coreboot searches for
entries in the verb table. Before, we searched the table for only a
matching vendor ID, but now we search for a matching vendor ID and
codec address pair. This allows a mainboard to be able to correctly load
multiple audio codecs that use the same chips.

To make reviewing this large rework easier, we temporarily keep both
implementations (legacy and reworked) and allow boards to choose which
implementation to use by selecting a Kconfig. Newer boards are
discouraged from using the legacy implementation, as it is not selected
by default. This allows us to slowly change the codebase instead of
changing everything at once.

TEST=
  1. Timeless build with AZALIA_USE_LEGACY_VERB_TABLE=y produces
     identical binaries (with INCLUDE_CONFIG_FILE=n)
  2. HP ProBook 450 G3 using reworked verb table was able to load all
     verbs successfully.

Change-Id: Ib16237de89956405afa3be5b4e3f64a4d62e6a48
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88656
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-09-28 18:18:14 +00:00
Kapil Porwal
a3e2073591 lib/vga_gfx: Add API to render text on a bitmap buffer
This commit introduces a new library, `vga_gfx`, to handle text
rendering on a VGA planar buffer. The new functionality supports
displaying text with various screen orientations (Normal, Left Up,
Bottom Up, and Right Up).

The key features are:
- A new public API, `render_text_to_bitmap_buffer()`, that takes a
  text string, screen orientation, and buffer as input.
- Automatic text wrapping to fit the screen's effective width,
  considering the specified orientation.
- The `vga_gfx.c` library is conditionally compiled for both
  `romstage` and `ramstage` based on `CONFIG_VGA` and
  `CONFIG_ROMSTAGE_VGA` respectively.
- Text is rendered as a 1-bit-per-pixel bitmap and then cropped
  to its bounding box to optimize the output size.
- The `bootsplash.h` header file is updated with the new API
  prototype and related constants.

This implementation allows for flexible text display, which is
crucial for showing user notifications on devices that may
operate in a rotated display mode.

BUG=b:406725440
TEST=Verify VGA text rotation on Google/Felino.

Change-Id: I80fcf0a3f106a44f8e4ecdeec38f54ff09f86e6f
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89089
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-09-28 18:17:51 +00:00
Stefan Binding
a5252bd5b9 drivers/soundwire/cs35l56: Support Cirrus Logic CS35L56 Smart Amplifier Family
Add support for Class-D Smart Amplifiers: CS35L56, CS35L57 and CS35L63.

CS35L56 and CS35L57 are 18.5 V Class D Smart Amplifiers with Multi-Cell
Battery Boost.

CS35L63 is a PC Smart Amplifier with Speaker Protection and Audio
Enhancement Algorithms.

The driver was written based on the Datasheets for these parts and
generates the audio SSDT information for the amplifiers. Since all
three parts are part of the same family they all have similar SoundWire
settings.

The user can configure which part, SSID and Speaker ID is generated in
ACPI, as well as define each amplifier's Soundwire Unique ID and Link
ID.

These parts support DisCo Version v2.1, but coreboot currently only
supports DisCo v1.0, so ACPI is only generated based on DisCo v1.0.

These parts also support the SDCA v1.0 Specification (from DisCo v2.1)
is also not currently supported by coreboot, therefore SDCA ACPI
properties are also not generated.

This is currently only tested using QEMU using example configuration:

chip drivers/soundwire/cs35l56
	# SoundWire Link 2 ID 3
	register "desc" = ""Left Speaker Amp""
	register "part_id" = "MIPI_DEV_ID_CIRRUS_CS35L56"
	register "sub" = ""12345678""
	device generic 2.3 on end
end

Which produces the ACPI:

Device (SW23)
{
    Name (_ADR, 0x00023301FA355601)  // _ADR: Address
    Name (_DDN, "Left Speaker Amp")  // _DDN: DOS Device Name
    Name (_SUB, "12345678")  // _SUB: Subsystem ID
    Method (_STA, 0, NotSerialized)  // _STA: Status
    {
        Return (0x0F)
    }

    Name (_DSD, Package (0x04)  // _DSD: Device-Specific Data
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x0F)
        {
            Package (0x02)
            {
                "mipi-sdw-sw-interface-revision",
                0x00010000
            },

            [...]

            Package (0x02)
            {
                "mipi-sdw-source-port-list",
                0x18
            },

            Package (0x02)
            {
                "mipi-sdw-sink-port-list",
                0x06
            }
        },

        ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b") /* Hierarchical Data Extension */,
        Package (0x06)
        {
            Package (0x02)
            {
                "mipi-sdw-port-bra-mode-0",
                "BRA0"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-0-subproperties",
                "DP0"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-1-sink-subproperties",
                "SNK1"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-2-sink-subproperties",
                "SNK2"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-3-source-subproperties",
                "SRC3"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-4-source-subproperties",
                "SRC4"
            }
        }
    })
    Name (BRA0, Package (0x02)
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x04)
        {
            Package (0x02)
            {
                "mipi-sdw-bra-mode-min-bus-frequency",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-bra-mode-max-bus-frequency",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-bra-mode-max-data-per-frame",
                0x01D6
            },

            Package (0x02)
            {
                "mipi-sdw-bra-mode-min-us-between-transactions",
                Zero
            }
        }
    })
    Name (DP0, Package (0x04)
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x07)
        {
            Package (0x02)
            {
                "mipi-sdw-port-wordlength-configs",
                Package (0x03)
                {
                    0x08,
                    0x10,
                    0x18
                }
            },

            [...]
        },

        ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b") /* Hierarchical Data Extension */,
        Package (0x01)
        {
            Package (0x02)
            {
                "mipi-sdw-port-bra-mode-0",
                "BRA0"
            }
        }
    })
    Name (SNK1, Package (0x02)
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x0C)
        {
            Package (0x02)
            {
                "mipi-sdw-data-port-type",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-max-grouping-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-imp-def-dpn-interrupts-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-modes-supported",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-max-async-buffer",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-block-packing-mode",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-port-encoding-type",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-port-wordlength-configs",
                Package (0x03)
                {
                    0x08,
                    0x10,
                    0x18
                }
            },

            Package (0x02)
            {
                "mipi-sdw-simplified-channelprepare-sm",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-port-channelprepare-timeout",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-channel-number-list",
                Package (0x02)
                {
                    Zero,
                    One
                }
            },

            Package (0x02)
            {
                "mipi-sdw-channel-combination-list",
                Package (0x01)
                {
                    0x03
                }
            }
        }
    })
    Name (SNK2, Package (0x02)
    {
        [... same as SNK1 ...]
    })
    Name (SRC3, Package (0x02)
    {
        [... same as SNK1 ...]
    })
    Name (SRC4, Package (0x02)
    {
        [... same as SNK1 ...]
    })
}

Change-Id: Ie04020f008862051f26e0101828b5944d212e706
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89131
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-09-26 19:03:27 +00:00
Jeremy Compostella
8bc0eddf15 soc/intel/pantherlake: Add support for a new Panther Lake B0 SKU
This commit adds support for a new Panther Lake B0 SKU CPUID c06c3.

BUG=b:444497427
TEST=Successfully boot a fatcat device with new Panther Lake B0.
     coreboot displays the following log:
     CPU: ID c06c3, Pantherlake B0, ucode: 0000010c

Change-Id: Id2c1caf8d6845bb16a94314c4e9a214def06efee
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89150
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-09-13 22:00:24 +00:00
Sowmya Aralguppe
f8574f7145 soc/intel/ptl: Add Wildcat Lake SKU power map
Add mapping of different SKUs based on CPU ID and TDP values.
Add PowerLimits (PL) values.
Add i_trip value for Fast Vmode.

Note: The i_trip value, the value at which the Voltage Regulator (VR)
or SoC will trigger a protective action such as throttling or
entering Fast Vmode is, due to not being documented, currently set at
70% of the maximum current the VR is designed to support for a rail.
The actual i_trip value to be updated once it is available.

Ref=858124 Power Delivery Guide Rev1p0
    830097 Powermap Rev1p1

BUG=b:433211504
TEST= Build Ocelot and verify it compiles without any error.
check CPU log for the following error

    [ERROR]  Could not find the SKU power map

With the current patch this error line is not seen in the CPU log
anymore.

Change-Id: I8c54efc8eb360ed6f814a336448bb204d5ab0268
Signed-off-by: Sowmya Aralguppe <sowmya.aralguppe@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88858
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Appukuttan V K <appukuttan.vk@intel.com>
Reviewed-by: Usha P <usha.p@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2025-09-13 15:41:21 +00:00
Matt DeVillier
8159b2e06c device/azalia_codec: Add header with enums for Realtek node IDs
Add enums for the output pin widget node IDs for Realtek ALC256 and
ALC269 codecs, to be used in HDA verb tables.

Sources:
ALC256-CG Datasheet Rev 1.1
ALC269-VB Datasheet Rev 0.14N
ALC269-VC Datasheet Rev 0.83

Change-Id: I1b60dd1ce2c1c790e22058d10234856f8b9b9416
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89075
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2025-09-12 06:32:54 +00:00
Elyes Haouas
d4da533473 smbios.h: Update smbios_memory_type
Add MRDIMM memory device type.

Change-Id: I3cfa3b9278ecebd4bc67c95dd2fb794556e80922
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88915
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-09-05 23:57:40 +00:00
Elyes Haouas
183589dcbd smbios.h: Update smbios_memory_form_factor
Add CAMM, CUDIMM and CSODIMM from factors.

Change-Id: I5719998583da9312f4de80a4fbe79f0b3cf0bfba
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88914
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-09-05 23:57:34 +00:00
Subrata Banik
a45c8441af lib: Add boot mode information to coreboot tables
This change introduces `LB_TAG_BOOT_MODE` to the coreboot tables to
convey platform boot information to the payload. The new `lb_boot_mode`
struct uses `enum boot_mode_t` to specify whether the device is booting
in `normal mode`, `low-battery mode` or `off-mode charging`.

This is crucial for platforms where the Application Processor (AP)
manages the charging solution, as it provides the necessary context for
the payload's charger driver. By passing this data through the coreboot
table, we avoid redundant implementation and ensure consistent battery
and charging information is available across both coreboot and the
payload.

A new weak function, `lb_add_boot_mode`, is also introduced. This
function can be overridden by platforms that require this data to add
the boot mode information to the coreboot table.

TEST=Able to build and boot google/quenbi.

Change-Id: I5aea72c02b4d6c856e2504f4007de584c59ee89f
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88992
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-09-05 04:22:21 +00:00
Nicholas Sudsgaard
0a328282ec device/azalia: Add enums for HDA verb and parameter IDs
This is a purely cosmetic change to make things slightly more easier to
read. We also only add the IDs which are actively used in the codebase.

TEST=Timeless build produces identical binaries

Change-Id: I4ec0a570020059c85768bab913dff1ba1977e9f9
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88917
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2025-08-30 13:52:18 +00:00
Subrata Banik
b4347f11d9 include: Make DRAM an explicit region
This patch makes DRAM an explicit region by introducing
DECLARE_OPTIONAL_REGION(dram) and DRAM_END().

Note: many SoC platforms determine DRAM size and layout dynamically
during boot, making a static compile-time value is not feasible always.
Attempting to use REGION_SIZE(dram) in this scenario would result in a
missing symbol `_dram_size` error.

By making dram an optional region, we allow its size and address to be
defined only when available, preventing build failures on platforms
that configure DRAM dynamically.

The old extern u8 _dram[] is removed, as it's now covered by the new
region definition.

This is a preparatory step for future changes that will make use of
the new DRAM_END() macro.

This symbol is necessary for systems that require
the DRAM size to be known and accessible from the linker script or
other parts of the build system.

Additionally, a new macro DRAM_END(addr) is defined in memlayout.h.
This macro provides a consistent way to mark the end of the DRAM
region, similar to how REGION_END and other start/end macros are used
throughout the codebase.

TEST=Able to build and boot google/quenbi.

Change-Id: Ib98ec4b991eed56385c83be6a9ca39ff1380ff1b
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88751
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-08-16 01:58:58 +00:00
Jeremy Soller
e9cb352706 soc/common/smbus: Support reading SPD5 hubs for DDR5
DDR5 uses a Serial Presence Detect (SPD) with hub function
(SPD5 hub device) to store the SPD data. The SPD5 hub has 1024 bytes of
EEPROM (`CONFIG_DIMM_SPD_SIZE=1024`).

Ref: DDR5 SDRAM spec, JESD79-5C.01

Change-Id: Ic5e6c58f255bef86b68ce90a4f853bf4e7c7ccfe
Co-authored-by: Meera Ravindranath <meera.ravindranath@intel.com>
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52731
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-08-02 01:47:44 +00:00
Kapil Porwal
9a8ba5b39a {lib, drivers/intel}: Move BMP rendering logic out of SoC code
This patch refactors the BMP rendering logic, moving it from
drivers/intel/fsp2_0 to src/lib. This centralizes the code
responsible for rendering BMP images to the framebuffer.

Key changes:
- Move BMP rendering functions (e.g., calculate_logo_coordinates,
  copy_logo_to_framebuffer) and their dependencies to
  src/lib/render_bmp.c and src/lib/render_bmp.h.
- Decouple BMP definitions from UEFI headers by introducing new
  coreboot-specific structures for BMP images and BLT pixels.
- Consolidate bootsplash-related declarations into bootsplash.h,
  including new `fw_splash_vertical_alignment`,
  `fw_splash_horizontal_alignment`, and `struct logo_config`.
- Update `soc_load_logo_by_coreboot` to use the new common
  `load_and_render_logo_to_framebuffer` function and `struct
  logo_config` for rendering.
- Relocate `release_logo` to `src/lib/render_bmp.c` for better
  module structure.
- Update `src/lib/Makefile.mk` to include the new render_bmp.c.

This refactoring improves code organization and reusability, making
BMP rendering accessible without tight coupling to Intel-specific
driver code.

BUG=b:427387842
TEST=Verify firmware splash screen on google/fatcat.

Change-Id: I0e20ea7e44b4b3ccdb2d4aa9b6aa10ed3447ccfc
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88361
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-23 17:11:10 +00:00
Jeremy Compostella
3b069d320c cbfs: Add a function to wait for all CBFS preload operations to complete
Introduce cbfs_preload_wait_for_all() to guarantee that all CBFS preload
contexts complete their tasks before moving forward. This function goes
through each preload context and waits for the corresponding thread to
finish by using thread_join(). If any preload thread runs into an issue,
it records an error message along with the context name.

This addition provides a synchronization point during the boot process
which platform code can leverage, typically when the storage backend
supporting asynchronous file transfer is about to be deactivated.

Change-Id: I3ee27ef2fbfdc19bd75532713966f333ad975861
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88457
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-21 13:45:12 +00:00
Patrick Rudolph
82163aedc6 soc/amd/common/block/cpu/noncar: Move BSS and DATA out of PT_LOAD
Currently .bss and .data are within the PT_LOAD area of the
bootblock.elf and thus are placed and initialized at the correct spot
when PSP loads the BIOS Reset Image into DRAM.

On S3 resume PSP verifies that the "BIOS Reset Image" is unmodified
before it hands over control to such. Due to the use of BSS and DATA
within the BIOS Reset Image and the modifications of such at previous
boot the verification always fails.

This change moves '.bss' and '.data' out of the *first* PT_LOAD area
and moves it into a separate data_segment also marked PT_LOAD. Since
the second PT_LOAD is ignored by AMDCOMPRESS it doesn't end in the area
being verified at S3 resume. Since '.data' is now part of a separate
PT_LOAD a new region is inserted called '.datacopy' which is filled
by using objcopy. In turn the assembly code in bootblock will memcpy
'.datacopy' to '.data'.

TEST: Can still boot on amd/birman+ and on up/squared.

Change-Id: Id159ade3029060ce2ca6abcb723d5bdfe8841c3a
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87305
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-07-18 16:50:07 +00:00
Appukuttan V K
9f73b04074 soc/intel/pantherlake: Add new MCH ID for Wildcat Lake
This commit introduces a new MCH device ID to support the Wildcat
Lake SoC. It updates the PCI device ID list and platform reporting
logic to accommodate this new ID.

Key changes:
 - Add PCI_DID_INTEL_WCL_ID_3 (0xfd02) to the list of recognized
   device IDs.
 - Update system agent operations to include the new MCH ID.
 - Enhance platform reporting to recognize the new MCH ID.

References:
- Wildcat Lake Processor EDS Volume 1 (#842271)
- Wildcat Lake External Design Specification (EDS) Volume 2 (#829345)

BUG=b:394208231
TEST=Build Ocelot and verify it compiles without any error.

Change-Id: I464fb147f0d3df214ca64b1321eebab08505d7bc
Signed-off-by: Appukuttan V K <appukuttan.vk@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88248
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Pranava Y N <pranavayn@google.com>
2025-07-04 13:17:15 +00:00
Jeremy Soller
da49da6c82 soc/intel: Add Arrow Lake-S/HX IDs
Change-Id: I7a0a56cf80f053b4bb0c8acb9038c1e46dca5d2e
Ref: Intel Arrow Lake-S/HX EDS, Volume 1 (#729037, rev 2.01)
Ref: Intel 800 Series Chipset Family PCH EDS, Volume 1 (#728144, rev 1.52)
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87454
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-03 16:57:15 +00:00
Elyes Haouas
17abedaef6 include/smp/node: Drop unused is_smp_boot
Change-Id: I831d405c58817da64eb241f432a3eb8a096dbe1b
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86327
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2025-07-01 15:08:52 +00:00
Elyes Haouas
c0413336bc acpi/acpi.h: Use boolean
permanent_smi_handler and acpi_s3_resume_allowed returns boolean,
so use boolean instead of int.

Change-Id: I8f390bf3b472519dc41db7daa57b16458961139e
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84858
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2025-07-01 15:08:32 +00:00
Maximilian Brune
35648dc37b acpi: Add _func suffix for callback functions
It causes some name clashes (and therefore overshadowing) of function
names defined in xeon SOC code in later patches of the patch train.

We don't really have a standard naming scheme for callback functions, so
I just added a _func suffix/postfix to indicate the function is a
callback function and to prevent name clashes.

Change-Id: I21811f75ef6e7642a7e4f69997737cd7b8b1cef9
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88033
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anand Vaikar <a.vaikar2021@gmail.com>
2025-06-26 14:28:34 +00:00
Jamie Ryu
57bffed893 soc/intel/pantherlake: Add new PCI and CPU IDs
This commit adds the relevant IDs to support new Panther Lake (PTL)
System on Chips (SoCs). The CPU profiles are aligned with the matching
definition from Panther Lake Firmware Support Package (FSP) revision
3144.01.

TEST=A Fatcat device with CPUID 0xc06c1 and MCH_ID 0xb003 booted with
     the relevant information printed in corebot logs.
     [DEBUG]  CPU: ID c06c1, Pantherlake B0, ucode: 00000105
     [DEBUG]  MCH: device id b003 (rev 06) is Pantherlake U
     [DEBUG]  PCH: device id e401 (rev 01) is Pantherlake SOC-H SuperSKU
     [DEBUG]  IGD: device id b090 (rev 00) is Pantherlake-U GT2

Change-Id: I66efe51a94edfffc2546817d06a63a9c4b51aa81
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88130
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Cliff Huang <cliff.huang@intel.com>
2025-06-23 16:29:49 +00:00
Subrata Banik
4373eea5d8 {lib, drivers/intel}: Add splash screen footer
This commit introduces the `SPLASH_SCREEN_FOOTER` Kconfig option,
enabling a custom footer image or logo on the firmware splash screen.
This provides an additional branding opportunity for device
manufacturers.

`soc_load_logo_by_coreboot()` now conditionally loads and renders
`footer_logo.bmp` when this option is enabled. The footer logo is
positioned at the bottom of the screen.

A new `SPLASH_SCREEN_FOOTER_LOGO_PATH` Kconfig option is added to
define the footer logo's file path. It defaults to a mainboard-specific
location. `Makefile.mk` is updated to ensure this logo is included in
the CBFS.

This additional branding is made possible by rendering bitmaps using
coreboot's native implementation (`USE_COREBOOT_FOR_BMP_RENDERING`).
FSP currently lacks the necessary callbacks to support this feature.

Currently, the OEM footer branding will appear even when the
system is booting in low-battery mode. A planned update will fix this
by exiting early from the boot process, preventing the footer from
showing and conserving power.

BUG=b:423591644
TEST=Able to display custom footer logo on boot.

Change-Id: I57f8af910e8b8f56e8a4a88f8cca6d60fad380b6
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88029
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-06-23 02:04:26 +00:00
Subrata Banik
be5609bdaf lib: Introduce a new function bmp_load_logo_by_type()
This patch introduces `bmp_load_logo_by_type()` to allow loading a
specific BMP logo from CBFS based on `enum bootsplash_type`.

Now, bmp_load_logo() leverages bmp_load_logo_by_type() with the
system-determined logo type. The new bmp_load_logo_by_type() function
provides a direct interface to load any specified BMP by `enum
bootsplash_type`, which is beneficial for scenarios requiring explicit
logo selection.

BUG=b:423591644
TEST=Able to build and boot google/fatcat. Ensure FW splash screen looks
proper.

Change-Id: I2473f7d48ca2d196ced89d81391cf387627a2f86
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88013
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-06-23 02:04:16 +00:00
Subrata Banik
a1dbb4076c lib: Add support for different bootsplash types
This commit introduces an enumerated type `bootsplash_type` to
differentiate between various bootsplash logos, such as
`BOOTSPLASH_LOW_BATTERY` and `BOOTSPLASH_CENTER`.

A `bootsplash_list` array is added to map these types to their
corresponding default filenames. A new function,
`bmp_get_logo_filename`, is provided to retrieve the correct logo
filename based on the specified bootsplash type. This function also
handles overriding the `BOOTSPLASH_CENTER` logo name if
`CONFIG(HAVE_CUSTOM_BMP_LOGO)` is enabled.

The `bmp_load_logo` function is updated to utilize the new
`bootsplash_type` and `bmp_get_logo_filename` to dynamically select the
appropriate logo for display. This change streamlines logo management
and improves flexibility for different boot scenarios.

BUG=b:423591644
TEST=Able to build and boot google/fatcat. FW splash screen looks
proper.

Change-Id: I882deda56b5d30bb15cc7def408c4ea479ffd6ba
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88052
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-06-23 02:04:07 +00:00
Jeremy Compostella
b879342fe6 soc/intel/pantherlake: Add support for the H204 SKU
The definitions added are based on the following reference documents:

1. Document #815002 Panther Lake H External Design Specification
   Rev. 1.52
2. Document #813278 Panther Lake H Power Map Rev 1.6

Change-Id: I4545e0d48e49ac9a1c7df9b74384bf063455845c
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87953
Reviewed-by: Vidya Gopalakrishnan <vidya.gopalakrishnan@intel.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
2025-06-09 14:59:37 +00:00
Stephen Douthit
96ac0224ab pci: Add support for assigning resources to SR-IOV VF BARs
This ensures that bridge windows allocate enough space to cover
SR-IOV BARs. Without this Linux will print messages, these messages
may differ depending on the kernel version used.

Debian GNU/Linux 12 (kernel 6.1.0-28-amd64):
pci 0000:06:00.0: BAR 7: no space for [mem size 0x00200000 64bit pref]
pci 0000:06:00.0: BAR 7: failed to assign [mem size 0x00200000 64bit
pref]

Ubuntu 22.04.5 LTS (kernel 6.8.0-52-generic):
pci 0000:06:00.0: VF BAR 0 [mem size 0x00200000 64bit pref]: can't
assign; no space
pci 0000:06:00.0: VF BAR 0 [mem size 0x00200000 64bit pref]: failed to
assign

TEST=Raptorlake-P

Change-Id: Ib169efe5a6b998a8342a895f1456a280669c719d
Signed-off-by: Stephen Douthit <stephend@silicom-usa.com>
Signed-off-by: Harrie Paijmans <hpaijmans@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34620
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-05-27 15:10:48 +00:00
Felix Zimmer
9d878fc6c0 soc/intel/xeon_sp: Add support for Emerald Rapids (5th Gen Xeon-SP) CPUs
TEST=build/boot ASRock SPC741D8-2L2T/BCM with Intel Xeon Silver 4514Y to
edk2 and Linux 6.12

Change-Id: Iefe3228dcf3626aa9a72d16a288751af47d526f6
Signed-off-by: Felix Zimmer <felix.zimmer@student.kit.edu>
Co-authored-by: Yussuf Khalil <yussuf.khalil@kit.edu>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87746
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2025-05-21 17:10:46 +00:00
Jeremy Soller
ba8407f0c1 soc/intel: Add Arrow Lake-H/U IDs
Add IDs from the EDS, with a couple extras:

- eSPI: EDS says 0x7202, but our boards show 0x7702
- GT: Value changes between 0x7d51 and 0x7dd1 based on DIMMs installed

Change-Id: I8430914edd02954cbb38592bff896733b01c735d
Ref: Intel Arrow Lake-H/U EDS, Volume 1 (#777369, rev 2.0)
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87131
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2025-05-13 23:14:11 +00:00
Patrick Rudolph
5bf88a44e9 drivers/smmstore: Support 64-bit MMIO addresses
Currently the SMMSTOREv2 only supports MMIO ROM below 4GiB. As the
space below 4GiB is typically limited on x86, add support for extended
MMIO ROM windows as found on recent hardware.

Allow the SMMSTOREv2 to be memory mapped above 4GiB by adding a new
field to the coreboot table called 'mmap_addr'. The users outside
of coreboot must check the size field of the coreboot struct to
determine if mmap_addr is supported. When it is it holds the
64-bit physical address to the MMIO ROM window.
The old 'mmap_addr' was renamed to 'mmap_addr_deprecated' to indicate
that it should not be used any more.

Change-Id: I1131cfa5cdbf92bbd33de3e5b22a305136eec9f7
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87114
Reviewed-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-05-08 22:28:16 +00:00
Subrata Banik
5f941893ef cpu/x86/mtrr: Introduce mtrrlib with common MTRR helper functions
This change refactors MTRR handling by consolidating helper functions
from `earlymtrr.c` and `mtrr.c` into a new MTRR library (`mtrrlib`).
This approach improves code modularity and reusability, making these
utilities consistently available across different coreboot boot phases.

The following functions are now part of `mtrrlib`:

- `get_free_var_mtrr`: Retrieves the index of the first available
  variable MTRR.
- `set_var_mtrr`: Configures the variable MTRR, specified by an `index`,
  for a memory region defined by `base`, `size`, and `type`.
- `clear_var_mtrr`: Disables the variable MTRR at a given index.
- `acquire_and_configure_mtrr`: Acquires a free variable MTRR, configures
   it with the given `base`, `size`, and `type`.

BUG=b:409718202
TEST=Built and booted google/fatcat successfully.

Change-Id: Iba332b7088221fd930e973fad9410833bff184b9
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87539
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2025-05-08 16:51:17 +00:00
Patrick Rudolph
a6be271e63 arch/x86: Unify GDT entries
Currently there are 3 GDTs (Global Descriptor Tables) being used on x86:
- preRAM (gdt_init.S)
- SMM (smm_stub.S)
- RAM (c_start.S)

They have different layouts and thus different offsets for the segments
being used in assembly code. Stop using different GDT segments and
ensure that for ROM (preRAM + SMM) and RAM (ramstage) the segments
match. RAM will have additional entries, not found in pre RAM GDT,
but the segments for protected mode and 64-bit mode now match in
all stages.

This allows to use the same defines in all stages. It also drops the
need to know in which stage the code is compiled and it's no longer
necessary to switch the code segment between stages.

While at it fix the comments in the ramstage GDT and drop unused
declarations from header files, always set the accessed bit and drop
GDT_CODE_ACPI_SEG.

Change-Id: I208496e6e4cc82833636f4f42503b44b0d702b9e
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87255
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-05-08 12:29:24 +00:00
Matt DeVillier
1166f9be0d include/console: Add CFR object for setting the logging level
Add a header with a CFR object for setting the coreboot console log
level, so that all mainboards can make use of it without duplication.

Change-Id: I473421e0e6b2031eb9846f5a798b427104dc3af3
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87487
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2025-05-02 13:59:14 +00:00
Appukuttan V K
fed584e100 soc/intel: Add Wildcat Lake CPU and PCIe device IDs
This patch adds Wildcat Lake-specific CPU and PCIe device IDs to the
header files and driver-specific code.

Reference:
Wildcat Lake Processor Prelim External Device IDs (820363)

BUG=b:394208231
TEST=Verified on Wildcat Lake Simulation Platform

Change-Id: I4bc7a8ea898ee30d565a95b9f85d6f19886bcffb
Signed-off-by: Appukuttan V K <appukuttan.vk@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87262
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-04-23 20:59:41 +00:00
Krystian Hebel
0cc0e6996c drivers/smmstore: allow full flash access for capsule updates
With DRIVERS_EFI_UPDATE_CAPSULES enabled and when at least one capsule
was found, SMMSTORE SMI handler can use commands with the highest
bit (0x80) set to access the whole flash instead of just the SMMSTORE
region. The rest of the interface is identical to regular SMMSTORE v2
except for a new call to control full flash access.

The added call saves information about the availability of capsules in
SMM memory. The call is ignored when run more than once, meaning there
should be no way of enabling full flash handling after it was disabled
and vice versa. The call should always be made by the firmware to lock
further calls, so that an OS could not gain full flash access. This is
done on entry to BS_POST_DEVICE after capsules are obtained in
BS_DEV_INIT.

Change-Id: I7f3dbfa965b9dcbade8b2f06a5bd2ac1345c7972
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83424
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-04-23 14:13:14 +00:00
Maximilian Brune
6f2a01f743 include/fmap.h: Require FMAP_SECTION_FLASH_START == 0
For simplicity we are going to impose this restriction to coreboot.
Note however that this is only a restriction for coreboot itself. The
FMAP tool itself is still a generic tool that does not require the FMAP
to start at offset 0.

Add an defacto empty fmap_config.h to our test cases, since fmap.h now
includes fmap_config.h.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Iba04ebdcd5557664a865d2854028dd811f052249
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86770
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub "Kuba" Czapiga <czapiga@google.com>
2025-04-18 14:56:59 +00:00
Maximilian Brune
aec4a9b2e5 Revert "src/cpu,soc/amd/common/block/cpu: Add preload_microcode"
This reverts commit 4b5a490b6f.

Reason for revert: This effort was apparently given up on since 4 years.
So remove the function, since it is not used at the moment. If someone
wants to bring that effort back to live, said person can feel free to do
so.

Change-Id: I26d5c9fbfd6eae24f876d857a6e952ca0d1a64ae
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87066
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-04-14 13:55:47 +00:00
Maximilian Brune
d696fa6987 Revert "acpi,Makefile: Add preload_acpi_dsdt"
This reverts commit 6b446b991b.

Reason for revert: This effort was apparently given up on since 4 years.
So remove the function, since it is not used at the moment. If someone
wants to bring that effort back to live, said person can feel free to do
so.

Change-Id: Ifa1ca58c8bf6aabb5b291d3244b1a1a0a7aec6c7
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87065
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-04-14 13:55:42 +00:00
Harrie Paijmans
2f28ec300e device/pci_ids: Add Raptor Lake P root port ID
Add Raptor Lake P specific PCIe root port ID.
Based on intel document 640552 rev 2.81.

BUG=NA
TEST=Customer platform with Raptorlake-P

Change-Id: Ifa7c131b5ae47294c055b9e68dad2764607c032b
Signed-off-by: Harrie Paijmans <hpaijmans@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87244
Reviewed-by: Erik van den Bogaert <ebogaert@eltan.com>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2025-04-14 13:54:31 +00:00