Commit 14c63aa
committed
Only perform a single TLB flush after identity mapping
This commit changes the BIOS bootloader to only flush the TLB once,
after it has identity-mapped every physical memory frame. This should be
a bit more efficient, as we don't perform a separate `invlpg` for every
page table entry we create, and instead only flush the entire thing by
reloading `CR3` when we're actually ready to use it.
This is based on a suggestion by @phil-opp, here:
#260 (comment)
This change doesn't actually seem to make all that big an impact in boot
times on QEMU v7.1 on its own, relative to PR #260, but it might make an
additional improvement on top of that PR.1 parent ac46d04 commit 14c63aa
1 file changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
125 | 134 | | |
126 | 135 | | |
127 | 136 | | |
| |||
0 commit comments