Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3152 → Rev 3153

/branches/dynload/boot/arch/sparc64/loader/asm.S
98,6 → 98,16
mov %o1, %o0
 
jump_to_kernel:
/*
* We have copied code and now we need to guarantee cache coherence.
* 1. Make sure that the code we have moved has drained to main memory.
* 2. Invalidate I-cache.
* 3. Flush instruction pipeline.
*/
call icache_flush
membar #StoreStore
flush %i7
 
mov %o0, %l1
mov %o1, %o0
mov %o2, %o1
105,6 → 115,24
jmp %l1 ! jump to kernel
nop
 
#define ICACHE_SIZE 8192
#define ICACHE_LINE_SIZE 32
#define ICACHE_SET_BIT (1 << 13)
#define ASI_ICACHE_TAG 0x67
 
# Flush I-cache
icache_flush:
set ((ICACHE_SIZE - ICACHE_LINE_SIZE) | ICACHE_SET_BIT), %g1
stxa %g0, [%g1] ASI_ICACHE_TAG
0: membar #Sync
subcc %g1, ICACHE_LINE_SIZE, %g1
bnz,pt %xcc, 0b
stxa %g0, [%g1] ASI_ICACHE_TAG
membar #Sync
retl
! SF Erratum #51
nop
 
.global ofw
ofw:
save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
/branches/dynload/boot/arch/sparc64/loader/ofwarch.c
69,18 → 69,23
uint64_t current_mid;
asm volatile ("ldxa [%1] %2, %0\n" : "=r" (current_mid) : "r" (0), "i" (ASI_UPA_CONFIG));
asm volatile ("ldxa [%1] %2, %0\n"
: "=r" (current_mid)
: "r" (0), "i" (ASI_UPA_CONFIG));
current_mid >>= UPA_CONFIG_MID_SHIFT;
current_mid &= UPA_CONFIG_MID_MASK;
 
int cpus;
for (cpus = 0; node != 0 && node != -1; node = ofw_get_peer_node(node), cpus++) {
if (ofw_get_property(node, "device_type", type_name, sizeof(type_name)) > 0) {
for (cpus = 0; node != 0 && node != -1; node = ofw_get_peer_node(node),
cpus++) {
if (ofw_get_property(node, "device_type", type_name,
sizeof(type_name)) > 0) {
if (strcmp(type_name, "cpu") == 0) {
uint32_t mid;
if (ofw_get_property(node, "upa-portid", &mid, sizeof(mid)) <= 0)
if (ofw_get_property(node, "upa-portid", &mid,
sizeof(mid)) <= 0)
continue;
if (current_mid != mid) {
87,9 → 92,10
/*
* Start secondary processor.
*/
(void) ofw_call("SUNW,start-cpu", 3, 1, NULL, node,
KERNEL_VIRTUAL_ADDRESS,
bootinfo.physmem_start | AP_PROCESSOR);
(void) ofw_call("SUNW,start-cpu", 3, 1,
NULL, node, KERNEL_VIRTUAL_ADDRESS,
bootinfo.physmem_start |
AP_PROCESSOR);
}
}
}
/branches/dynload/boot/arch/ia64/loader/gefi/HelenOS/Makefile
36,7 → 36,7
 
 
clean:
rm -f *.efi *~ *.o *.so
rm -f *.efi *~ *.o *.so *.map *.disass *.bin
 
.PHONY: install
 
/branches/dynload/boot/arch/ia64/loader/Makefile
118,7 → 118,8
-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
 
clean:
-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot image.map image.disasm Makefile.depend
-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot image.map image.disasm Makefile.depend ../../../../image.bin ../../../../hello.efi
make -C gefi clean
make -C gefi/HelenOS clean
 
_components.h _components.c _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) _link.ld.in
/branches/dynload/boot/arch/arm32/loader/boot.S
39,6 → 39,11
b bootstrap
 
jump_to_kernel:
#
# TODO
# Make sure that the I-cache, D-cache and memory are mutually coherent
# before passing control to the copied code.
#
bx r0
 
 
/branches/dynload/boot/arch/mips32/loader/asm.S
106,6 → 106,10
move $v0,$a1
 
jump_to_kernel:
# .word 0x39
#
# TODO
# Make sure that the I-cache, D-cache and memory are mutually coherent
# before passing control to the copied code.
#
j $a0
nop