Dear all,
we have discussed that a protocol is needed to fix-up device trees
loaded by GRUB or other boot managers.
In the U-Boot code we have actually the following actions for
device-trees:
* load the device-tree to memory
* copy the device-tree to an allocated memory region which
has 12 KiB free space for device-tree fix-ups
* do the actual fix-ups, i.e. add new nodes or change properties
* reserve memory according to the /reserved-memory node and the
memory reservation block as EfiBootServicesData or as
EfiReservedMemoryType for no-map regions
* install the device-tree as configuration table
So I think the usage of a DT fix-up protocol could take the following steps:
* GRUB loads the device-tree allocating sufficient memory for fix-ups
* GRUB calls the protocol a fist time to add extra nodes and properties
* GRUB applies its own device-tree fix-ups
* GRUB calls the protocol a second time which
- reserves memory according to the /reserved-memory node
- installs the device-tree as configuration table
One could join both service calls if GRUB applies its own fix-ups first.
But maybe GRUB wants to analyze U-Boot's fix-ups before committing its
own ones.
So lets define a bit-field to pass to the fix-up protocol:
/* Add nodes and update properties */
#define EFI_DT_APPLY_FIXUPS 0x00000001
/*
* Reserve memory according to the /reserved-memory node
* and the memory reservation block
*/
#define EFI_DT_RESERVE_MEMORY 0x00000002
/* Install the device-tree as configuration table */
#define EFI_DT_INSTALL_TABLE 0x00000004
Here is the rest of the proposed protocol definition:
#define EFI_DT_FIXUP_PROTOCOL_GUID \
{ 0xe617d64c, 0xfe08, 0x46da, \
{ 0xf4, 0xdc, 0xbb, 0xd5, 0x87, 0x0c, 0x73, 0x00 } }
typedef struct _EFI_DT_FIXUP_PROTOCOL {
EFI_DT_FIXUP fixup;
} EFI_DT_FIXUP_PROTOCOL;
typedef EFI_STATUS
(EFIAPI *EFI_DT_FIXUP) (
IN EFI_DT_FIXUP_PROTOCOL *This,
IN VOID *Fdt,
IN OUT UINTN *BufferSize,
IN UINT32 Flags,
);
This: Pointer to the protocol
Fdt: Buffer with the device-tree. This shall be memory
of type EfiACPIReclaimMemory if Flags contains
EFI_DT_INSTALL_TABLE.
BufferSize: Pointer to the size of the buffer including
trailing unused bytes for fix-ups.
If the buffer size is too small,
the required buffer size is returned.
Flags: Bitmap containing at least one of the values
EFI_DT_APPLY_FIXUPS, EFI_DT_RESERVE_MEMORY,
EFI_DT_INSTALL_TABLE. Indicates the actions
to be applied to the device-tree.
The selected actions indicated in Flags are applied in the
sequence:
* Add nodes and update properties.
* Reserve memory according to the /reserved-memory node
and the memory reservation block
* Install the device-tree as configuration table
Memory is reserved as EfiBootServicesData if the reservation does not
carry the no-map property and as EfiReservedMemoryType if it is marked
as no-map.
If *BufferSize exceeds the value of the totalsize field header of
device-tree header upon entry to the service, the totalsize field is set
to *BufferSize.
Return values:
EFI_INVALID_PARAMETER - This is NULL or does not point to a valid
EFI_DT_FIXUP_PROTOCOL implementation.
EFI_INVALID_PARAMETER - Fdt or BufferSize is NULL
EFI_INVALID_PARAMETER - *Fdt is not a valid device-tree
(e.g. incorrect value of magic)
EFI_INVALID_PARAMETER - Invalid value of Flags (zero or unknown bit)
EFI_BUFFER_TOO_SMALL - The buffer is too small to apply the fix-ups.
EFI_SUCCESS - All steps succeeded
If EFI_BUFFER_TOO_SMALL is returned, the device-tree is unmodified
and *BufferSize is updated with the required buffer size for the
provided device-tree.
The required buffer size when called with EFI_DT_APPLY_FIXUPS should
enforce at least 4 KiB unused space for additional fix-ups by the
operating system or the caller. The available space in the device-tree
shall be determined using the device-tree header fields:
Available = header->totalsize
- header->off_dt_strings
- header->size_dt_strings;
(The strings block is always last in the flattened device-tree. There
might be more space between blocks but not all device-tree libraries can
use it.)
The required buffer size when called without EFI_DT_APPLY_FIXUPS shall
be the value of the totalsize field of the flattened device tree header.
If any other error code is returned, the state of the device-tree is
undefined. The caller should discard the buffer content.
The extent to which the validity of the device-tree is checked is
implementation dependent. But a buffer without the correct value of the
magic field of the flattened device tree header should always be rejected.
The protocol implementation is not required to check if the device-tree
is in memory of type EfiACPIReclaimMemory.
Looking forward to your feedback.
Best regards
Heinrich
All,
Sorry for the late notice.
We will have our normal DTE call at 2PM GMT today.
My suggested topic for today is the open items in the DTB ABI slides here:
https://docs.google.com/presentation/d/1Hq7-42EfM4xC_1N1HMO20vXVKSpkA_S-Los…
This will be the last call for 2020.
My suggestion for the DTE calls after this is to start in January with
either:
Option 1:
2nd & 4th Wednesday @ 4 PM GMT / 11 AM US Eastern
Option 2:
Alternate weeks with the EBBR call, Mondays at 4 PM GMT
Thanks,
Bill
--
Bill Mills
Principal Technical Consultant, Linaro
+1-240-643-0836
TZ: US Eastern
Work Schedule: Tues/Wed/Thur
Hello Atish,
the UEFI spec has this sentence:
"When UEFI firmware handoff control to OS, the RISC-V is operated in
machine-mode privilege." (M-mode is the equivalent to EL3 in ARM).
This does not make any sense to me when using a secure execution
environement (SEE) like OpenSBI.
The hand-off should occur in S-Mode if the CPU supports it and only in
M-Mode when the CPU only supports M-mode.
We should prescribe this in the EBBR and somehow get the UEFI spec fixed
afterwards.
An other issue is the calling convention. Chapter "2.3.7.3 Detailed
Calling Convention" does not describe which registers are saved by the
UEFI payload's entry point and restored by the payload before calling
the UEFI API or returning to the UEFI payload. This concerns especially
registers gp (x3) and tp (x4).
Into the EBBR or UEFI spec we should put a link to the "RISC-V ELF psABI
specification"
https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md
which is referenced by "The RISC-V Instruction Set Manual".
>From the "RISC-V ELF psABI specification" one might conclude that the
UEFI payload should not be allowed to change gp and tp before calling
ExitBootServices() or SetVirtualAddressMap() whichever occurs last.
Due to this missing clarification U-Boot is currently saving gp before
calling the entry point of the payload and restores it on reentry or on
entry of an API call. Nothing is done for tp.
Best regards
Heinrich
I have a conflict this week and need to cancel. I propose pushing out to next week (Dec 14th), and cancelling the meeting on the 21st when many people will be on holiday anyway. Let me know if you want anything added to the meeting agenda before next week.
Draft agenda:
* Action item review
* EBBR Testing Efforts (SCT, FWTS, etc)
* UEFI Exception text changes
* Next release schedule
* Other business
Time: This is a recurring meeting Meet anytime
Join Zoom Meeting
https://armltd.zoom.us/j/92081365511?pwd=SFZpRitXUEp3Zy9GM0h3UUZ1b1pnUT09
Meeting ID: 920 8136 5511
Password: 490324
One tap mobile
+14086380968,,92081365511#,,#,490324# US (San Jose)
+16465189805,,92081365511#,,#,490324# US (New York)
Dial by your location
+1 408 638 0968 US (San Jose)
+1 646 518 9805 US (New York)
+1 346 248 7799 US (Houston)
Meeting ID: 920 8136 5511
Password: 490324
Find your local number: https://armltd.zoom.us/u/adYiWaDyys
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Hi all,
Here is the draft agenda for the EBBR biweekly today. As always, let me
know if there is anything you want to add. Notes will be taken in
Etherpad[1].
Draft agenda:
- Issue & PR review
- Draft EBBR text for tailoring UEFI section 2.6 base requirements[2]
- Roundtable
- Any other business
[1] https://etherpad.opendev.org/p/EBBR
[2] https://github.com/ARM-software/ebbr/wiki/Required-EFI-protocols
---
Monday 23 November
16:00 GMT
Join Zoom Meeting
https://armltd.zoom.us/j/92081365511?pwd=SFZpRitXUEp3Zy9GM0h3UUZ1b1pnUT09
Meeting ID: 920 8136 5511
Password: 490324
One tap mobile
+14086380968,,92081365511#,,#,490324# US (San Jose)
+16465189805,,92081365511#,,#,490324# US (New York)
Dial by your location
+1 408 638 0968 US (San Jose)
+1 646 518 9805 US (New York)
+1 346 248 7799 US (Houston)
Meeting ID: 920 8136 5511
Password: 490324
Find your local number: https://armltd.zoom.us/u/adYiWaDyys
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
All,
We had a DTE call last week that was poorly attended. We decided to try
again this week. Nov 11 would be our next normal call but it is a
holiday for many of us so Francois will cancel it. Here I am suggesting
we also meet on Nov 18.
so to recap:
Nov 4: YES
Nov 11: NO
Nov 18: YES
On one of these calls we will figure out what we want to do going
forward for meeting time. (Go back to old schedule, Keep new schedule,
alternate weeks with EBBR in the same slot)
For anyone that wants a real calendar invite, you can import the link below.
Topic: DT Evolution (special case for Nov)
Time: Nov 4, 2020 02:00 PM London
Every 2 weeks on Wed, 2 occurrence(s)
Nov 4, 2020 02:00 PM
Nov 18, 2020 02:00 PM
Please download and import the following iCalendar (.ics) files to your
calendar system.
Weekly:
https://linaro-org.zoom.us/meeting/tJwkc-2qrzgrHtVXvrcFXQ6fHonAqq_w1BZo/ics…
Join Zoom Meeting
https://linaro-org.zoom.us/j/98944213141?pwd=Ukg0T0hsTGp6OXFFMEpUZGZGVEUrdz…
Meeting ID: 989 4421 3141
Passcode: 8250
One tap mobile
+13017158592,,98944213141# US (Germantown)
+16465588656,,98944213141# US (New York)
Dial by your location
+1 301 715 8592 US (Germantown)
+1 646 558 8656 US (New York)
+1 312 626 6799 US (Chicago)
+1 669 900 9128 US (San Jose)
+1 253 215 8782 US (Tacoma)
+1 346 248 7799 US (Houston)
888 788 0099 US Toll-free
877 853 5247 US Toll-free
Meeting ID: 989 4421 3141
Find your local number: https://linaro-org.zoom.us/u/abpCUvVWcd
Thanks,
Bill
--
Bill Mills
Principal Technical Consultant, Linaro
+1-240-643-0836
TZ: US Eastern
Work Schedule: Tues/Wed/Thur
[Note to self: I really should start sending out this email on Friday
instead of Monday afternoon]
Reminder; next EBBR meeting is today at 16:00 GMT. Dial in details are
below.
Let me know if there is anything you want added to the agenda
Agenda:
- Action item review
- UEFI Exceptions Chapter
- Any other business
---
Time: Every second Monday starting 31 Aug at 16:00BST, 08:00PST
Join Zoom Meeting
https://armltd.zoom.us/j/92081365511?pwd=SFZpRitXUEp3Zy9GM0h3UUZ1b1pnUT09
Meeting ID: 920 8136 5511
Password: 490324
One tap mobile
+14086380968,,92081365511#,,#,490324# US (San Jose)
+16465189805,,92081365511#,,#,490324# US (New York)
Dial by your location
+1 408 638 0968 US (San Jose)
+1 646 518 9805 US (New York)
+1 346 248 7799 US (Houston)
Meeting ID: 920 8136 5511
Password: 490324
Find your local number: https://armltd.zoom.us/u/adYiWaDyys
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
This patch series adds RISC-V compatibility content to EBBR.
The additional content is not a lot given that we just need to update the
architecture specific sections for RISC-V. Rest of the document is ISA agnostic
anyways. I am not sure about the copyrights though. There are two places where
copyrights are present. I have added Western Digital copyright for the index.rst
but I have not added it for conf.py as it goes into the first page of the EBBR
specification.
Should we add multiple lines of copyrights or just keep copyrights
at one place ? I am open to any other suggestions as well.
The series is also available in my github repo.
https://github.com/atishp04/ebbr/tree/riscv_update
Changes from v1->v2:
1. Added ACPI todo list.
2. Removed efistub requirements as that is linux specific.
3. Fix typos.
Atish Patra (2):
Add Western Digital copyright
Add RISC-V support content to the EBBR specification
source/chapter1-about.rst | 42 +++++++++++++++++++++++++++++++--
source/chapter2-uefi.rst | 10 +++++++-
source/chapter3-secureworld.rst | 14 +++++++++++
source/index.rst | 3 +++
source/references.rst | 4 ++++
5 files changed, 70 insertions(+), 3 deletions(-)
--
2.28.0
Hi folks,
Very sorry, but I'm going to postpone this week's EBBR meeting to next
week. Arm has an internal quarterly meeting that conflicts. I'm going to
reschedule to the same slot next week.
g.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Reminder: Next EBBR Biweekly meeting is today at 16:00 UTC. Please note,
UK daylight savings time ended yesterday, so this will be an hour later
for everyone in the US or otherwise still on DST.
Please reply if you want to add an item to the agenda.
Notes will be collected on Etherpad. Please help take notes if you can.
Here is the link:
https://etherpad.opendev.org/p/EBBR
Time: Every second Monday starting 31 Aug at 16:00BST, 08:00PST
Join Zoom Meeting
https://armltd.zoom.us/j/92081365511?pwd=SFZpRitXUEp3Zy9GM0h3UUZ1b1pnUT09
Meeting ID: 920 8136 5511
Password: 490324
One tap mobile
+14086380968,,92081365511#,,#,490324# US (San Jose)
+16465189805,,92081365511#,,#,490324# US (New York)
Dial by your location
+1 408 638 0968 US (San Jose)
+1 646 518 9805 US (New York)
+1 346 248 7799 US (Houston)
Meeting ID: 920 8136 5511
Password: 490324
Find your local number: https://armltd.zoom.us/u/adYiWaDyys