From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 3E900D8108C for ; Thu, 11 Jan 2024 00:04:34 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=pB6/3pP3q8+8wdIiF78bbZCdnuZjqt0ETmS6xjJ7WxA=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1704931472; v=1; b=hQNeyYfnT2zs6Ptkt7Ic8xCO6stmJadppkcrjBFYBMue+SVSUdF+JuVK1mZcxOiain7Jq4bo 4Fpz7deDpSGs6dKYqoCpCeYF5mJ5LmXPdCgMhO0+lXftkQvRm3DGt4RYL0A4Hw0NgBL6LUlKhMp IjZKM/Ro+QTW1KvxahjZGx3E= X-Received: by 127.0.0.2 with SMTP id pmAfYY7687511xgc1QvHylGU; Wed, 10 Jan 2024 16:04:32 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.9368.1704931469364233539 for ; Wed, 10 Jan 2024 16:04:29 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 759EE1570; Wed, 10 Jan 2024 16:05:15 -0800 (PST) X-Received: from u200865.usa.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 608EB3F5A1; Wed, 10 Jan 2024 16:04:29 -0800 (PST) From: "Jeremy Linton" To: devel@edk2.groups.io Cc: ardb+tianocore@kernel.org, quic_llindhol@quicinc.com, Jeremy Linton Subject: [edk2-devel] [RFC 5/6] Platform/RasberryPi: Add I2C1 to uefi runtime memory map Date: Wed, 10 Jan 2024 18:04:25 -0600 Message-ID: <20240111000426.2735007-6-jeremy.linton@arm.com> In-Reply-To: <20240111000426.2735007-1-jeremy.linton@arm.com> References: <20240111000426.2735007-1-jeremy.linton@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jeremy.linton@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: fXLL3JzsA6IEnP5Xjj8fMHltx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=hQNeyYfn; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none) We intend to allow the OS to update the RTC after exit boot services. THis means we need to assure that the I2C IO map is marked correctly. Signed-off-by: Jeremy Linton --- Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c b/Platfor= m/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c index 377ef438ff..fec8f63ea8 100644 --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c @@ -505,6 +505,7 @@ ApplyVariables ( } =20 if (mModelFamily =3D=3D 4) { + // add memoryspaces for the runtime flash/variable store Status =3D gDS->AddMemorySpace (EfiGcdMemoryTypeMemoryMappedIo, BCM2= 836_SPI0_BASE_ADDRESS, SIZE_4KB, EFI_MEMORY_UC | EFI_MEMORY_R= UNTIME); ASSERT_EFI_ERROR (Status); @@ -517,6 +518,13 @@ ApplyVariables ( Status =3D gDS->SetMemorySpaceAttributes (GPIO_BASE_ADDRESS, SIZE_4KB, EFI_MEMORY_UC|EFI_= MEMORY_RUNTIME); =20 + // add memoryspace for the runtime rtc/i2c + Status =3D gDS->AddMemorySpace (EfiGcdMemoryTypeMemoryMappedIo, BCM2= 836_I2C1_BASE_ADDRESS, + SIZE_4KB, EFI_MEMORY_UC | EFI_MEMORY_R= UNTIME); + ASSERT_EFI_ERROR (Status); + Status =3D gDS->SetMemorySpaceAttributes (BCM2836_I2C1_BASE_ADDRESS, + SIZE_4KB, EFI_MEMORY_UC|EFI_= MEMORY_RUNTIME); + ASSERT_EFI_ERROR (Status); } =20 --=20 2.43.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113562): https://edk2.groups.io/g/devel/message/113562 Mute This Topic: https://groups.io/mt/103653101/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-