Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 109 → Rev 110

/SPARTAN/trunk/doc/arch/mips
22,7 → 22,7
add rwm mainmem 0 16M load "kernel.bin"
add rom startmem 0x1fc00000 1k load "load.bin"
 
add dprinter printer 0xA000000
add dprinter printer 0x10000000
 
 
 
/SPARTAN/trunk/src/Makefile.config
5,7 → 5,7
#ARCH=amd64
 
# Support for symetric multiprocessors
#SMP=__SMP__
SMP=__SMP__
 
# Improved support for hyperthreading
HT=__HT__
14,7 → 14,7
#NDEBUG=__NDEBUG__
 
# Deadlock detection support for spinlocks.
DEBUG_SPINLOCK=DEBUG_SPINLOCK
#DEBUG_SPINLOCK=DEBUG_SPINLOCK
 
# Uncomment if you want to compile in userspace support
#USERSPACE=__USERSPACE__
/SPARTAN/trunk/arch/mips/src/putchar.c
30,7 → 30,7
#include <arch/types.h>
#include <arch/cp0.h>
 
#define VIDEORAM 0xA000000
#define VIDEORAM 0xB0000000
 
void putchar(const char ch)
{
/SPARTAN/trunk/arch/ia32/src/pm.c
74,6 → 74,7
d->base_0_15 = KA2PA(base) & 0xffff;
d->base_16_23 = (KA2PA(base) >> 16) & 0xff;
d->base_24_31 = (KA2PA(base) >> 24) & 0xff;
 
}
 
void gdt_setlimit(struct descriptor *d, __u32 limit)
/SPARTAN/trunk/arch/ia32/src/smp/mps.c
158,7 → 158,7
 
if (fs->config_type == 0 && fs->configuration_table) {
if (fs->mpfib2 >> 7) {
printf("mps_init: PIC mode not supported\n");
printf("%s: PIC mode not supported\n", __FUNCTION__);
return;
}
 
188,15 → 188,15
int i, cnt;
if (ct->signature != CT_SIGNATURE) {
printf("configure_via_ct: bad ct->signature\n");
printf("%s: bad ct->signature\n", __FUNCTION__);
return 1;
}
if (!mps_ct_check()) {
printf("configure_via_ct: bad ct checksum\n");
printf("%s: bad ct checksum\n", __FUNCTION__);
return 1;
}
if (ct->oem_table) {
printf("configure_via_ct: ct->oem_table not supported\n");
printf("%s: ct->oem_table not supported\n", __FUNCTION__);
return 1;
}
251,7 → 251,7
* Something is wrong. Fallback to UP mode.
*/
printf("configure_via_ct: ct badness\n");
printf("%s: ct badness\n", __FUNCTION__);
return 1;
}
}
268,7 → 268,7
/*
* Not yet implemented.
*/
printf("configure_via_default: not supported\n");
printf("%s: not supported\n", __FUNCTION__);
return 1;
}
 
425,12 → 425,12
* Set the warm-reset vector to the real-mode address of 4K-aligned ap_boot()
*/
*((__u16 *) (frame + 0x467+0)) = ((__address) ap_boot) >> 4; /* segment */
*((__u16 *) (frame + 0x467+2)) = 0x0; /* offset */
*((__u16 *) (frame + 0x467+2)) = 0; /* offset */
/*
* Give back the borrowed frame and restore identity mapping for it.
* Give back and unmap the borrowed frame.
*/
map_page_to_frame(frame,frame,PAGE_CACHEABLE,0);
map_page_to_frame(frame,0,PAGE_NOT_PRESENT,0);
frame_free(frame);
 
/*
472,8 → 472,8
panic("couldn't allocate memory for GDT\n");
 
memcopy(gdt, gdt_new, GDT_ITEMS*sizeof(struct descriptor));
gdtr.base = (__address) gdt_new;
 
gdtr.base = KA2PA((__address) gdt_new);
if (l_apic_send_init_ipi(pr[i].l_apic_id)) {
/*
* There may be just one AP being initialized at
/SPARTAN/trunk/arch/ia32/src/smp/ap.S
30,7 → 30,7
# Init code for application processors.
#
 
.text
.section K_TEXT_START_2
 
#ifdef __SMP__
 
47,7 → 47,6
ap_boot:
.code16
cli
 
xorw %ax,%ax
movw %ax,%ds
 
55,6 → 54,8
movl %cr0,%eax
orl $1,%eax
movl %eax,%cr0
jmp 0f
0:
ljmp $KTEXT,$jump_to_kernel
 
# this is where the AP enters the kernel space
64,11 → 65,13
movw %ax,%ds
movw %ax,%es
movw %ax,%ss
movl $ctx,%eax
movl $(ctx-0x80000000),%eax # KA2PA((__address) &ctx)
movl (%eax),%esp
 
lidt idtr
 
call map_kernel
 
ljmp $KTEXT,$main_ap
 
#endif /* __SMP__ */
/SPARTAN/trunk/arch/ia32/src/smp/apic.c
208,7 → 208,7
for (i = 0; i<2; i++) {
lo = l_apic[ICRlo] & ICRloClear;
lo |= ((__address) ap_boot) / 4096; /* calculate the reset vector */
l_apic[ICRlo] = lo | DLVRMODE_STUP | DESTMODE_PHYS | LEVEL_ASSERT | SHORTHAND_DEST | TRGRMODE_LEVEL;
l_apic[ICRlo] = lo | DLVRMODE_STUP | DESTMODE_PHYS | LEVEL_ASSERT | SHORTHAND_DEST | TRGRMODE_LEVEL;
delay(200);
}
}
/SPARTAN/trunk/arch/ia32/src/boot/boot.S
62,6 → 62,19
 
lidt idtr
 
call map_kernel
 
movl $_hardcoded_ktext_size, hardcoded_ktext_size
movl $_hardcoded_kdata_size, hardcoded_kdata_size
movl $_hardcoded_load_address, hardcoded_load_address
 
call main_bsp # never returns
 
cli
hlt
 
.global map_kernel
map_kernel:
#
# Here we setup mapping for both the unmapped and mapped sections of the kernel.
# For simplicity, we set only one 4M page for 0x00000000 and one for 0x80000000.
83,16 → 96,9
movl %cr0, %ebx
orl $(1<<31), %ebx
movl %ebx, %cr0
ret
 
movl $_hardcoded_ktext_size, hardcoded_ktext_size
movl $_hardcoded_kdata_size, hardcoded_kdata_size
movl $_hardcoded_load_address, hardcoded_load_address
 
call main_bsp # never returns
 
cli
hlt
 
.section K_DATA_START
 
.align 4096
/SPARTAN/trunk/arch/ia32/src/boot/memmap.S
36,7 → 36,7
.global memmap_arch_init
 
.code16
.section K_TEXT_START
.section K_TEXT_START_2
 
memmap_arch_init:
/SPARTAN/trunk/arch/ia32/src/mm/page.c
72,7 → 72,6
cpu_write_dba(KA2PA(dba));
}
else {
 
/*
* Application processors need to create their own view of the
* virtual address space. Because of that, each AP copies
/SPARTAN/trunk/arch/ia32/_link.ld
15,6 → 15,7
.unmapped 0x8000: AT (0x8000) {
unmapped_ktext_start = .;
*(K_TEXT_START);
*(K_TEXT_START_2);
unmapped_ktext_end = .;
unmapped_kdata_start = .;
*(K_DATA_START);