⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mem_mgr.lst

📁 au1200下的boot代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
GAS LISTING /tmp/cc4WPeaK.s 			page 1   1              		.section .mdebug.abi32   2              		.previous   3              		.section	.debug_abbrev,"",@progbits   4              	$Ldebug_abbrev0:   5              		.section	.debug_info,"",@progbits   6              	$Ldebug_info0:   7              		.section	.debug_line,"",@progbits   8              	$Ldebug_line0:   9 0000 3C010000 		.text   9      02009A00    9      00000101    9      FB0E0A00    9      01010101   10              	$Ltext0:  11              		.section	.rodata.str1.4,"aMS",@progbits,1  12              		.align	2  13              	$LC0:  14 0000 0A0A     		.ascii	"\n\n"  15 0002 44756D70 		.ascii	"Dumping list %08X\000"  15      696E6720   15      6C697374   15      20253038   15      5800  16              		.align	2  17              	$LC1:  18 0014 0A       		.ascii	"\n"  19 0015 4E6F6465 		.ascii	"Node: %08X\000"  19      3A202530   19      385800  20              		.align	2  21              	$LC2:  22 0020 0A       		.ascii	"\n"  23 0021 0973697A 		.ascii	"\tsize:%d inuse:%d next:%08X prev:%08X context:%08X\000"  23      653A2564   23      20696E75   23      73653A25   23      64206E65   24              		.text  25              		.align	2  26              		.ent	dump  27              		.type	dump, @function  28              	dump:  29              	$LFB2:  30              		.file 1 "/mnt/hgfs/boot/booter/source/mem_mgr.c"   1:/mnt/hgfs/boot/booter/source/mem_mgr.c **** /*********************************************************************   2:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *   3:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  * Copyright:   4:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *	Advanced Micro Devices, AMD. All Rights Reserved.     5:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  You are hereby granted a copyright license to use, modify, and   6:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  distribute the SOFTWARE so long as this entire notice is   7:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  retained without alteration in any modified and/or redistributed   8:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  versions, and that such modified versions are clearly identified   9:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  as such. No licenses are granted by implication, estoppel or  10:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  otherwise under any patents or trademarks of AMD. This   11:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  software is provided on an "AS IS" basis and without warranty.  12:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  13:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  To the maximum extent permitted by applicable law, AMD GAS LISTING /tmp/cc4WPeaK.s 			page 2  14:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING   15:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR  16:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH REGARD TO THE   17:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) AND ANY   18:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  ACCOMPANYING WRITTEN MATERIALS.  19:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *   20:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  To the maximum extent permitted by applicable law, IN NO EVENT  21:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  SHALL AMD BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING   22:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS   23:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY  24:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  LOSS) ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.     25:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *   26:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  AMD assumes no responsibility for the maintenance and support  27:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  of this software.  28:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *********************************************************************  29:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  30:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  * File:		mem_mgr.c  31:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  32:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  * Purpose:		Memory Manager routines  33:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  34:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  $RCSfile: mem_mgr.c,v $  35:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  $Author: cgray $  36:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  $Revision: 1.4 $  37:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  $Date: 2004/02/16 20:48:58 $  38:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  *  39:/mnt/hgfs/boot/booter/source/mem_mgr.c **** ***********************************************************************/  40:/mnt/hgfs/boot/booter/source/mem_mgr.c **** #include "example.h"  41:/mnt/hgfs/boot/booter/source/mem_mgr.c **** #include "mem_mgr.h"  42:/mnt/hgfs/boot/booter/source/mem_mgr.c ****   43:/mnt/hgfs/boot/booter/source/mem_mgr.c **** //#define DEBUG  44:/mnt/hgfs/boot/booter/source/mem_mgr.c ****   45:/mnt/hgfs/boot/booter/source/mem_mgr.c **** /************************************************************************  46:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 						Structures  47:/mnt/hgfs/boot/booter/source/mem_mgr.c **** ************************************************************************/  48:/mnt/hgfs/boot/booter/source/mem_mgr.c **** typedef struct   49:/mnt/hgfs/boot/booter/source/mem_mgr.c **** {  50:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	unsigned long	size;  51:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	unsigned long	inuse;  52:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	void			*next,*prev;  53:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	void			*context;  54:/mnt/hgfs/boot/booter/source/mem_mgr.c **** } BUFFER, *PBUFFER;  55:/mnt/hgfs/boot/booter/source/mem_mgr.c ****   56:/mnt/hgfs/boot/booter/source/mem_mgr.c **** /************************************************************************  57:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 						Global Variables  58:/mnt/hgfs/boot/booter/source/mem_mgr.c **** ************************************************************************/  59:/mnt/hgfs/boot/booter/source/mem_mgr.c ****   60:/mnt/hgfs/boot/booter/source/mem_mgr.c **** /************************************************************************  61:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 						SOURCE  62:/mnt/hgfs/boot/booter/source/mem_mgr.c **** ************************************************************************/  63:/mnt/hgfs/boot/booter/source/mem_mgr.c **** static void dump( void *list )  64:/mnt/hgfs/boot/booter/source/mem_mgr.c **** {  31              		.loc 1 64 0  32              		.frame	$sp,40,$31		# vars= 0, regs= 4/0, args= 24, gp= 0  33              		.mask	0x80070000,-4  34              		.fmask	0x00000000,0  35              		.set	noreorder  36              		.set	nomacroGAS LISTING /tmp/cc4WPeaK.s 			page 3  37              		  38 0000 D8FFBD27 		addiu	$sp,$sp,-40  39              	$LCFI0:  40 0004 1800B0AF 		sw	$16,24($sp)  41              	$LCFI1:  65:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	PBUFFER plist = list;  42              		.loc 1 65 0  43 0008 21808000 		move	$16,$4  66:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	  67:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	printf("\n\nDumping list %08X", list );  44              		.loc 1 67 0  45 000c 0000043C 		lui	$4,%hi($LC0)  46 0010 00008424 		addiu	$4,$4,%lo($LC0)  47 0014 21280002 		move	$5,$16  48              		.loc 1 64 0  49 0018 2400BFAF 		sw	$31,36($sp)  50              	$LCFI2:  51 001c 2000B2AF 		sw	$18,32($sp)  52              	$LCFI3:  53              		.loc 1 64 0  54              	$LCFI4:  55              		.loc 1 67 0  56 0020 0000000C 		jal	printf  57 0024 1C00B1AF 		sw	$17,28($sp)  58              	  68:/mnt/hgfs/boot/booter/source/mem_mgr.c ****   69:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	while ( plist && plist )  70:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	{  71:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 		printf("\nNode: %08X", plist);  72:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 		printf("\n\tsize:%d inuse:%d next:%08X prev:%08X context:%08X",   73:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 			plist->size, plist->inuse, plist->next, plist->prev, plist->context );  74:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 		plist = plist->next;  59              		.loc 1 74 0  60 0028 11000012 		beq	$16,$0,$L6  61 002c 0000123C 		lui	$18,%hi($LC1)  62              	  63 0030 0000113C 		lui	$17,%hi($LC2)  64              		.loc 1 71 0  65 0034 21280002 		move	$5,$16  66              	$L8:  67 0038 0000000C 		jal	printf  68 003c 00004426 		addiu	$4,$18,%lo($LC1)  69              	  70              		.loc 1 72 0  71 0040 0C00028E 		lw	$2,12($16)  72 0044 0000058E 		lw	$5,0($16)  73 0048 0400068E 		lw	$6,4($16)  74 004c 0800078E 		lw	$7,8($16)  75 0050 1000A2AF 		sw	$2,16($sp)  76 0054 1000038E 		lw	$3,16($16)  77 0058 00002426 		addiu	$4,$17,%lo($LC2)  78 005c 0000000C 		jal	printf  79 0060 1400A3AF 		sw	$3,20($sp)  80              	  81              		.loc 1 74 0  82 0064 0800108E 		lw	$16,8($16)  83              		.loc 1 71 0GAS LISTING /tmp/cc4WPeaK.s 			page 4  84              		.loc 1 74 0  85 0068 F3FF0016 		bne	$16,$0,$L8  86 006c 21280002 		move	$5,$16  87              	  88              	$L6:  89 0070 2400BF8F 		lw	$31,36($sp)  90 0074 2000B28F 		lw	$18,32($sp)  91 0078 1C00B18F 		lw	$17,28($sp)  92 007c 1800B08F 		lw	$16,24($sp)  93 0080 0800E003 		j	$31  94 0084 2800BD27 		addiu	$sp,$sp,40  95              	  96              		.set	macro  97              		.set	reorder  98              	$LFE2:  99              		.end	dump 100              		.align	2 101              		.ent	MemSet 102              		.type	MemSet, @function 103              	MemSet: 104              	$LFB3:  75:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	}  76:/mnt/hgfs/boot/booter/source/mem_mgr.c **** }  77:/mnt/hgfs/boot/booter/source/mem_mgr.c ****   78:/mnt/hgfs/boot/booter/source/mem_mgr.c **** static void MemSet(void* dest, int bytes, char value)
  79:/mnt/hgfs/boot/booter/source/mem_mgr.c **** {
 105              		.loc 1 79 0 106              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 107              		.mask	0x00000000,0 108              		.fmask	0x00000000,0 109              		.set	noreorder 110              		.set	nomacro 111              		 112              		.loc 1 79 0 113 0088 00360600 		sll	$6,$6,24 114 008c 03360600 		sra	$6,$6,24  80:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	int i;
  81:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	char* charDest = (char*) dest;
  82:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	
  83:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	for(i = 0; i < bytes; ++i)
 115              		.loc 1 83 0 116 0090 0600A018 		blez	$5,$L16 117 0094 21380000 		move	$7,$0 118              	 119              	$L13:  84:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 		charDest[i] = value;
 120              		.loc 1 84 0 121 0098 21188700 		addu	$3,$4,$7 122              		.loc 1 83 0 123 009c 0100E724 		addiu	$7,$7,1 124 00a0 2A10E500 		slt	$2,$7,$5 125              		.loc 1 84 0 126              		.loc 1 83 0 127 00a4 FCFF4014 		bne	$2,$0,$L13 128 00a8 000066A0 		sb	$6,0($3) 129              	 130              	$L16:GAS LISTING /tmp/cc4WPeaK.s 			page 5 131 00ac 0800E003 		j	$31 132 00b0 00000000 		nop 133              	 134              		.set	macro 135              		.set	reorder 136              	$LFE3: 137              		.end	MemSet 138              		.align	2 139              		.ent	init 140              		.type	init, @function 141              	init: 142              	$LFB4:  85:/mnt/hgfs/boot/booter/source/mem_mgr.c **** }
  86:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 
  87:/mnt/hgfs/boot/booter/source/mem_mgr.c **** static void * init( void * mem, unsigned long size )  88:/mnt/hgfs/boot/booter/source/mem_mgr.c **** { 143              		.loc 1 88 0 144              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 145              		.mask	0x00000000,0 146              		.fmask	0x00000000,0 147              		.set	noreorder 148              		.set	nomacro 149              		 150              		.loc 1 88 0 151 00b4 21108000 		move	$2,$4  89:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	PBUFFER plist = (PBUFFER)mem;  90:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	PBUFFER tmp;  91:/mnt/hgfs/boot/booter/source/mem_mgr.c ****   92:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	/* The first data entry willnever change */  93:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	tmp 			= mem;  94:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	plist->size 	= size - sizeof(BUFFER);  95:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	plist->context 	= NULL;  96:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	plist->inuse 	= 1;  97:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	plist->prev 	= NULL;  98:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	plist->next 	= (PBUFFER)((uint32)plist + sizeof(BUFFER));  99:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	 100:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	plist = plist->next; 101:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  102:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	/* All entries will occur after this one */ 103:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	plist->size		= size - (sizeof(BUFFER)*2); 152              		.loc 1 103 0 153 00b8 D8FFA624 		addiu	$6,$5,-40 154              		.loc 1 98 0 155 00bc 14008424 		addiu	$4,$4,20 156              		.loc 1 94 0 157 00c0 ECFFA524 		addiu	$5,$5,-20 158              		.loc 1 96 0 159 00c4 01000324 		li	$3,1			# 0x1 160 00c8 040043AC 		sw	$3,4($2) 161              		.loc 1 95 0 162 00cc 100040AC 		sw	$0,16($2) 163              		.loc 1 97 0 164 00d0 0C0040AC 		sw	$0,12($2) 165              		.loc 1 98 0 166 00d4 080044AC 		sw	$4,8($2) 167              		.loc 1 94 0 168 00d8 000045AC 		sw	$5,0($2)GAS LISTING /tmp/cc4WPeaK.s 			page 6 169              		.loc 1 103 0 170 00dc 140046AC 		sw	$6,20($2) 104:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	plist->prev		= tmp; 105:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	plist->next		= NULL; 106:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	plist->inuse 	= 0; 107:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	plist->context  = NULL; 171              		.loc 1 107 0 172 00e0 100080AC 		sw	$0,16($4) 173              		.loc 1 104 0 174 00e4 0C0082AC 		sw	$2,12($4) 175              		.loc 1 105 0 176 00e8 080080AC 		sw	$0,8($4) 177              		.loc 1 106 0 108:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  109:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	return mem; 110:/mnt/hgfs/boot/booter/source/mem_mgr.c **** } 178              		.loc 1 110 0 179 00ec 0800E003 		j	$31 180 00f0 040080AC 		sw	$0,4($4) 181              	 182              		.set	macro 183              		.set	reorder 184              	$LFE4: 185              		.end	init 186              		.align	2 187              		.ent	destroy 188              		.type	destroy, @function 189              	destroy: 190              	$LFB5: 111:/mnt/hgfs/boot/booter/source/mem_mgr.c ****  112:/mnt/hgfs/boot/booter/source/mem_mgr.c **** static void destroy( void * mem ) 113:/mnt/hgfs/boot/booter/source/mem_mgr.c **** { 191              		.loc 1 113 0 192              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 193              		.mask	0x00000000,0 194              		.fmask	0x00000000,0 195              		.set	noreorder 196              		.set	nomacro 197              		 114:/mnt/hgfs/boot/booter/source/mem_mgr.c **** 	PBUFFER	list = (PBUFFER)mem;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -