/SPARTAN/trunk/arch/amd64/include/pm.h |
---|
116,6 → 116,11 |
__u64 base; |
} __attribute__ ((packed)); |
struct ptr_16_32 { |
__u16 limit; |
__u32 base; |
} __attribute__ ((packed)); |
struct tss { |
__u32 reserve1; |
__u64 rsp0; |
140,6 → 145,8 |
extern struct idescriptor idt[]; |
extern struct ptr_16_64 gdtr; |
extern struct ptr_16_32 bsp_bootstrap_gdtr; |
extern struct ptr_16_32 ap_bootstrap_gdtr; |
extern void pm_init(void); |
/SPARTAN/trunk/arch/amd64/src/boot/boot.S |
---|
66,10 → 66,7 |
jnc no_long_mode |
# Load gdtr, idtr |
lgdt gdtr_inst |
# Load idtr, but it contains mess - we should not get interrupt |
# anyway |
lidt idtr_inst |
lgdt bsp_bootstrap_gdtr |
movl %cr0,%eax |
orl $0x1,%eax |
154,11 → 151,11 |
.quad ptl_1 + (PTL_WRITABLE | PTL_PRESENT) |
.global gdtr_inst |
gdtr_inst: |
bsp_bootstrap_gdtr: |
.word gdtselector(GDT_ITEMS) |
.long KA2PA(gdt) |
.global idtr_inst |
idtr_inst: |
.word idtselector(IDT_ITEMS) |
.long KA2PA(idt) |
.global ap_bootstrap_gdtr |
ap_bootstrap_gdtr: |
.word gdtselector(GDT_ITEMS) |
.long KA2PA(gdt) |
/SPARTAN/trunk/arch/ia32/include/smp/mps.h |
---|
40,7 → 40,7 |
struct mps_fs { |
__u32 signature; |
struct mps_ct *configuration_table; |
__u32 configuration_table; |
__u8 length; |
__u8 revision; |
__u8 checksum; |
58,10 → 58,10 |
__u8 checksum; |
__u8 oem_id[8]; |
__u8 product_id[12]; |
__u8 *oem_table; |
__u32 oem_table; |
__u16 oem_table_size; |
__u16 entry_count; |
__u32 *l_apic; |
__u32 l_apic; |
__u16 ext_table_length; |
__u8 ext_table_checksum; |
__u8 xxx; |
89,7 → 89,7 |
__u8 io_apic_id; |
__u8 io_apic_version; |
__u8 io_apic_flags; |
__u32 *io_apic; |
__u32 io_apic; |
} __attribute__ ((packed)); |
struct __io_intr_entry { |
/SPARTAN/trunk/arch/ia32/src/smp/mps.c |
---|
161,7 → 161,7 |
void mps_init(void) |
{ |
__u8 *addr[2] = { NULL, (__u8 *) 0xf0000 }; |
__u8 *addr[2] = { NULL, (__u8 *) PA2KA(0xf0000) }; |
int i, j, length[2] = { 1024, 64*1024 }; |
172,7 → 172,7 |
* 2. search 64K starting at 0xf0000 |
*/ |
addr[0] = (__u8 *) (ebda ? ebda : 639 * 1024); |
addr[0] = (__u8 *) PA2KA(ebda ? ebda : 639 * 1024); |
for (i = 0; i < 2; i++) { |
for (j = 0; j < length[i]; j += 16) { |
if (*((__u32 *) &addr[i][j]) == FS_SIGNATURE && mps_fs_check(&addr[i][j])) { |
195,7 → 195,7 |
return; |
} |
ct = fs->configuration_table; |
ct = (struct mps_ct *)PA2KA((__address)fs->configuration_table); |
frame_not_free((__address) ct); |
config.cpu_count = configure_via_ct(); |
} |
223,7 → 223,7 |
return 1; |
} |
l_apic = ct->l_apic; |
l_apic = (__u32 *)PA2KA((__address)ct->l_apic); |
cnt = 0; |
cur = &ct->base_table[0]; |
333,7 → 333,7 |
return; |
} |
io_apic = ioa->io_apic; |
io_apic = (__u32 *)PA2KA((__address)ioa->io_apic); |
} |
//#define MPSCT_VERBOSE |
/SPARTAN/trunk/arch/ia32/src/smp/smp.c |
---|
62,8 → 62,11 |
} |
if (config.cpu_count > 1) { |
map_page_to_frame((__address) l_apic, (__address) l_apic, PAGE_NOT_CACHEABLE, 0); |
map_page_to_frame((__address) io_apic, (__address) io_apic, PAGE_NOT_CACHEABLE, 0); |
map_page_to_frame((__address)l_apic, KA2PA((__address)l_apic), |
PAGE_NOT_CACHEABLE, 0); |
map_page_to_frame((__address) io_apic, |
KA2PA((__address) io_apic), |
PAGE_NOT_CACHEABLE, 0); |
} |
/* |