/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 0xB0000000 |
#define VIDEORAM 0xA000000 |
void putchar(const char ch) |
{ |
/SPARTAN/trunk/arch/ia32/src/mm/page.c |
---|
72,6 → 72,7 |
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/src/pm.c |
---|
74,7 → 74,6 |
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/boot/boot.S |
---|
62,19 → 62,6 |
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. |
96,9 → 83,16 |
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_2 |
.section K_TEXT_START |
memmap_arch_init: |
/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("%s: PIC mode not supported\n", __FUNCTION__); |
printf("mps_init: PIC mode not supported\n"); |
return; |
} |
188,15 → 188,15 |
int i, cnt; |
if (ct->signature != CT_SIGNATURE) { |
printf("%s: bad ct->signature\n", __FUNCTION__); |
printf("configure_via_ct: bad ct->signature\n"); |
return 1; |
} |
if (!mps_ct_check()) { |
printf("%s: bad ct checksum\n", __FUNCTION__); |
printf("configure_via_ct: bad ct checksum\n"); |
return 1; |
} |
if (ct->oem_table) { |
printf("%s: ct->oem_table not supported\n", __FUNCTION__); |
printf("configure_via_ct: ct->oem_table not supported\n"); |
return 1; |
} |
251,7 → 251,7 |
* Something is wrong. Fallback to UP mode. |
*/ |
printf("%s: ct badness\n", __FUNCTION__); |
printf("configure_via_ct: ct badness\n"); |
return 1; |
} |
} |
268,7 → 268,7 |
/* |
* Not yet implemented. |
*/ |
printf("%s: not supported\n", __FUNCTION__); |
printf("configure_via_default: not supported\n"); |
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)) = 0; /* offset */ |
*((__u16 *) (frame + 0x467+2)) = 0x0; /* offset */ |
/* |
* Give back and unmap the borrowed frame. |
* Give back the borrowed frame and restore identity mapping for it. |
*/ |
map_page_to_frame(frame,0,PAGE_NOT_PRESENT,0); |
map_page_to_frame(frame,frame,PAGE_CACHEABLE,0); |
frame_free(frame); |
/* |
472,7 → 472,7 |
panic("couldn't allocate memory for GDT\n"); |
memcopy(gdt, gdt_new, GDT_ITEMS*sizeof(struct descriptor)); |
gdtr.base = KA2PA((__address) gdt_new); |
gdtr.base = (__address) gdt_new; |
if (l_apic_send_init_ipi(pr[i].l_apic_id)) { |
/* |
/SPARTAN/trunk/arch/ia32/src/smp/ap.S |
---|
30,7 → 30,7 |
# Init code for application processors. |
# |
.section K_TEXT_START_2 |
.text |
#ifdef __SMP__ |
47,6 → 47,7 |
ap_boot: |
.code16 |
cli |
xorw %ax,%ax |
movw %ax,%ds |
54,8 → 55,6 |
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 |
65,13 → 64,11 |
movw %ax,%ds |
movw %ax,%es |
movw %ax,%ss |
movl $(ctx-0x80000000),%eax # KA2PA((__address) &ctx) |
movl $ctx,%eax |
movl (%eax),%esp |
lidt idtr |
call map_kernel |
ljmp $KTEXT,$main_ap |
#endif /* __SMP__ */ |
/SPARTAN/trunk/arch/ia32/_link.ld |
---|
15,7 → 15,6 |
.unmapped 0x8000: AT (0x8000) { |
unmapped_ktext_start = .; |
*(K_TEXT_START); |
*(K_TEXT_START_2); |
unmapped_ktext_end = .; |
unmapped_kdata_start = .; |
*(K_DATA_START); |
/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 0x10000000 |
add dprinter printer 0xA000000 |