Re: [RISC-V] [software] Add SBI extension space for firmware code base implementation
Abner Chang <abner.chang@...>
This is the PR according to the discussion we had in mail thread. However you may see some confusions from this change. https://github.com/riscv/riscv-sbi-doc/pull/43/commits/e208f23c64f7a6a4be47d6d0ca852433107f6cf4
- EDK2 is a SBI implementation? Actually edk2 is not one of the SBI implementations, edk2 fully compliant with OpenSBI and additionally provides the firmware code base SBI extension. We can explain this in the external Firmware code base SBI extension spec (edk2 RISC-V OpenSBI spec), says edk2 SBI implementation actually goes alone with SBI OpenSBI implementation. - What is the SBI implementation version associated with EDK2 SBI implementation? This is another confusion because the major SBI implementation is OpenSBI. We also can explain this in the external Firmware code base SBI extension spec, says edk2 SBI implementation version is the version of SBI OpenSBI implementation.
Apart from the above proposal, can we have more clear definitions for Firmware code base SBI extension in SBI spec instead of fixing those confusions in the extern spec? The below proposal makes more sense? - Define another table for firmware code base, e.g. SBI Firmware Code Base ID. In the table we can have edk2, uboot, Coreboot and etc.. - Create a new SBI Base function, sbi_get_firmware_code_base_id() which returns the SBI Firmware Code Base ID. - Create a new SBI Base function, sbi_get_firmware_code_base_version() for the version control of firmware code base SBI extension - Firmware code base SBI extension is from 0xA000000 to 0xAffffff with Firmware Code Base ID in low bits.
I feel the later one makes more sense and clear, how do you think? Abner
From: tech-unixplatformspec@... [mailto:tech-unixplatformspec@...]
On Behalf Of Abner Chang
Sent: Saturday, April 11, 2020 12:08 AM To: Anup Patel <Anup.Patel@...>; Jonathan Behrens <behrensj@...> Cc: Atish Patra <Atish.Patra@...>; Schaefer, Daniel (DualStudy) <daniel.schaefer@...>; tech-unixplatformspec@... Subject: Re: [RISC-V] [tech-unixplatformspec] [RISC-V] [software] Add SBI extension space for firmware code base implementation
Cool. This works for edk2. I will have another PR for this.
For edk2, we will request a new SBI implementation ID (4) and register firmware code base extension SBI in edk2 SEC phase.
From: Anup Patel [mailto:Anup.Patel@...]
I agree with Jonathan's proposal. Let's have SBI FW extension ID depend on SBI implementation ID. We can target this for SBI v0.3 spec along with System Reboot extension. Regards, Anup Sent from Outlook Mobile
From:
tech-unixplatformspec@... <tech-unixplatformspec@...> on behalf of Jonathan Behrens <behrensj@...>
What I was suggesting is something like:
> Implementation specific SBI extension Space, Extension IDs 0x0A000000 through 0x0AFFFFFF. Low bits from SBI Implementation ID.
In this scheme, each SBI implementation would have one extension reserved for it: BBL gets 0x0A000000, OpenSBI gets 0x0A000001, Xvisor gets 0x0A000002, KVM gets 0x0A000003, etc. That might not seem like a lot of space, but each extension can have up to 2^32 different functions (including ones for version number discovery, etc.) so it shouldn't actually be limiting.
As a side note, I don't think edk2 has an SBI Implementation ID assigned yet. You should just be able to ask for one and get it.
Jonathan
On Fri, Apr 10, 2020 at 2:23 AM Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> wrote:
|
|