public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Pedro Falcato" <pedro.falcato@gmail.com>
To: devel@edk2.groups.io, afish@apple.com
Cc: lichao@loongson.cn, Ard Biesheuvel <ardb@kernel.org>,
	 Liming Gao <gaoliming@byosoft.com.cn>,
	Bob Feng <bob.c.feng@intel.com>,
	 Yuwei Chen <yuwei.chen@intel.com>
Subject: Re: [edk2-devel] About EDK2 supports Self Modifying Code
Date: Tue, 15 Aug 2023 16:39:29 +0100	[thread overview]
Message-ID: <CAKbZUD3688Z1ubX-nS8wCEAUBjVPdid9za4Y1cq7CaB1oAvDrQ@mail.gmail.com> (raw)
In-Reply-To: <30CC4A49-0827-4960-A8F5-F44F534051F9@apple.com>

On Tue, Aug 15, 2023 at 4:05 PM Andrew Fish via groups.io
<afish=apple.com@groups.io> wrote:
>
> Chao,
>
> From a quick google it looks like CSR* is used to access banks of registers that relate to things like performance counters and debug infrastructure and the number of banks of these register sets is likely implementation defined. Seems like we could introduce some Fixed At Build PCD values that define the maximum number of elements in a given bank.
>
> If we are forced to use assembler it might be possible to write some macros that used the fixed at build values to only generate functions for banks that are needed for a given build. Then I think it becomes an exercise in dead code stripping the assembler. Most compilers generate assembler that contains functions that can be stripped as long as those functions follow certain rules.
>
> As a side note it would be good for us to have an FAQ/Wiki entry for the dead code stripping rules for the various flavors of assembler. I know the Apple assembler has a unique take on this.

FWIW, I'm almost positive there's no DCE in GNU as (or llvm-as as
well). Unless you use something ffunction-sections
-fdata-sections-like, but then you're relying on the linker +
gc-sections to take care of it, just like GCC/clang would.

-- 
Pedro


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



  reply	other threads:[~2023-08-15 15:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-15  3:06 [edk2-devel] About EDK2 supports Self Modifying Code Chao Li
2023-08-15  4:57 ` Andrew Fish via groups.io
2023-08-15  8:20   ` Chao Li
2023-08-15  8:28     ` Ard Biesheuvel
2023-08-15  8:54       ` Chao Li
2023-08-15 15:05         ` Andrew Fish via groups.io
2023-08-15 15:39           ` Pedro Falcato [this message]
2023-08-15 16:30             ` Andrew Fish via groups.io
2023-08-15 18:48               ` Ard Biesheuvel
2023-08-15 21:26                 ` Andrew Fish via groups.io
2023-08-17  3:38                   ` Chao Li
2023-08-15 15:35     ` Pedro Falcato
2023-08-17  2:30       ` Chao Li
2023-08-17 19:53         ` Michael D Kinney
2023-08-17 20:55           ` Andrew Fish via groups.io
2023-08-19  2:18             ` Chao Li
2023-08-19  4:29               ` Michael D Kinney
2023-08-25  4:02                 ` Chao Li

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=CAKbZUD3688Z1ubX-nS8wCEAUBjVPdid9za4Y1cq7CaB1oAvDrQ@mail.gmail.com \
    --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