Subversion Repositories HelenOS-historic

Rev

Rev 934 | Rev 987 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 934 Rev 970
Line 26... Line 26...
26
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
#
27
#
28
 
28
 
29
#include <arch/asm/regname.h>
29
#include <arch/asm/regname.h>
30
#include <arch/asm/spr.h>
30
#include <arch/asm/spr.h>
-
 
31
#include <arch/boot/boot.h>
-
 
32
#include <arch/boot/memmap.h>
31
 
33
 
32
.section K_TEXT_START
34
.section K_TEXT_START
33
 
35
 
34
.global kernel_image_start
36
.global kernel_image_start
35
 
-
 
36
kernel_image_start:
37
kernel_image_start:
-
 
38
	
-
 
39
	# r10 contains physical address to memmap_t
-
 
40
	# from boot loader
-
 
41
	
-
 
42
	lis r4, 0x80000000@ha
-
 
43
	addi r4, r4, 0x80000000@l
-
 
44
	
-
 
45
	add r10, r10, r4
-
 
46
 
-
 
47
	lis r4, memmap@ha
-
 
48
	addi r4, r4, memmap@l    # r4 = memmap
-
 
49
	
-
 
50
	lwz r5, 0(r10)           # memmap->total
-
 
51
	stw r5, 0(r4)
-
 
52
	
-
 
53
	lwzu r5, 4(r10)           # memmap->count
-
 
54
	stwu r5, 4(r4)
-
 
55
	
-
 
56
	cmpwi r5, 0
-
 
57
	beq memmap_end
-
 
58
	
-
 
59
	mtctr r5
-
 
60
	memmap_loop:
-
 
61
	
-
 
62
		lwzu r5, 4(r10)           # memmap->zones[i].start
-
 
63
		stwu r5, 4(r4)
-
 
64
		
-
 
65
		lwzu r5, 4(r10)           # memmap->zones[i].size
-
 
66
		stwu r5, 4(r4)
-
 
67
	
-
 
68
	bdnz memmap_loop
-
 
69
	memmap_end:
-
 
70
	
37
	b main_bsp
71
	b main_bsp