3/23/2025

CPU informations and configurations

After CPUID, MSR draft is also complete. The samples in QEMU are put in

python X86MsrInfo -d -a --verbose

X86MsrInfo.txt

This sample can dump MSR registers in each CPU core with parameter "-a".

Or with "-c n" parameter to dump MSR registers in specified CPU core, the n is core index in EFI_MP_SERVICES_PROTOCOL.



3/15/2025

X86CpuInfo.py

Introduction

This script makes me possible to check processor information.

Command line:

python X86CpuInfo.py > X86CpuInfo.txt

This is the result on QEMU



3/09/2025

EfiPy2.Lib.X86Processor and X86ProcessorSample.py (EFI_MP_SERVICES_PROTOCOL)

EfiPy2.Lib.X86Processor

This is a EFI_MP_SERVICES_PROTOCOL related libary making Python invoke CPUID, MSR and MMIO related function running on different CPU core.

These processor functions are made from CorePy. It also provides the capabilities

1. Geting which CPU core python application runs on (X86Processors.WhoAmI).

2. Local APIC MMIO Address (X86Processors.LocalApicAddress)

3. Each APIC IDs from EFI_MP_SERVICES_PROTOCOL

X86ProcessorSample.py

This is a sample code of getting APIC ID on each core via EfiPy2.Lib.X86Processor.

Sample output from EfiPy2 on QEMU.







3/03/2025

About CorePy

 About

CorePy is used to assembly machine code in python script. EfiPy project uses it for some function wich is not available by UEFI protcol easily, for example to read/write I/O, CPUID and MSR.

CorePy is developmented in Linux system. the prologue and epilogue in current status have to be improved for fitting current UEFI calling convention .

Note:

Calling convetion code is patched at

https://github.com/EfiPy/EfiPy2/commit/217fdd233568449d71b2b4082b6220d7fb8

171da