public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yang Cheng" <yangcheng.work@foxmail.com>
To: Pedro Falcato <pedro.falcato@gmail.com>,devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH v1 1/1] MdePkg/BaseCacheMaintenanceLib: RV64 replace asserts with logs
Date: Thu, 18 Jan 2024 08:41:46 -0800	[thread overview]
Message-ID: <18041.1705596106197003511@groups.io> (raw)
In-Reply-To: <CAKbZUD2xD0EZx-WUCfcE_UKxvUeVCEYpM4kj5cdmrSCaf2AM3g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]

What's very confusing about the current situation is that we have a Pcd that can set whether I support CMO instructions. When I correctly set up my platform to not support CMO instructions and hope that everything goes well, I will trigger Assert in the debug version. But I also can't set the Pcd to support CMO instructions because that would cause me to trigger an illegal instruction exception.

If we decide that this library can only be used by RISCV platforms that support CMO instructions, then we should use some stronger prompts than ASSERT, such as reporting an error at compile time so that developers can find other library alternatives. After all, ASSERT is being released version will lose its functionality which may lead to some unexpected errors. If we decide that this library can be used by platforms that do not support CMO instructions as before, then we should still use logs instead of ASSERT, otherwise it is meaningless to set whether CMO instructions are supported in Pcd and check Pcd at runtime.

Yang Cheng


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114000): https://edk2.groups.io/g/devel/message/114000
Mute This Topic: https://groups.io/mt/103805230/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 1841 bytes --]

  parent reply	other threads:[~2024-01-18 16:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18  9:50 [edk2-devel] [PATCH v1 0/1] Replace asserts with logs for unimplemented cache ops Dhaval Sharma
2024-01-18  9:50 ` [edk2-devel] [PATCH v1 1/1] MdePkg/BaseCacheMaintenanceLib: RV64 replace asserts with logs Dhaval Sharma
2024-01-18 14:45   ` Laszlo Ersek
2024-01-18 15:58   ` Pedro Falcato
2024-01-18 16:40     ` Dhaval Sharma
2024-01-18 16:41     ` Yang Cheng [this message]
2024-01-19  5:08     ` Sunil V L
2024-01-19  5:36   ` Sunil V L
2024-01-23  6:12     ` Dhaval Sharma
2024-01-23 13:23       ` Pedro Falcato
2024-01-23 16:54       ` Sunil V L
2024-01-24 14:27         ` Dhaval Sharma
2024-01-24 14:33           ` Sunil V L

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=18041.1705596106197003511@groups.io \
    --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