Changeset 0637ddb in mainline
- Timestamp:
- 2016-05-09T07:33:15Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fa9f8ad
- Parents:
- 4928165
- Location:
- kernel/arch/ia32/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/boot/multiboot.S
r4928165 r0637ddb 221 221 222 222 /* Align address down to 4k */ 223 andl $(~ 4095), %esi223 andl $(~(PAGE_SIZE - 1)), %esi 224 224 225 225 use_kernel_end: 226 226 227 227 /* Align address to 4k */ 228 addl $ 4095, %esi229 andl $(~ 4095), %esi228 addl $(PAGE_SIZE - 1), %esi 229 andl $(~(PAGE_SIZE - 1)), %esi 230 230 231 231 /* Allocate space for page tables */ 232 232 movl %esi, pt_loc 233 movl $ballocs, %edi 234 andl $0x7fffffff, %edi 233 movl $KA2PA(ballocs), %edi 235 234 236 235 movl %esi, (%edi) … … 246 245 orl %ebx, %eax 247 246 movl %eax, (%esi, %ecx, 4) 248 addl $ (4 * 1024), %ebx247 addl $PAGE_SIZE, %ebx 249 248 250 249 incl %ecx … … 268 267 /* Mapping 0x80000000 + %ecx * 4M => 0x00000000 + %ecx * 4M */ 269 268 movl %eax, (%edi, %ecx, 4) 270 addl $ (4 * 1024), %ebx269 addl $PAGE_SIZE, %ebx 271 270 272 271 incl %ecx … … 286 285 /** Calculate unmapped address of the end of the kernel. */ 287 286 calc_kernel_end: 288 movl $hardcoded_load_address, %edi 289 andl $0x7fffffff, %edi 287 movl $KA2PA(hardcoded_load_address), %edi 290 288 movl (%edi), %esi 291 andl $0x7fffffff, %esi 292 293 movl $hardcoded_ktext_size, %edi 294 andl $0x7fffffff, %edi 289 leal KA2PA(0)(%esi), %esi 290 291 movl $KA2PA(hardcoded_ktext_size), %edi 295 292 addl (%edi), %esi 296 andl $0x7fffffff, %esi 297 298 movl $hardcoded_kdata_size, %edi 299 andl $0x7fffffff, %edi 293 leal KA2PA(0)(%esi), %esi 294 295 movl $KA2PA(hardcoded_kdata_size), %edi 300 296 addl (%edi), %esi 301 andl $0x7fffffff, %esi297 leal KA2PA(0)(%esi), %esi 302 298 movl %esi, kernel_end 303 299 -
kernel/arch/ia32/src/smp/ap.S
r4928165 r0637ddb 75 75 movw %ax, %es 76 76 movw %ax, %ss 77 movl $KA2PA(ctx), %eax /* KA2PA((uintptr_t) &ctx) */77 movl $KA2PA(ctx), %eax /* KA2PA((uintptr_t) &ctx) */ 78 78 movl CONTEXT_OFFSET_SP(%eax), %esp 79 subl $PA2KA(0), %esp /* KA2PA(ctx.sp) */79 leal KA2PA(0)(%esp), %esp /* KA2PA(ctx.sp) */ 80 80 81 81 /* … … 85 85 call map_kernel_pse 86 86 87 addl $PA2KA(0), %esp /* PA2KA(ctx.sp) */87 addl $PA2KA(0), %esp /* PA2KA(ctx.sp) */ 88 88 89 89 /* create the first stack frame */
Note:
See TracChangeset
for help on using the changeset viewer.