Skip to content

[Feature]: Clear supervisor initialization module memory #1606

Description

@kuqin12

Feature Overview

Given that the supervisor runtime and the initialization routine has separated, we should clear the initialization module after usage to reduce the footprint of TLB.

Solution Overview

The current implementation is to allocate the entire MM initialization module outside of the MMRAM and have the page table guard the control. But that will require the IPL to specialize the init routine for the rust MM supervisor and also prevent us from using the edk2 IPL.

The proposed change is that:

In the first MM communicate, we look up the loader region through the hobs, clear the entire region and free the memory.

This has to be done from the MM support side because supervisor will not be able to return the control back to PEI phase.

Alternatives Considered

  • Allocate outside of the MMRAM, which involves changing the existing IPLs and the change could be controversial.
  • Use a PPI to override the MM core address with the initializer address, which will be allocated outside of the MMRAM through the PPI provider. (edk2 maintainer does not like this one)

Urgency

Medium

Are you going to implement the feature request?

I will implement the feature

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions