Boot Loader Remapping via Intermediate Address Space
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Boot loaders often face memory conflicts due to 'identity mapping' when transitioning from firmware to kernel environments, especially in systems without guaranteed low memory addresses or with memory at high addresses, leading to potential memory conflicts.
Innovation Solution
A method to re-map the boot loader image from a firmware address space to a boot loader address space using page tables, allowing for a seamless transition without conflicts by determining the difference in virtual addresses and building page tables for an intermediate address space that enables execution to jump between different address ranges, thus avoiding conflicts with kernel modules and data structures.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If identity mapping is employed to map virtual addresses to machine addresses, then the boot loader can be mapped at virtual addresses equivalent to machine addresses simplifying the mapping process, but memory conflicts arise when virtual addresses overlap with kernel module addresses
Solution Approach 1:
The patent introduces an intermediate address space as a mediator between the firmware address space and the kernel address space. This intermediate space allows the boot loader to be remapped without directly conflicting with kernel addresses, eliminating memory conflicts while maintaining mapping simplicity through automated address translation.
Solution Approach 2:
The patent changes the address space parameters by introducing a third address space with different mapping characteristics. By modifying the address space structure and using page table modifications, the system transitions from direct identity mapping to a multi-space mapping approach that prevents address overlaps.
2Ease of manufacture
If the boot loader is loaded at fixed physical memory addresses for simplicity, then mapping becomes easier, but conflicts occur in systems without guaranteed low memory addresses or with memory at high addresses
Solution Approach 1:
The patent creates a universal boot loading mechanism that works across different platform configurations. The intermediate address space serves multiple functions: it accommodates systems with low addresses, systems without guaranteed memory ranges, and systems with high addresses, making the boot process universally compatible.
Solution Approach 2:
The patent introduces dynamic address space management where the mapping configuration can adapt to different platform requirements. The system dynamically selects and configures appropriate address space mappings based on the specific platform's memory architecture, enabling flexibility across diverse hardware configurations.
3Ease of operation
If virtual addresses are mapped to match machine addresses in the same address space, then the boot loader execution is simplified, but memory conflicts arise with kernel modules and data structures
Solution Approach 1:
The patent segments the address space into distinct regions: firmware address space, intermediate address space, and kernel address space. This segmentation isolates the boot loader in its own address space while maintaining execution simplicity through automated translation, preventing address overlaps with kernel modules and data structures.
Solution Approach 2:
The intermediate address space acts as a mediator that preserves execution simplicity while preventing address conflicts. It provides a translation layer that maintains the illusion of simple mapping for the boot loader while actually routing addresses through a conflict-free path to the appropriate memory locations.
Data Source
AI summary
A method of re-mapping a boot loader image from a first to a second address space includes: determining a difference in a virtual address of the boot loader image in the first and second address spaces; building page tables for a third address space that maps a code section within the boot loader image at first and second address ranges separated by the difference and the code section causes execution to jump from a first instruction in the first address range to a second instruction in the second address range; executing an instruction of the code section in the first address space using pages tables for the first address space; executing the first instruction and then the second instruction using the page tables for the third address space; and executing an instruction of the boot loader image in the second address space using page tables for the second address space.


