Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 914 → Rev 933

/boot/trunk/arch/ppc32/Makefile.inc
30,8 → 30,10
 
image.boot: kernel
make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNEL=../../../$(KERNELDIR)/kernel.bin
cp arch/$(ARCH)/loader/image.boot image.boot
 
clean: clean_kernel
make -C arch/$(ARCH)/loader clean
-rm -f image.boot
 
arch_distclean: distclean_kernel
/boot/trunk/arch/ppc32/loader/asm.S
32,7 → 32,7
.data
 
flush_buffer:
.space 4
.space (L1_CACHE_LINES * L1_CACHE_BYTES)
 
.text
 
184,9 → 184,9
blr
 
jump_to_kernel:
mfmsr r4
andis. r4, r4, (~MSR_DR | MSR_IR) >> 16
mtspr SPRN_SRR0, r3
mtspr SPRN_SRR1, r4
mfmsr r3
andi. r3, r3, ~(MSR_IR | MSR_DR)@l
mtspr SPRN_SRR1, r3
bl flush_instruction_cache
rfi
/boot/trunk/arch/ppc32/loader/main.c
38,7 → 38,7
 
void bootstrap(void)
{
printf("\nHelenOS PPC Bootloader\nKernel size %d bytes, load address %L\n", KERNEL_SIZE, KERNEL_LOAD_ADDRESS);
printf("\nHelenOS PPC Bootloader\nLoaded at %L\nKernel size %d bytes, load address %L\n", &start, KERNEL_SIZE, KERNEL_LOAD_ADDRESS);
void *addr = ofw_claim((void *) KERNEL_LOAD_ADDRESS, KERNEL_SIZE, 1);
if (addr == NULL) {
45,6 → 45,7
printf("Error: Unable to claim memory");
halt();
}
printf("Claimed memory at %L\n", addr);
memcpy(addr, KERNEL_START, KERNEL_SIZE);
printf("Booting the kernel...\n");
/boot/trunk/arch/ppc32/loader/main.h
31,6 → 31,7
 
extern int _binary_____________kernel_kernel_bin_start;
extern int _binary_____________kernel_kernel_bin_end;
extern void start(void);
extern void bootstrap(void);
 
#endif
/boot/trunk/arch/ppc32/loader/spr.h
29,8 → 29,8
#ifndef __SPR_H__
#define __SPR_H__
 
#define MSR_DR (1 << 27)
#define MSR_IR (1 << 26)
#define MSR_DR (1 << 4)
#define MSR_IR (1 << 5)
 
#define SPRN_SRR0 0x1a
#define SPRN_SRR1 0x1b
/boot/trunk/arch/ppc32/loader/Makefile
60,11 → 60,11
 
.PHONY: all clean depend
 
all: ../image.boot
all: image.boot
 
-include Makefile.depend
 
../image.boot: depend $(OBJECTS) kernel.o
image.boot: depend $(OBJECTS) kernel.o
$(LD) -no-check-sections -N -T _link.ld $(OBJECTS) kernel.o -o $@
 
depend:
71,7 → 71,7
-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
 
clean:
-rm -f $(OBJECTS) ../image.boot kernel.o Makefile.depend
-rm -f $(OBJECTS) image.boot kernel.o Makefile.depend
 
kernel.o: $(KERNEL)
$(OBJCOPY) -I binary -O elf32-powerpc -B powerpc $(KERNEL) $@