v5: - removed vms flag, added fdt (Andrew Jones)
- added patch3 to combine secure and non secure pl061. It has to be
more easy to review if this changes are in the separate patch.
v4: rework patches accodring to Peter Maydells comments:
- split patches on gpio-pwr driver and arm-virt integration.
- start secure gpio only from virt-6.0.
- rework qemu interface for gpio-pwr to use 2 named gpio.
- put secure gpio to secure name space.
v3: added missed include qemu/log.h for qemu_log(..
v2: replace printf with qemu_log (Philippe Mathieu-Daudé)
This patch works together with ATF patch:
https://github.com/muvarov/arm-trusted-firmware/commit/dd4401d8eb8e0f3018b3…
Previus discussion for reboot issue was here:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg757705.html
Maxim Uvarov (3):
hw: gpio: implement gpio-pwr driver for qemu reset/poweroff
arm-virt: add secure pl061 for reset/power down
arm-virt: combine code for secure and non secure pl061
hw/arm/Kconfig | 1 +
hw/arm/virt.c | 118 +++++++++++++++++++++++++++++++++++-------
hw/gpio/Kconfig | 3 ++
hw/gpio/gpio_pwr.c | 70 +++++++++++++++++++++++++
hw/gpio/meson.build | 1 +
include/hw/arm/virt.h | 2 +
6 files changed, 175 insertions(+), 20 deletions(-)
create mode 100644 hw/gpio/gpio_pwr.c
--
2.17.1
Hi,
Please find the latest report on new defect(s) introduced to ARM-software/arm-trusted-firmware found with Coverity Scan.
1 new defect(s) introduced to ARM-software/arm-trusted-firmware found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 365287: Control flow issues (MISSING_BREAK)
/plat/xilinx/zynqmp/pm_service/pm_svc_main.c: 334 in pm_smc_handler()
________________________________________________________________________________________________________
*** CID 365287: Control flow issues (MISSING_BREAK)
/plat/xilinx/zynqmp/pm_service/pm_svc_main.c: 334 in pm_smc_handler()
328 SMC_RET1(handle, (uint64_t)ret);
329
330 case PM_SET_MAX_LATENCY:
331 ret = pm_set_max_latency(pm_arg[0], pm_arg[1]);
332 SMC_RET1(handle, (uint64_t)ret);
333
>>> CID 365287: Control flow issues (MISSING_BREAK)
>>> The case for value "PM_GET_API_VERSION" is not terminated by a 'break' statement.
334 case PM_GET_API_VERSION:
335 /* Check is PM API version already verified */
336 if (pm_ctx.api_version >= PM_VERSION) {
337 if (!ipi_irq_flag) {
338 /*
339 * Enable IPI IRQ
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P…
Hi
To understand the interrupt handling in TF-A, i recommend you go through https://trustedfirmware-a.readthedocs.io/en/latest/design/interrupt-framewo…
To debug your problem, you need to first check if the timer interrupt is generated as FIQ and check whether it indeed is trapped in EL3 (checking SCR_EL3.FIQ=1).
Regarding build errors while adding .S files and your assembly implementation, it will be better if you share your code (may be pushing a patch on https://review.trustedfirmware.org).
Thanks
Manish
________________________________
From: TF-A <tf-a-bounces(a)lists.trustedfirmware.org> on behalf of Ian Burres via TF-A <tf-a(a)lists.trustedfirmware.org>
Sent: 06 January 2021 17:56
To: tf-a(a)lists.trustedfirmware.org <tf-a(a)lists.trustedfirmware.org>
Subject: [TF-A] Routing FIQ timer interrupts to EL3 on Raspberry Pi 4B
I am attempting to route FIQ timer interrupts using the ARM timers (not system timers) to EL3 in order to achieve introspection. I am running TF-A (cross compiled for AArch64/AArch32) on a Raspberry Pi 4B, which uses the Broadcom 2711 chipset. I have written some code, but I am not an embedded software engineer – I’m an IoT pentester. The ARM timers look like this:
RPI4_ARM_TIMER_LOAD 0x400
RPI4_ARM_TIMER_VALUE 0x404
…..
RPI4_ARM_TIMER_FREE_COUNTER 0x420
System timers are:
RPI4_SYS_TIMER_CLO, RPI4_SYS_TIMER_CS, etc…
I have successfully implement a Linux driver that allows me to dump kernel page tables and memory; however, I cannot see user page tables (even after running a CPU intensive program ). I believe the only way to view user page tables is to have interrupts routed to EL3 – a Linux driver is not sufficient. I have 3 UARTs attached with a debug log and screen setup. From what I have read, the Raspberry Pi 4B uses GICv2. TF-A supports EL3 routing when the build option GICV2_GO_FOR_EL3 is enabled, which I have done.
>From what I have gathered, the FIQ interrupt has to be written in assembly. So far, I have created a vector table, loaded the vector table, and masked and unmasked interrupts using daifclr, #3 and daifset, #3 instructions, using inline assembly. The timer is initinitialized and handled using C functions. I am using inline assembly, because I am adding code to the TF-A base, and I have not discovered how to add .S files to the build without receiving make errors. I will gladly share the code I have if it helps, but what I am really looking for is if anyone believes I am on the right track or not. Obviously, I am not implementing something correctly since the interrupt is not being handled. Thanks.
Thomas
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
I am attempting to route FIQ timer interrupts using the ARM timers (not system timers) to EL3 in order to achieve introspection. I am running TF-A (cross compiled for AArch64/AArch32) on a Raspberry Pi 4B, which uses the Broadcom 2711 chipset. I have written some code, but I am not an embedded software engineer – I’m an IoT pentester. The ARM timers look like this:
RPI4_ARM_TIMER_LOAD 0x400
RPI4_ARM_TIMER_VALUE 0x404
…..
RPI4_ARM_TIMER_FREE_COUNTER 0x420
System timers are:
RPI4_SYS_TIMER_CLO, RPI4_SYS_TIMER_CS, etc…
I have successfully implement a Linux driver that allows me to dump kernel page tables and memory; however, I cannot see user page tables (even after running a CPU intensive program ). I believe the only way to view user page tables is to have interrupts routed to EL3 – a Linux driver is not sufficient. I have 3 UARTs attached with a debug log and screen setup. >From what I have read, the Raspberry Pi 4B uses GICv2. TF-A supports EL3 routing when the build option GICV2_GO_FOR_EL3 is enabled, which I have done.
>From what I have gathered, the FIQ interrupt has to be written in assembly. So far, I have created a vector table, loaded the vector table, and masked and unmasked interrupts using daifclr, #3 and daifset, #3 instructions, using inline assembly. The timer is initinitialized and handled using C functions. I am using inline assembly, because I am adding code to the TF-A base, and I have not discovered how to add .S files to the build without receiving make errors. I will gladly share the code I have if it helps, but what I am really looking for is if anyone believes I am on the right track or not. Obviously, I am not implementing something correctly since the interrupt is not being handled. Thanks.
Thomas
Sent from Mail for Windows 10
Hi Carlo
Alexei created a patch for testing TF-A/TFTF builds with the toolchain GCC 10.2-2020.11
https://review.trustedfirmware.org/c/ci/tf-a-ci-scripts/+/7733
which flagged build errors for plat/amlogic/axg platform, please see below:
Build command lines:
make CROSS_COMPILE=aarch64-none-elf- PLAT=axg SPD=opteed DEBUG=1 V=1 fiptool all
make AML_USE_ATOS=1 CROSS_COMPILE=aarch64-none-elf- PLAT=axg DEBUG=1 V=1 fiptool all
plat/amlogic/axg/axg_pm.c: In function 'axg_pwr_domain_off':
plat/amlogic/axg/axg_pm.c:124:43: error: array subscript 2 is above array bounds of 'const plat_local_state_t[2]' {aka 'const unsigned char[2]'} [-Werror=array-bounds]
124 | if (target_state->pwr_domain_state[MPIDR_AFFLVL2] ==
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from plat/amlogic/axg/axg_pm.c:14:
include/lib/psci/psci.h:270:28: note: while referencing 'pwr_domain_state'
270 | plat_local_state_t pwr_domain_state[PLAT_MAX_PWR_LVL + U(1)];
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:1103: recipe for target '/work/workspace/workspace/tf-worker/trusted_firmware/build/axg/debug/bl31/axg_pm.o' failed
make: *** [/work/workspace/workspace/tf-worker/trusted_firmware/build/axg/debug/bl31/axg_pm.o] Error 1
Please help to resolve this issue.
Thanks
Manish Badarkhe
Hi Feng,
On Fri, Dec 18, 2020 at 04:41:37PM +0000, Chen Feng via TF-A wrote:
> Hi,
>
> While reading the Arm Firmware Framework for Armv8-A
> https://developer.arm.com/documentation/den0077/latest
>
> I do not find the API that for a sp to request vIRQ, or do I miss something.
>
> Is this some private API that is implementing defined FF-A IDs?
Is what you have in mind is an ABI that allows SP0 to raise an interrupt in SP1?
Could you please provide more information about your use case?
cheers,
Achin
>
>
> --
> cheers,
> feng
>
> --
> TF-A mailing list
> TF-A(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-a
Hi all,
I have a similar but different question here :)
Why not the tf-a support both smpd and tspd.
Since the vendor's teeos that has not support ff-a interface currently.
With armv8.4-sel2, is there a choice to disable scr.eel2 with origin
vendor's theeos IDs, and enable scr.eel2 with new ff-a services?
It seems to need some tlb maintenance, but it seems work.
On 2020/11/23 3:27 下午, Achin Gupta via TF-A wrote:
> Hi Heyi,
>
> Happy to discuss the detail but the short answer is no.
>
> Instead, it is possible to run an MM partition in S-EL0 under the TEE. This work is being done with OP-TEE.
>
> From a SW architecture standpoint, it did not seem like a good idea to let EL3 run its "application" i.e. MM SP alongside a TEE which also runs its own applications. It is better to let the TEE own S-EL1 and run all applications in S-EL0 under it.
>
> Cheers,
> Achin
>
> On 23/11/2020, 05:36, "TF-A on behalf of Heyi Guo via TF-A" <tf-a-bounces(a)lists.trustedfirmware.org on behalf of tf-a(a)lists.trustedfirmware.org> wrote:
>
> Hi All,
>
> On some platforms there may be requirements to run both TEE and SPM_MM
> instances, such as providing TEE services on server platforms.
>
> Do TF-A support this scenario? If it doesn't, do it make sense to add
> such support?
>
> Thanks,
>
> Heyi
>
> --
> TF-A mailing list
> TF-A(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-a
>
--
cheers,
feng
Hi,
While reading the Arm Firmware Framework for Armv8-A
https://developer.arm.com/documentation/den0077/latest
I do not find the API that for a sp to request vIRQ, or do I miss something.
Is this some private API that is implementing defined FF-A IDs?
--
cheers,
feng
Hi All,
The next TF-A Tech Forum is scheduled for Thu 17th December 2020 16:00 – 17:00 (GMT).
As well as being posted to the TF-A mailing list this has been cross posted to OPTEE mailing list. For OPTEE attendees the Zoom call details are included below.
Agenda:
* An introduction to the Trusted Services project
* Presented by Julian Hall
* Summary
* The Trusted Services project is a new trustedfirmware.org project that provides a home for security related service components that can run in the different isolated processing environments available on Arm Cortex-A. The project attempts to promote reuse and standardization to enable a consistent set of services to be provided by firmware, independent of which isolation technology is used.
If TF-A contributors have anything they wish to present at any future TF-A tech forum please contact me to have that scheduled.
Previous sessions, both recording and presentation material can be found on the trustedfirmware.org TF-A Technical meeting webpage: https://www.trustedfirmware.org/meetings/tf-a-technical-forum/
A scheduling tracking page is also available to help track sessions suggested and being prepared: https://developer.trustedfirmware.org/w/tf_a/tf-a-tech-forum-scheduling/ Final decisions on what will be presented will be shared a few days before the next meeting and shared on the TF-A mailing list.
This is the last TF-A Tech Forum session until January 2021.
Join Zoom Meeting
https://zoom.us/j/9159704974<https://www.google.com/url?q=https%3A%2F%2Fzoom.us%2Fj%2F9159704974&sa=D&us…>
Meeting ID: 915 970 4974
One tap mobile
+16465588656,,9159704974# US (New York)
+16699009128,,9159704974# US (San Jose)
Dial by your location
+1 646 558 8656 US (New York)
+1 669 900 9128 US (San Jose)
877 853 5247 US Toll-free
888 788 0099 US Toll-free
Meeting ID: 915 970 4974
Find your local number: https://zoom.us/u/ad27hc6t7h<https://www.google.com/url?q=https%3A%2F%2Fzoom.us%2Fu%2Fad27hc6t7h&sa=D&us…>
Thanks
Joanna
Hello Masato Fukumori,
To check a "validity period" of a X 509 certificate,
you must be sure that your system date & time is set, correct and not changed.
Do you have a reliable way to achieve this?
Best regards,
Andrej Butok
From: TF-A <tf-a-bounces(a)lists.trustedfirmware.org> On Behalf Of fukumori.masato--- via TF-A
Sent: Thursday, December 10, 2020 2:23 PM
To: 'tf-a(a)lists.trustedfirmware.org' <tf-a(a)lists.trustedfirmware.org>
Subject: [TF-A] Question about validity period of X509 certificate
Hello.
I have a question about checking the X 509 certificate with tf-a.
My understanding is that tf-a does not check the "validity period" of the X 509 certificate.
I 'm not sure why tf-a doesn't check. Does anyone know this background?
Best Regards,
Masato Fukumori
Hello.
I have a question about checking the X 509 certificate with tf-a.
My understanding is that tf-a does not check the "validity period" of the X 509 certificate.
I 'm not sure why tf-a doesn't check. Does anyone know this background?
Best Regards,
Masato Fukumori
This event has been cancelled.
Title: TF-A Tech Forum
We run an open technical forum call for anyone to participate and it is not
restricted to Trusted Firmware project members. It will operate under the
guidance of the TF TSC. Feel free to forward this invite to
colleagues. Invites are via the TF-A mailing list and also published on the
Trusted Firmware website. Details are
here: https://www.trustedfirmware.org/meetings/tf-a-technical-forum/Tr…
Firmware is inviting you to a scheduled Zoom meeting.Join Zoom
Meetinghttps://zoom.us/j/9159704974Meeting ID: 915 970 4974One tap
mobile+16465588656,,9159704974# US (New York)+16699009128,,9159704974# US
(San Jose)Dial by your location +1 646 558
8656 US (New York) +1 669 900
9128 US (San Jose) 877 853 5247 US
Toll-free 888 788 0099 US Toll-freeMeeting ID:
915 970 4974Find your local
number: https://zoom.us/u/ad27hc6t7h
When: Thu 31 Dec 2020 16:00 – 17:00 United Kingdom Time
Calendar: tf-a(a)lists.trustedfirmware.org
Who:
* Bill Fletcher- creator
* marek.bykowski(a)gmail.com
* okash.khawaja(a)gmail.com
* tf-a(a)lists.trustedfirmware.org
Invitation from Google Calendar: https://calendar.google.com/calendar/
You are receiving this courtesy email at the account
tf-a(a)lists.trustedfirmware.org because you are an attendee of this event.
To stop receiving future updates for this event, decline this event.
Alternatively, you can sign up for a Google Account at
https://calendar.google.com/calendar/ and control your notification
settings for your entire calendar.
Forwarding this invitation could allow any recipient to send a response to
the organiser and be added to the guest list, invite others regardless of
their own invitation status or to modify your RSVP. Learn more at
https://support.google.com/calendar/answer/37135#forwarding
This event has been cancelled.
Title: TF-A Tech Forum
We run an open technical forum call for anyone to participate and it is not
restricted to Trusted Firmware project members. It will operate under the
guidance of the TF TSC. Feel free to forward this invite to
colleagues. Invites are via the TF-A mailing list and also published on the
Trusted Firmware website. Details are
here: https://www.trustedfirmware.org/meetings/tf-a-technical-forum/Tr…
Firmware is inviting you to a scheduled Zoom meeting.Join Zoom
Meetinghttps://zoom.us/j/9159704974Meeting ID: 915 970 4974One tap
mobile+16465588656,,9159704974# US (New York)+16699009128,,9159704974# US
(San Jose)Dial by your location +1 646 558
8656 US (New York) +1 669 900
9128 US (San Jose) 877 853 5247 US
Toll-free 888 788 0099 US Toll-freeMeeting ID:
915 970 4974Find your local
number: https://zoom.us/u/ad27hc6t7h
When: Thu 3 Dec 2020 16:00 – 17:00 United Kingdom Time
Calendar: tf-a(a)lists.trustedfirmware.org
Who:
* Bill Fletcher- creator
* marek.bykowski(a)gmail.com
* okash.khawaja(a)gmail.com
* tf-a(a)lists.trustedfirmware.org
Invitation from Google Calendar: https://calendar.google.com/calendar/
You are receiving this courtesy email at the account
tf-a(a)lists.trustedfirmware.org because you are an attendee of this event.
To stop receiving future updates for this event, decline this event.
Alternatively, you can sign up for a Google Account at
https://calendar.google.com/calendar/ and control your notification
settings for your entire calendar.
Forwarding this invitation could allow any recipient to send a response to
the organiser and be added to the guest list, invite others regardless of
their own invitation status or to modify your RSVP. Learn more at
https://support.google.com/calendar/answer/37135#forwarding
Hi Heyi,
Happy to discuss the detail but the short answer is no.
Instead, it is possible to run an MM partition in S-EL0 under the TEE. This work is being done with OP-TEE.
From a SW architecture standpoint, it did not seem like a good idea to let EL3 run its "application" i.e. MM SP alongside a TEE which also runs its own applications. It is better to let the TEE own S-EL1 and run all applications in S-EL0 under it.
Cheers,
Achin
On 23/11/2020, 05:36, "TF-A on behalf of Heyi Guo via TF-A" <tf-a-bounces(a)lists.trustedfirmware.org on behalf of tf-a(a)lists.trustedfirmware.org> wrote:
Hi All,
On some platforms there may be requirements to run both TEE and SPM_MM
instances, such as providing TEE services on server platforms.
Do TF-A support this scenario? If it doesn't, do it make sense to add
such support?
Thanks,
Heyi
--
TF-A mailing list
TF-A(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-a
Hi All,
On some platforms there may be requirements to run both TEE and SPM_MM
instances, such as providing TEE services on server platforms.
Do TF-A support this scenario? If it doesn't, do it make sense to add
such support?
Thanks,
Heyi
Hi All,
The next TF-A Tech Forum is scheduled for Thu 19th November 2020 16:00 – 17:00 (GMT).
Please note UK entered Daylight Saving on 25th October when clocks went back one hour to go to GMT from BST.
A reoccurring meeting invite has been sent out to the subscribers of this TF-A mailing list. If you don’t have this please let me know.
Agenda:
* Trace-based Code Coverage Tooling for Firmware Projects
* Presented by Basil Eljuse & Saul Romero
* Summary
* TF-A has adopted a code coverage system to measure the effectiveness of the various runtime testing performed and this is achieved without doing code instrumentation. This presentation is an overview of that approach which has applicability beyond the TF-A project.
* Optional TF-A Mailing List Topic Discussions
If TF-A contributors have anything they wish to present at any future TF-A tech forum please contact me to have that scheduled.
Previous sessions, both recording and presentation material can be found on the trustedfirmware.org TF-A Technical meeting webpage: https://www.trustedfirmware.org/meetings/tf-a-technical-forum/
A scheduling tracking page is also available to help track sessions suggested and being prepared: https://developer.trustedfirmware.org/w/tf_a/tf-a-tech-forum-scheduling/ Final decisions on what will be presented will be shared a few days before the next meeting and shared on the TF-A mailing list.
Thanks
Joanna
Hi All,
i've been trying for a couple of days to load current optee together with atf from the github, with no luck. For that i have been using manuals (https://trustedfirmware-a.readthedocs.io/en/latest/plat/rockchip.html , http://opensource.rock-chips.com/wiki_ATF ) for rockchip and what i have succeded is to run very old atf tag 1.3 with optee blob from rockchip which i suspect is also very old. And if i try to use any newer atf >= 1.4 than i suspect that it does not load, because i do not see any LOGS from it, no matter that LOG_LEVEL was set to 50...
Can anybody help me solving this issue or point me to some solution? Thanks in advance.
BR
Piotr Łobacz
[https://softgent.com/wp-content/uploads/2020/01/Zasob-14.png]<https://www.softgent.com>
Softgent Sp. z o.o., Budowlanych 31d, 80-298 Gdansk, POLAND
KRS: 0000674406, NIP: 9581679801, REGON: 367090912
www.softgent.com
Sąd Rejonowy Gdańsk-Północ w Gdańsku, VII Wydział Gospodarczy Krajowego Rejestru Sądowego
KRS 0000674406, Kapitał zakładowy: 25 000,00 zł wpłacony w całości.