Changeset 12f952e5 in mainline
- Timestamp:
- 2006-03-12T17:20:43Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a82500ce
- Parents:
- c102a5c8
- Location:
- arch/ppc32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ppc32/include/arch.h
rc102a5c8 r12f952e5 30 30 #define __ppc32_ARCH_H__ 31 31 32 #include <genarch/ofw/ofw.h>33 34 32 #endif -
arch/ppc32/include/asm/spr.h
rc102a5c8 r12f952e5 30 30 #define __ppc32_SPR_H__ 31 31 32 #define MSR_ DR (1<<27)33 #define MSR_ IR (1<<26)32 #define MSR_IR (1 << 4) 33 #define MSR_DR (1 << 5) 34 34 35 35 #define SPRN_SRR0 0x1a -
arch/ppc32/include/mm/memory_init.h
rc102a5c8 r12f952e5 33 33 34 34 size_t get_memory_size(void); 35 void preboot_read_config(void);36 35 37 36 #endif -
arch/ppc32/src/console.c
rc102a5c8 r12f952e5 28 28 29 29 #include <arch/console.h> 30 #include <genarch/ofw/ofw.h>31 30 #include <console/chardev.h> 32 31 #include <console/console.h> … … 38 37 { 39 38 /* TODO: PCI detection etc. etc. - this is fine in PearPC for now */ 40 fb_init(0x84000000, 800,600,4);39 fb_init(0x84000000, 800, 600, 4); 41 40 } -
arch/ppc32/src/mm/frame.c
rc102a5c8 r12f952e5 30 30 #include <arch/mm/memory_init.h> 31 31 #include <mm/frame.h> 32 #include <genarch/ofw/memory_init.h>33 32 34 33 void frame_arch_init(void) 35 34 { 36 ofw_init_zones();37 35 /* First is exception vector, second is 'implementation specific' */ 38 36 frame_mark_unavailable(0, 2); -
arch/ppc32/src/mm/memory_init.c
rc102a5c8 r12f952e5 28 28 29 29 #include <arch/mm/memory_init.h> 30 #include <genarch/ofw/memory_init.h>31 30 #include <typedefs.h> 32 33 void preboot_read_config(void)34 {35 ofw_init_memmap();36 }37 31 38 32 size_t get_memory_size(void) 39 33 { 40 return ofw_get_memory_size();34 return 0; 41 35 } -
arch/ppc32/src/start.S
rc102a5c8 r12f952e5 34 34 .global kernel_image_start 35 35 36 .org 0x037 /* 256 bytes of some data */38 /* exception table - must use 'ba' instructions for branches,39 * because it is elsewhere than the linker thinks40 */41 .space 409642 43 36 kernel_image_start: 44 /* Initialize OFW, might be needed before relocate_kernel? */45 lis r4, ofw@ha46 addi r4, r4, ofw@l47 stw r5, 0(r4)48 49 bl ofw_init50 bl preboot_read_config51 52 bl relocate_kernel53 __after_reloc:54 /* Set stack to some more meaningful value */55 /* TODO: This is hardcoded for PearPC, must be changed later */56 lis r1, 0x7057 37 b main_bsp 58 59 relocate_kernel:60 /* TODO: We _know_ that pearpc loads it to 8MB, and61 * but it should be really generic62 */63 lis r4, 0x80 /* r4 is where data was loaded - 8MB */64 65 bl to_real_mode66 /* Now we are in real mode, copy first block and jump to it,67 * we are running in the loaded kernel now68 * We still have in r3 physical load kernel address69 */70 71 b __after_reloc /* We know in pearpc we are ok, so return,72 * otherwise we should relocate kernel73 * here74 */75 76 77 78 79 /* Turn off page translation80 * - assume that physical-loaded address is in r481 */82 to_real_mode:83 mflr r084 85 lis r5, ktext_start@ha // Expected start of kernel86 addi r5, r5, ktext_start@l87 88 add r0, r4, r089 sub r0, r0, r5 // r0 now contains physical return address90 91 mfmsr r392 andis. r3, r3, (~MSR_DR | MSR_IR) >> 1693 mtspr SPRN_SRR0, r094 mtspr SPRN_SRR1, r395 sync // Really needed? RFI should do it as well?96 RFI97
Note:
See TracChangeset
for help on using the changeset viewer.