Skip to content

Massive refactor - #4

Open
theoparis wants to merge 13 commits into
mainfrom
redesign
Open

theoparis wants to merge 13 commits into
mainfrom
redesign

Conversation

@theoparis

Copy link
Copy Markdown
Contributor

No description provided.

- EL2 banks, exception entry/ERET to EL2, EL2 translation regime (TTBR0/TTBR1
  with TCR_EL2 layouts), HCR_EL2.TGE routing, and HCR_EL2.E2H (VHE) redirection
  of EL1 register names from EL2.
- Stored IMP-DEF bank for S3_{4,5,6}_c15 registers the SPTM monitor configures.
- system::monitor: place Apple's sptm.t8103 image in DRAM, boot structure with
  the linear-map fields, ADT placeholder-flag cleaning, and chosen/memory-map
  region insertion.
- Debug hooks: Machine::set_step_trace (one instruction per block, reports
  changed system registers including exception entries) and
  Machine::set_memory_trace (translated loads and stores).
- ID_AA64PFR0_EL1 advertises EL2.
- xnu::Segment keeps its segname, with Segment::name().
- monitor::image_parts names an image's contiguous parts (ro, rx, bx, rw, le, rs,
  virt, entry); write_part copies one; place_parts writes a whole image at caller
  addresses and returns its chosen/memory-map regions.
- monitor::add_property inserts a property at any device-tree node path;
  add_memory_map_region is built on it.
- The monitor's region table requires each present region to start where the
  previous one ended; the probe packs TXM, TrustCache, the kernelcache, the device
  tree and SPTM accordingly.
- The monitor now validates the regions and reads /chosen/dram-base. It then zeroes a
  page at VA & 0x3fff_ffff_ffff, so its linear-map convention is still unresolved.
The monitor maps physical ranges through a PAPT table ({VA base, PA base, pages})
filled by its DRAM registrar at 0xfffffff0270bd224. The registrar is never entered;
its only reference is a function-pointer table in __DATA_CONST. With the table empty,
a lookup misses and the zeroing routine clears a masked address. This corrects the
earlier reading of the masked TTBR and zeroing addresses as a physical convention.
The bootstrap fills the PAPT table in its own DRAM walk (0xfffffff0270d05f4, entry
writes at d0804) and zero-fills pages through that table at 0xfffffff0270d0b0c.
Function 0xfffffff0270bd224 is SPTM_FUNCTIONID_SLIDE_REGION (dispatch command),
not the bootstrap's registrar. The abort's masked address is a lookup miss, not a
register convention.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant