Runtime phase là gì?
Giải thích giai đoạn runtime sau ExitBootServices và vì sao UEFI Runtime Services vẫn còn quan trọng khi OS đã chạy.
Runtime phase bắt đầu sau khi OS loader gọi ExitBootServices() thành công và kernel bắt đầu kiểm soát hệ thống. Từ góc nhìn firmware, đây là lúc phần lớn boot-time driver đã kết thúc nhiệm vụ. Nhưng một số service vẫn phải sống tiếp để OS gọi được: variable, time, reset và capsule/update tùy platform.
Điểm dễ nhầm: runtime không có nghĩa firmware vẫn điều khiển máy như trước. OS đã nắm quyền. Firmware chỉ để lại một số entry point được map đúng cách.
ExitBootServices
Boot Services biến mất.
Runtime mapping
OS map runtime region theo virtual address.
OS gọi Runtime Services
GetVariable/SetVariable/GetTime/ResetSystem.
Security policy
Nhiều biến/region đã bị lock sau EndOfDxe/SmmReadyToLock.
Runtime khác boot-time ở đâu?
| Mục | Giá trị | Ghi chú |
|---|---|---|
| Boot Services | Chỉ trước ExitBootServices | AllocatePool, LocateProtocol, LoadImage, ConnectController... |
| Runtime Services | Còn sau ExitBootServices | GetVariable, SetVariable, GetTime, ResetSystem... |
| Memory | Cần runtime attribute | OS phải biết region nào cần giữ và map. |
| Security | Bị policy kiểm soát mạnh | Secure Boot, authenticated variable, SMM variable driver. |
Ví dụ thực tế: OS đổi boot order
Trên Linux, efibootmgr có thể gọi UEFI Runtime Variable Services để đọc/sửa BootOrder. Nếu SetVariable() fail, nguyên nhân không chỉ là tool lỗi. Có thể variable store đầy, authenticated variable policy chặn, hoặc SMM variable driver/SPI write protection không cho ghi.
OS tool
↓
Runtime SetVariable()
↓
Firmware runtime thunk / SMM variable service
↓
Variable Store trong SPI Flash
Khi runtime variable fail
Bài liên quan
Thấy nội dung này hữu ích?
Lưu lại hoặc chia sẻ cho người cũng đang học firmware, BIOS/UEFI và embedded systems.
Nội dung liên quan
Một số bài viết, ghi chú hoặc project có liên quan đến nội dung bạn vừa đọc.
Runtime sau ExitBootServices là gì?
Giải thích firmware còn lại gì sau khi OS gọi ExitBootServices và vì sao Runtime Services vẫn quan trọng.
UEFI Variable là gì?
UEFI Variable lưu cấu hình firmware theo dạng Name + VendorGuid + Attributes + Data. Hiểu variable giúp debug boot option mất, Secure Boot fail và NVRAM đầy.
Runtime Services là gì?
Runtime Services là nhóm API UEFI còn hợp lệ sau ExitBootServices. Bao gồm variable, time, reset và virtual address mapping - truy cập qua gRT.
Biến note thành bài viết hoàn chỉnh
Notes là nơi ghi nhanh khái niệm.