From: "Jeremy Linton" <jeremy.linton@arm.com>
To: devel@edk2.groups.io
Cc: ardb+tianocore@kernel.org, quic_llindhol@quicinc.com,
Jeremy Linton <jeremy.linton@arm.com>
Subject: [edk2-devel] [RFC 5/6] Platform/RasberryPi: Add I2C1 to uefi runtime memory map
Date: Wed, 10 Jan 2024 18:04:25 -0600 [thread overview]
Message-ID: <20240111000426.2735007-6-jeremy.linton@arm.com> (raw)
In-Reply-To: <20240111000426.2735007-1-jeremy.linton@arm.com>
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 <jeremy.linton@arm.com>
---
Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c b/Platform/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 (
}
if (mModelFamily == 4) {
+ // add memoryspaces for the runtime flash/variable store
Status = gDS->AddMemorySpace (EfiGcdMemoryTypeMemoryMappedIo, BCM2836_SPI0_BASE_ADDRESS,
SIZE_4KB, EFI_MEMORY_UC | EFI_MEMORY_RUNTIME);
ASSERT_EFI_ERROR (Status);
@@ -517,6 +518,13 @@ ApplyVariables (
Status = gDS->SetMemorySpaceAttributes (GPIO_BASE_ADDRESS,
SIZE_4KB, EFI_MEMORY_UC|EFI_MEMORY_RUNTIME);
+ // add memoryspace for the runtime rtc/i2c
+ Status = gDS->AddMemorySpace (EfiGcdMemoryTypeMemoryMappedIo, BCM2836_I2C1_BASE_ADDRESS,
+ SIZE_4KB, EFI_MEMORY_UC | EFI_MEMORY_RUNTIME);
+ ASSERT_EFI_ERROR (Status);
+ Status = gDS->SetMemorySpaceAttributes (BCM2836_I2C1_BASE_ADDRESS,
+ SIZE_4KB, EFI_MEMORY_UC|EFI_MEMORY_RUNTIME);
+
ASSERT_EFI_ERROR (Status);
}
--
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]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-01-11 0:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 0:04 [edk2-devel] [RFC 0/6] RasberryPi: RTC HAT support Jeremy Linton
2024-01-11 0:04 ` [edk2-devel] [RFC 1/6] Silicon/Bcm283x: Document the I2C registers Jeremy Linton
2024-01-11 0:04 ` [edk2-devel] [RFC 2/6] Silicon/Bcm283x: Add core I2C drivers Jeremy Linton
2024-01-11 0:04 ` [edk2-devel] [RFC 3/6] Platform/RasberryPi: Create I2C driver bound to RTC Jeremy Linton
2024-01-11 0:04 ` [edk2-devel] [RFC 4/6] Silicon/Maxim: Fix runtime issues Jeremy Linton
2024-01-11 0:04 ` Jeremy Linton [this message]
2024-01-11 0:04 ` [edk2-devel] [RFC 6/6] Platform/RaspberryPi: Add menu and build options for HW RTC Jeremy Linton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240111000426.2735007-6-jeremy.linton@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox