Changeset 06e6805 in mainline
- Timestamp:
- 2006-03-14T11:08:44Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4bb4836d
- Parents:
- d1f8a87
- Location:
- arch/ppc32
- Files:
-
- 1 added
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
arch/ppc32/Makefile.inc
rd1f8a87 r06e6805 59 59 arch/$(ARCH)/src/debug/panic.s \ 60 60 arch/$(ARCH)/src/fpu_context.S \ 61 arch/$(ARCH)/src/boot/boot.S \ 61 62 arch/$(ARCH)/src/ppc32.c \ 62 63 arch/$(ARCH)/src/dummy.s \ 63 arch/$(ARCH)/src/start.S \64 64 arch/$(ARCH)/src/asm.S \ 65 65 arch/$(ARCH)/src/cpu/cpu.c \ -
arch/ppc32/include/mm/memory_init.h
rd1f8a87 r06e6805 34 34 size_t get_memory_size(void); 35 35 36 void memory_print_map(void); 37 36 38 #endif -
arch/ppc32/src/boot/boot.S
rd1f8a87 r06e6805 29 29 #include <arch/asm/regname.h> 30 30 #include <arch/asm/spr.h> 31 #include <arch/boot/boot.h> 32 #include <arch/boot/memmap.h> 31 33 32 34 .section K_TEXT_START 33 35 34 36 .global 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 35 46 36 kernel_image_start: 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 71 b main_bsp -
arch/ppc32/src/console.c
rd1f8a87 r06e6805 37 37 { 38 38 /* TODO: PCI detection etc. etc. - this is fine in PearPC for now */ 39 fb_init(0x 84000000, 800, 600, 4);39 fb_init(0xf0000000, 800, 600, 4); 40 40 } -
arch/ppc32/src/mm/memory_init.c
rd1f8a87 r06e6805 27 27 */ 28 28 29 #include <arch/boot/memmap.h> 29 30 #include <arch/mm/memory_init.h> 30 31 #include <typedefs.h> 32 #include <print.h> 33 34 memmap_t memmap; 35 31 36 32 37 size_t get_memory_size(void) 33 38 { 34 return 0;39 return memmap.total; 35 40 } 41 42 43 void memory_print_map(void) 44 { 45 count_t i; 46 47 for (i = 0; i < memmap.count; i++) 48 printf("base: %L size: %L\n", memmap.zones[i].start, memmap.zones[i].size); 49 } -
arch/ppc32/src/ppc32.c
rd1f8a87 r06e6805 30 30 #include <arch/console.h> 31 31 32 #include <arch/mm/memory_init.h> 33 32 34 void arch_pre_mm_init(void) 33 35 { … … 41 43 void arch_pre_smp_init(void) 42 44 { 45 memory_print_map(); 43 46 } 44 47
Note:
See TracChangeset
for help on using the changeset viewer.