Rev 846 | Rev 867 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 846 | Rev 847 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | .register %g6, #scratch |
33 | .register %g6, #scratch |
34 | .register %g7, #scratch |
34 | .register %g7, #scratch |
35 | 35 | ||
36 | .section K_TEXT_START, "ax" |
36 | .section K_TEXT_START, "ax" |
37 | 37 | ||
- | 38 | /* |
|
- | 39 | * Here is where the kernel is passed control. |
|
- | 40 | * The code must be position independent until |
|
- | 41 | * the kernel relocates itself to its VMA. |
|
- | 42 | */ |
|
- | 43 | ||
38 | .global kernel_image_start |
44 | .global kernel_image_start |
39 | kernel_image_start: |
45 | kernel_image_start: |
40 | 0: |
46 | 0: |
41 | b 1f |
47 | b 1f |
42 | nop |
48 | nop |
43 | 49 | ||
44 | # |
50 | /* |
45 | # This header forces SILO to load the kernel at 0x4000. |
51 | * This header forces SILO to load the kernel at 0x4000. |
46 | # More precisely, SILO will think this is an old version of Linux. |
52 | * More precisely, SILO will think this is an old version of Linux. |
47 | # |
53 | */ |
48 | .ascii "HdrS" |
54 | .ascii "HdrS" |
49 | .word 0 |
55 | .word 0 |
50 | .half 0 |
56 | .half 0 |
51 | 57 | ||
52 | .align 8 |
58 | .align 8 |
Line 57... | Line 63... | ||
57 | /* |
63 | /* |
58 | * Prepare to copy the kernel image to 4M. |
64 | * Prepare to copy the kernel image to 4M. |
59 | */ |
65 | */ |
60 | 66 | ||
61 | set LMA, %g1 ! source address |
67 | set LMA, %g1 ! source address |
62 | set VMA, %g2 ! destination address (VMA) |
68 | set VMA, %g2 ! destination address |
63 | set hardcoded_ktext_size, %g3 ! link address of hardcoded_ktext_size |
69 | set hardcoded_ktext_size, %g3 ! link address of hardcoded_ktext_size |
64 | set hardcoded_kdata_size, %g4 ! link address of hardcoded_kdata_size |
70 | set hardcoded_kdata_size, %g4 ! link address of hardcoded_kdata_size |
65 | 71 | ||
66 | sub %g3, %g2, %g3 ! offset of hardcoded_ktext_size from the beginning of the load address |
72 | sub %g3, %g2, %g3 ! offset of hardcoded_ktext_size from the beginning of the load address |
67 | sub %g4, %g2, %g4 ! offset of hardcoded_kdata_size from the beginning of the load address |
73 | sub %g4, %g2, %g4 ! offset of hardcoded_kdata_size from the beginning of the load address |