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 pang15 to special Pang EC type #118

Merged
merged 1 commit into from
Nov 18, 2024
Merged
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
7 changes: 4 additions & 3 deletions src/app/ec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub enum EcKind {

impl EcKind {
pub unsafe fn new(primary: bool) -> Self {
// Special case for pang12, pang13, and pang14
// Special case for pang12, pang13, pang14, and pang15
{
let mut system_version = String::new();

Expand All @@ -76,7 +76,8 @@ impl EcKind {
}
}

if system_version == "pang12" || system_version == "pang13" || system_version == "pang14" {
if system_version == "pang12" || system_version == "pang13" || system_version == "pang14" ||
system_version == "pang15" {
return EcKind::Pang(
ectool::Pmc::new(0x62, UefiTimeout::new(100_000)),
system_version
Expand Down Expand Up @@ -225,7 +226,7 @@ impl EcComponent {
}

pub fn validate_data(&self, data: Vec<u8>) -> bool {
// Special case for pang12, pang13, and pang14
// Special case for pang12, pang13, pang14, and pang15
match &self.ec {
EcKind::Pang(_pmc, _system_version) => {
// XXX: Get flash size programatically?
Expand Down