Changeset dabaa83 in mainline
- Timestamp:
- 2019-06-05T06:37:17Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f3f4149
- Parents:
- 77918b0
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/mips32/include/arch/main.h
r77918b0 rdabaa83 30 30 #define BOOT_mips32_MAIN_H_ 31 31 32 extern void bootstrap( void);32 extern void bootstrap(int, char **); 33 33 34 34 #endif -
boot/arch/mips32/include/arch/types.h
r77918b0 rdabaa83 35 35 #define CPUMAP_MAX_RECORDS 32 36 36 #define BOOTINFO_TASK_NAME_BUFLEN 32 37 #define BOOTINFO_BOOTARGS_BUFLEN 256 37 38 38 39 typedef struct { … … 56 57 uint32_t cpumap; 57 58 taskmap_t taskmap; 59 char bootargs[BOOTINFO_BOOTARGS_BUFLEN]; 58 60 } bootinfo_t; 59 61 -
boot/arch/mips32/src/asm.S
r77918b0 rdabaa83 36 36 .section BOOTSTRAP 37 37 38 /* 39 * Registers on entry: 40 * 41 * a0: kernel argument count (kargc) 42 * a1: kernel argument vector (kargv) of kargc elements 43 * a2: unused here (kenvp on Malta) 44 * a3: RAM size on Malta 45 * 46 * This is the case on Malta. 47 * msim clears these registers, so it is de facto correct as well. 48 */ 38 49 SYMBOL(start) 39 50 /* … … 43 54 * - Disable 64-bit user addressing mode 44 55 */ 45 mfc0 $ a0, $status46 la $ a1, 0xffffff1f47 and $ a0, $a1, $a048 mtc0 $ a0, $status56 mfc0 $t0, $status 57 la $t1, 0xffffff1f 58 and $t0, $t1, $t0 59 mtc0 $t0, $status 49 60 50 61 #if defined(MACHINE_lmalta) || defined(MACHINE_bmalta) … … 52 63 * Remember the size of the SDRAM in bootinfo. 53 64 */ 54 la $ a0, PA2KA(BOOTINFO_OFFSET)55 sw $a3, 0($ a0)65 la $t0, PA2KA(BOOTINFO_OFFSET) 66 sw $a3, 0($t0) 56 67 #endif 57 68 … … 61 72 * but it not an issue). 62 73 */ 63 la $ a0, PA2KA(CPUMAP_OFFSET)74 la $t0, PA2KA(CPUMAP_OFFSET) 64 75 65 sw $zero, 0($ a0)66 sw $zero, 4($ a0)67 sw $zero, 8($ a0)68 sw $zero, 12($ a0)76 sw $zero, 0($t0) 77 sw $zero, 4($t0) 78 sw $zero, 8($t0) 79 sw $zero, 12($t0) 69 80 70 sw $zero, 16($ a0)71 sw $zero, 20($ a0)72 sw $zero, 24($ a0)73 sw $zero, 28($ a0)81 sw $zero, 16($t0) 82 sw $zero, 20($t0) 83 sw $zero, 24($t0) 84 sw $zero, 28($t0) 74 85 75 sw $zero, 32($ a0)76 sw $zero, 36($ a0)77 sw $zero, 40($ a0)78 sw $zero, 44($ a0)86 sw $zero, 32($t0) 87 sw $zero, 36($t0) 88 sw $zero, 40($t0) 89 sw $zero, 44($t0) 79 90 80 sw $zero, 48($ a0)81 sw $zero, 52($ a0)82 sw $zero, 56($ a0)83 sw $zero, 60($ a0)91 sw $zero, 48($t0) 92 sw $zero, 52($t0) 93 sw $zero, 56($t0) 94 sw $zero, 60($t0) 84 95 85 sw $zero, 64($ a0)86 sw $zero, 68($ a0)87 sw $zero, 72($ a0)88 sw $zero, 76($ a0)96 sw $zero, 64($t0) 97 sw $zero, 68($t0) 98 sw $zero, 72($t0) 99 sw $zero, 76($t0) 89 100 90 sw $zero, 80($ a0)91 sw $zero, 84($ a0)92 sw $zero, 88($ a0)93 sw $zero, 92($ a0)101 sw $zero, 80($t0) 102 sw $zero, 84($t0) 103 sw $zero, 88($t0) 104 sw $zero, 92($t0) 94 105 95 sw $zero, 96($ a0)96 sw $zero, 100($ a0)97 sw $zero, 104($ a0)98 sw $zero, 108($ a0)106 sw $zero, 96($t0) 107 sw $zero, 100($t0) 108 sw $zero, 104($t0) 109 sw $zero, 108($t0) 99 110 100 sw $zero, 112($ a0)101 sw $zero, 116($ a0)102 sw $zero, 120($ a0)103 sw $zero, 124($ a0)111 sw $zero, 112($t0) 112 sw $zero, 116($t0) 113 sw $zero, 120($t0) 114 sw $zero, 124($t0) 104 115 105 lui $ a1, 1116 lui $t1, 1 106 117 107 118 #ifdef MACHINE_msim … … 119 130 120 131 /* Record CPU presence */ 121 sll $ a2, $k1, 2122 addu $ a2, $a2, $a0123 sw $ a1, ($a2)132 sll $t2, $k1, 2 133 addu $t2, $t2, $t0 134 sw $t1, ($t2) 124 135 125 136 loop: … … 131 142 bsp: 132 143 /* Record CPU presence */ 133 sw $ a1, ($a0)144 sw $t1, ($t0) 134 145 135 146 /* Setup initial stack */ 136 147 la $sp, PA2KA(STACK_OFFSET) 137 148 149 /* a0=kargc, a1=kargv */ 138 150 j bootstrap 139 151 nop -
boot/arch/mips32/src/main.c
r77918b0 rdabaa83 45 45 static uint32_t *cpumap = (uint32_t *) PA2KA(CPUMAP_OFFSET); 46 46 47 void bootstrap( void)47 void bootstrap(int kargc, char **kargv) 48 48 { 49 49 version_print(); … … 79 79 } 80 80 81 str_cpy(bootinfo->bootargs, sizeof(bootinfo->bootargs), 82 (kargc > 1) ? kargv[1] : ""); 83 81 84 uintptr_t entry = check_kernel(kernel_start); 82 85 -
kernel/arch/mips32/include/arch/arch.h
r77918b0 rdabaa83 42 42 #define CPUMAP_MAX_RECORDS 32 43 43 #define BOOTINFO_TASK_NAME_BUFLEN 32 44 #define BOOTINFO_BOOTARGS_BUFLEN 256 44 45 45 46 extern size_t cpu_count; … … 66 67 uint32_t cpumap; 67 68 taskmap_t taskmap; 69 char bootargs[BOOTINFO_BOOTARGS_BUFLEN]; 68 70 } bootinfo_t; 69 71 -
kernel/arch/mips32/src/mach/malta/malta.c
r77918b0 rdabaa83 46 46 #include <sysinfo/sysinfo.h> 47 47 #include <log.h> 48 #include <str.h>49 48 50 49 static void malta_init(void); … … 116 115 NULL, NULL, tty_out_ptr); 117 116 #endif 118 119 const char *args = "console=devices/\\hw\\pci0\\00:0a.0\\com1\\a";120 str_ncpy(bargs, CONFIG_BOOT_ARGUMENTS_BUFLEN, args, str_length(args));121 117 } 122 118 -
kernel/arch/mips32/src/mips32.c
r77918b0 rdabaa83 107 107 #endif 108 108 109 str_cpy(bargs, CONFIG_BOOT_ARGUMENTS_BUFLEN, bootinfo->bootargs); 110 109 111 /* Initialize machine_ops pointer. */ 110 112 machine_ops_init(); -
tools/ew.py
r77918b0 rdabaa83 87 87 88 88 def malta_options(): 89 return '-cpu 4Kc '89 return '-cpu 4Kc -append "console=devices/\\hw\\pci0\\00:0a.0\\com1\\a"' 90 90 91 91 def find_firmware(name, environ_var, default_paths, extra_info=None):
Note:
See TracChangeset
for help on using the changeset viewer.