From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mx.groups.io with SMTP id smtpd.web12.25124.1649645239556488034 for ; Sun, 10 Apr 2022 19:47:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=g3TKutZK; spf=pass (domain: gmail.com, ip: 209.85.214.179, mailfrom: akihiko.odaki@gmail.com) Received: by mail-pl1-f179.google.com with SMTP id f10so12687687plr.6 for ; Sun, 10 Apr 2022 19:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SRda0HOzi7PulSTeEblyr4KosS/AKfAhtTEUFl9yfWA=; b=g3TKutZKaba979mq9TEj0ETtqTlB0uoSchLQ1VRmH4/W8vdyYzupPzXkuPh0Ya06TB QOiEeJOiJOHi+w9FNOsS3/0YOk8P6i5zAw/SPTN7yOMVd5kANQzo9rXhu6AF4FnwLmXk wXJPzcFke1T9pb/U7RilTTB/pYNHJFYIY+gGBOVUkgFLNLzRT3z+YYDfV+QeoLtzdP7b kPE+Z/UKNICTFqfEZFju/QNGjU/e9qmJcizBTAnaPh8z7K3BakMjTiA1kCVBJawJmKHO /hpO9JG++puaI7az3kgy7Ja0lq8GG67t0XtKz2v0ZYzADB62twiatQFyZ01roA+pdWNI M1XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SRda0HOzi7PulSTeEblyr4KosS/AKfAhtTEUFl9yfWA=; b=hdULnwgkIjO4eW7ZcseHTWbQSq/t6mAeffqX2P/ae1b/Hiqo8wCBPmQBlcgQldyYvn HC9y5LxVgne1x6+TCIquKjZsMv7eTrC9K3b+b/M94OtQSZ+GXRibxO8wkY9mC0XbL7s8 oBSug75H9J3tMQ80bI5ekywnKlmoJNLyHfjzvZ+oOhoZmPMRy61/uKJiDyo0ISo3qYMq SsOdQNGRKKIZYYloRJW6xQfg8vx/vbqBU68+pd21y/z8rECYW4988I5SwIeCJ4BQ/wNP 0ovG0Kl9KaqkhGvXlFvptVGLyK5DjBUhepZlWTfjRAbuS/SDug9SKNiI68nT9jzaeEE9 9guw== X-Gm-Message-State: AOAM5331DTaEoa48PWYmown03yqfSQdNYS0jwmbMQCp8VXA6cXr1g3Sw 6cC4XKEYrTVUmLzeYb0AErc872oLJok= X-Google-Smtp-Source: ABdhPJx3DNR+7cldOy4FoewMmmXg/+BEC80XxNqf+lrPRZODKm3NLaQGdrXdgcQOtVI1JPAdX1eHDg== X-Received: by 2002:a17:902:ccc6:b0:156:a94a:9db4 with SMTP id z6-20020a170902ccc600b00156a94a9db4mr29767705ple.45.1649645238545; Sun, 10 Apr 2022 19:47:18 -0700 (PDT) Return-Path: Received: from fedora.flets-east.jp ([2400:4050:c360:8200:8ae8:3c4:c0da:7419]) by smtp.gmail.com with ESMTPSA id s20-20020aa78d54000000b004fac74c83b3sm31982730pfe.186.2022.04.10.19.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Apr 2022 19:47:18 -0700 (PDT) From: "Akihiko Odaki" To: Cc: devel@edk2.groups.io, Guo Dong , Jian J Wang , Liming Gao , Dandan Bi , Michael D Kinney , Zhiguang Liu , Ray Ni , Maurice Ma , Benjamin You , Akihiko Odaki Subject: [PATCH v2 1/2] MdeModulePkg: Set EFI_MEMORY_RUNTIME with GCD Date: Mon, 11 Apr 2022 11:46:43 +0900 Message-Id: <20220411024644.9698-2-akihiko.odaki@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411024644.9698-1-akihiko.odaki@gmail.com> References: <20220411024644.9698-1-akihiko.odaki@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Signed-off-by: Akihiko Odaki --- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 9 +++++++++ MdePkg/Include/Pi/PiHob.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gc= d.c index 3763467bdb..623b316c61 100644 --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c @@ -2628,6 +2628,15 @@ CoreInitializeGcdServices ( ResourceHob->ResourceLength,=0D Capabilities=0D );=0D +=0D + if (!EFI_ERROR (Status) &&=0D + (ResourceHob->ResourceAttribute & EFI_RESOURCE_ATTRIBUTE_RUNTI= ME) =3D=3D EFI_RESOURCE_ATTRIBUTE_RUNTIME) {=0D + Status =3D CoreSetMemorySpaceAttributes(=0D + ResourceHob->PhysicalStart,=0D + ResourceHob->ResourceLength,=0D + EFI_MEMORY_RUNTIME=0D + );=0D + }=0D }=0D =0D if (GcdIoType !=3D EfiGcdIoTypeNonExistent) {=0D diff --git a/MdePkg/Include/Pi/PiHob.h b/MdePkg/Include/Pi/PiHob.h index e9f0ab4309..92bacbe62c 100644 --- a/MdePkg/Include/Pi/PiHob.h +++ b/MdePkg/Include/Pi/PiHob.h @@ -296,6 +296,8 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE; //=0D #define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE 0x02000000=0D =0D +#define EFI_RESOURCE_ATTRIBUTE_RUNTIME 0x04000000=0D +=0D ///=0D /// Describes the resource properties of all fixed,=0D /// nonrelocatable resource ranges found on the processor=0D --=20 2.35.1