From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) by mx.groups.io with SMTP id smtpd.web10.8930.1594209692090621164 for ; Wed, 08 Jul 2020 05:01:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@9elements.com header.s=google header.b=BQYv6VLt; spf=pass (domain: 9elements.com, ip: 209.85.208.65, mailfrom: marcello.bauer@9elements.com) Received: by mail-ed1-f65.google.com with SMTP id e15so41532566edr.2 for ; Wed, 08 Jul 2020 05:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lNkOx4vRQnb9DQJ2wpUAYjfDRE3zCPwBpnLdYsPe8tw=; b=BQYv6VLtfNX70xQxRARf/6uG83L9Mu6IIf/Gq7GicIAtNHCCdrf2QULnQZoEocxGfl vDYY/FvizFT3cggz9SpN3+CIdQ1+AnVeFLg1CdiAtbzdwSeN4xxMb/ZJAEc6f2JwXT/N qV0/ml3yCPijbSAwA6nwrK5IlFuq/QKnHxipxUv0JmkxTEeiRHywjJTUsYi3pWOXdFCS ByaphZdoMOVJux2UsrnmFhFQ5LwaJd6aSISDv/z8RbWFxm/SeRp+Sc/ZSXDhpK/PIWKF EKZFkklEg7qMjJ0tjqB1z3OparmSoHOsq/S6GOTtZVuwPw5LQS8ubugUFwzbp0dae6dT plCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lNkOx4vRQnb9DQJ2wpUAYjfDRE3zCPwBpnLdYsPe8tw=; b=a9QIjGBQRJ13G8Ug8/JhE26rbeH384tW+u7mqXASpzaQFZtLkg5FCVamc1bUWkvl2F JyBdl+sVFymra+2SE/mzY3eAUEvk+uaVX6tbVLchDPc+Dh3YGmJ0RaWCn+zXArAYsuoE Nc6VtZV3LJtQAjUVR0dvz+0Rs9X41chkEebdXdIN1ppkl6gnh3EEq/dQpl3iCHsO5VyY RHY0jusVIBc3vz6T0dQ5oteyQFM34tMhalA/F25mP9FUcNySQV3yn/8vDdyutA1Mdief rIIBstJoaXeoAUQxdxBuSNZU/Fg+jJ9ZQ/MOgol/24qngUEwyKDJ0tL8RtLYegSz/rsP 6bMw== X-Gm-Message-State: AOAM531JHbjCQP3Kw3X427HT2OJDgX7vOQ15SARzZMOWkytQ37A5RC2I ND0wuvwtChQmVMDhBw4/SqUiPOk64oE= X-Google-Smtp-Source: ABdhPJyxMyKAH64Yxb3ywjV0UL5ZnkXd3d4XpDYmddhYLxqM/CfGph6nJNbonr7GqZSK9AXWWuphaA== X-Received: by 2002:aa7:d3c8:: with SMTP id o8mr59659120edr.294.1594209690376; Wed, 08 Jul 2020 05:01:30 -0700 (PDT) Return-Path: Received: from T580.n1ce.space ([2a02:908:e851:d750:f4bd:62f0:31e4:a6a6]) by smtp.gmail.com with ESMTPSA id l6sm13459319edr.39.2020.07.08.05.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 05:01:29 -0700 (PDT) From: "Marcello Sylvester Bauer" To: devel@edk2.groups.io Cc: Maurice Ma , Nate DeSimone , Star Zeng Subject: [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables Date: Wed, 8 Jul 2020 14:01:25 +0200 Message-Id: <20200708120125.24344-2-marcello.bauer@9elements.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200708120125.24344-1-marcello.bauer@9elements.com> References: <20200708120125.24344-1-marcello.bauer@9elements.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Patrick Rudolph Signed-off-by: Patrick Rudolph Signed-off-by: Marcello Sylvester Bauer Cc: Maurice Ma Cc: Nate DeSimone Cc: Star Zeng --- UefiPayloadPkg/BlSupportPei/BlSupportPei.c | 26 ++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c b/UefiPayloadPkg/Bl= SupportPei/BlSupportPei.c index 22972453117a..b3ff065a537e 100644 --- a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c +++ b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c @@ -390,24 +390,36 @@ BlPeiEntryPoint ( EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;=0D EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;=0D =0D -=0D - //=0D - // Report lower 640KB of RAM. Attribute EFI_RESOURCE_ATTRIBUTE_TESTED=0D - // is intentionally omitted to prevent erasing of the coreboot header=0D - // record before it is processed by ParseMemoryInfo.=0D + // Report lower 640KB of RAM.=0D + // Mark memory as reserved to keep coreboot header in place.=0D //=0D BuildResourceDescriptorHob (=0D - EFI_RESOURCE_SYSTEM_MEMORY,=0D + EFI_RESOURCE_MEMORY_RESERVED,=0D (=0D EFI_RESOURCE_ATTRIBUTE_PRESENT |=0D EFI_RESOURCE_ATTRIBUTE_INITIALIZED |=0D + EFI_RESOURCE_ATTRIBUTE_TESTED |=0D EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |=0D EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |=0D EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |=0D EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE=0D ),=0D (EFI_PHYSICAL_ADDRESS)(0),=0D - (UINT64)(0xA0000)=0D + (UINT64)(0x1000)=0D + );=0D +=0D + BuildResourceDescriptorHob (=0D + EFI_RESOURCE_SYSTEM_MEMORY,=0D + (=0D + EFI_RESOURCE_ATTRIBUTE_PRESENT |=0D + EFI_RESOURCE_ATTRIBUTE_INITIALIZED |=0D + EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |=0D + EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |=0D + EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |=0D + EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE=0D + ),=0D + (EFI_PHYSICAL_ADDRESS)(0x1000),=0D + (UINT64)(0x9F000)=0D );=0D =0D BuildResourceDescriptorHob (=0D --=20 2.27.0