[edk2-devel] [PATCH v2 3/3] MdeModulePkg: Use CopyMem instead of GUID assignment

Laszlo Ersek lersek at redhat.com
Fri Mar 13 16:36:36 UTC 2020


On 03/12/20 22:19, Leif Lindholm wrote:
> On Thu, Mar 12, 2020 at 20:42:52 +0100, Laszlo Ersek wrote:
>> On 03/12/20 15:44, Leif Lindholm wrote:
>>> And what would you propose we do the next time the RISC-V toolchain
>>> generates a memcpy call based on some other completely valid change to
>>> core code?
>>
>> We could choose to enable the intrinsics library for RISC-V at that point.
> 
> We could. And have no time left for resolving any issues that may be
> triggered by that without slipping the next stable tag. I would prefer
> de-risking it.

OK.

>> IIUC, the CreateDeviceManagerForm() code in question did break an edk2
>> rule ("don't use structure assignment") *prior* to commit 64a228f5f893.
>> The rule violation was in commit 32465d9ae7ee; RISC-V only exposed it.
>> This doesn't seem uncharted territory.
> 
> I don't understand, I've already said I'm not pushing to revert that
> patch, I have suggested that we don't put RISC-V on less stable ground
> than ARM/AARCH64.

Apologies, I was unclear. By "not uncharted territory", I meant that
it's not uncommon for new code (regardless of architecture) to expose
dormant issues in old code. In particular the "no struct assignment"
rule is not being broken for the first time.

Anyway, I'm not opposing your suggestion.

> But continuing on the unrelated topic:
> If the rule is "no structure assignments", then fine, that's part of
> the C dialect you need to learn in order to contribute to TianoCore.
> I can separately start arguing for changing that rule.

*That* would be awesome, if it can be pulled off universally
(arch-independently), and hopefully without performance loss. (I do
agree it's unlikely that we'll have tight loops with CopyGuid() etc.)

> However, I can't easily find that in the coding style - could you give
> me a pointer?

I'm not even going to look now: I believe I tried that earlier, and it's
not in the edk2 CCS (AFAIR). It's by word of mouth.

Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#55847): https://edk2.groups.io/g/devel/message/55847
Mute This Topic: https://groups.io/mt/71671270/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list