Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Purley silicon Ignition firmware image + ME FPT parsing test #445

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions data/PurleySiliconBinPkg/MeFirmware/IgnitionFirmware/License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Copyright (c) 2019 Intel Corporation.
All rights reserved.

Redistribution.

Redistribution and use in binary form, without modification, are permitted,
provided that the following conditions are met:

1. Redistributions must reproduce the above copyright notice and the
following disclaimer in the documentation and/or other materials provided
with the distribution.

2. Neither the name of Intel Corporation nor the names of its suppliers may
be used to endorse or promote products derived from this software without
specific prior written permission.

3. No reverse engineering, decompilation, or disassembly of this software
is permitted.


"Binary form" includes any format that is commonly used for electronic
conveyance that is a reversible, bit-exact translation of binary
representation to ASCII or ISO text, for example "uuencode".

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
GCC RUNTIME LIBRARY EXCEPTION

Version 3.1, 31 March 2009

Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

This GCC Runtime Library Exception ("Exception") is an additional
permission under section 7 of the GNU General Public License, version
3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
bears a notice placed by the copyright holder of the file stating that
the file is governed by GPLv3 along with this Exception.

When you use GCC to compile a program, GCC may combine portions of
certain GCC header files and runtime libraries with the compiled
program. The purpose of this Exception is to allow compilation of
non-GPL (including proprietary) programs to use, in this way, the
header files and runtime libraries covered by this Exception.

0. Definitions.

A file is an "Independent Module" if it either requires the Runtime
Library for execution after a Compilation Process, or makes use of an
interface provided by the Runtime Library, but is not otherwise based
on the Runtime Library.

"GCC" means a version of the GNU Compiler Collection, with or without
modifications, governed by version 3 (or a specified later version) of
the GNU General Public License (GPL) with the option of using any
subsequent versions published by the FSF.

"GPL-compatible Software" is software whose conditions of propagation,
modification and use would permit combination with GCC in accord with
the license of GCC.

"Target Code" refers to output from any compiler for a real or virtual
target processor architecture, in executable form or suitable for
input to an assembler, loader, linker and/or execution
phase. Notwithstanding that, Target Code does not include data in any
format that is used as a compiler intermediate representation, or used
for producing a compiler intermediate representation.

The "Compilation Process" transforms code entirely represented in
non-intermediate languages designed for human-written code, and/or in
Java Virtual Machine byte code, into Target Code. Thus, for example,
use of source code generators and preprocessors need not be considered
part of the Compilation Process, since the Compilation Process can be
understood as starting with the output of the generators or
preprocessors.

A Compilation Process is "Eligible" if it is done using GCC, alone or
with other GPL-compatible software, or if it is done without using any
work based on GCC. For example, using non-GPL-compatible Software to
optimize any GCC intermediate representations would not qualify as an
Eligible Compilation Process.

1. Grant of Additional Permission.

You have permission to propagate a work of Target Code formed by
combining the Runtime Library with Independent Modules, even if such
propagation would otherwise violate the terms of GPLv3, provided that
all Target Code was generated by Eligible Compilation Processes. You
may then convey such a combination under terms of your choice,
consistent with the licensing of the Independent Modules.

2. No Weakening of GCC Copyleft.

The availability of this Exception does not imply any general
presumption that third-party software is unaffected by the copyleft
requirements of the license of GCC.

15 changes: 15 additions & 0 deletions data/PurleySiliconBinPkg/MeFirmware/IgnitionFirmware/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Ignition ME firmware
Copyright &copy; 2019, Intel Corporation. All rights reserved.

## Overview
Ignition Firmware is a variant of ME firmware that is intended to provide lightweight chipset initialization. It does not contain all the features of the Intel&reg; Server Platform Services (SPS) ME firmware. Ignition Firmware is consequently much smaller than Intel&reg; SPS Firmware (~0.5 MB vs. ~3 MB). Both Intel&reg; SPS Firmware and Ignition Firmware are specifically designed for server platforms with Intel&reg; Xeon&reg; Processors and are different than the ME firmware found on client platforms. These binaries cannot be used on 1 socket High End Desktop (HEDT) platforms like Glacier Falls or Basin Falls. Glacier Falls and Basin Falls platforms use client ME firmware images.

## Package Contents

Ignition ME firmware is provided in the file:
- MeRegion.bin - ME Firmware Image

## License Information
This release package contains the following license files:
- License.txt - The primary license is provided in the main directory.
- Other_Licenses - Third-party licenses are provided in the Other_Licenses directory.
5 changes: 5 additions & 0 deletions data/PurleySiliconBinPkg/MeFirmware/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Cascade Lake Management Engine Firmware
These ME binaries are intended to be used with 2nd Generation Intel&reg; Xeon&reg; Scalable Processors and chipsets formerly known as Cascade Lake.

## Ignition Firmware Overview
Ignition Firmware is a variant of ME firmware that is intended to provide lightweight chipset initialization. It does not contain all the features of the Intel&reg; Server Platform Services (SPS) ME firmware. Ignition Firmware is consequently much smaller than Intel&reg; SPS Firmware (~0.5 MB vs. ~3 MB). Both Intel&reg; SPS Firmware and Ignition Firmware are specifically designed for server platforms with Intel&reg; Xeon&reg; Processors and are different than the ME firmware found on client platforms. These binaries cannot be used on 1 socket High End Desktop (HEDT) platforms like Glacier Falls or Basin Falls. Glacier Falls and Basin Falls platforms use client ME firmware images.
24 changes: 24 additions & 0 deletions pkg/uefi/meregion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package uefi

import (
"os"
"reflect"
"testing"
)
Expand Down Expand Up @@ -91,3 +92,26 @@ func TestFindFPTSignature(t *testing.T) {
})
}
}

func TestParseFPT(t *testing.T) {
t.Run("parse ME FPT", func(t *testing.T) {
orangecms marked this conversation as resolved.
Show resolved Hide resolved
fixtureFile := "../../data/PurleySiliconBinPkg/MeFirmware/IgnitionFirmware/MeRegion.bin"
meRegion, err := os.ReadFile(fixtureFile)
if err != nil {
t.Fatalf("could not read test fixture %q", fixtureFile)
}
expectedEntries := 10

fpt, err := NewMEFPT(meRegion)
if err != nil {
t.Fatalf("reading ME FPT: got %v, want nil", err)
}
entries := len(fpt.Entries)
if entries != expectedEntries {
t.Errorf("len(fpt.Entries): got %d, want %d", entries, expectedEntries)
}
if entries != int(fpt.PartitionCount) {
t.Errorf("fpt.PartitionCount: got %d, want %d (matching number of entries)", fpt.PartitionCount, entries)
}
})
}