/SPARTAN/trunk/arch/amd64/include/asm.h |
---|
139,7 → 139,30 |
*/ |
static inline __u32 read_cr2(void) { __u64 v; __asm__ volatile ("movq %%cr2,%0" : "=r" (v)); return v; } |
/** Write CR3 |
* |
* Write value to CR3. |
* |
* @param v Value to be written. |
*/ |
static inline void write_cr3(__u64 v) { __asm__ volatile ("movq %0,%%cr3\n" : : "r" (v)); } |
/** Read CR3 |
* |
* Return value in CR3 |
* |
* @return Value read. |
*/ |
static inline __u32 read_cr3(void) { __u64 v; __asm__ volatile ("movq %%cr3,%0" : "=r" (v)); return v; } |
/** Set priority level low |
* |
* Enable interrupts and return previous |
* value of EFLAGS. |
*/ |
extern size_t interrupt_handler_size; |
extern void interrupt_handlers(void); |
/SPARTAN/trunk/arch/amd64/include/mm/memory_init.h |
---|
File deleted |
/SPARTAN/trunk/arch/amd64/Makefile.inc |
---|
27,4 → 27,7 |
arch/delay.S \ |
arch/amd64.c \ |
arch/bios/bios.c \ |
arch/interrupt.c |
arch/interrupt.c \ |
arch/mm/frame.c \ |
arch/mm/page.c \ |
arch/mm/tlb.c |
/SPARTAN/trunk/arch/amd64/src/boot/memmap.S |
---|
119,7 → 119,7 |
.long 0 |
e820counter: |
.byte 0xff |
.byte 0x0 |
e820table: |
.space (32*E820_RECORD_SIZE),0xff # space for 32 records, each E820_RECORD_SIZE bytes long |
.space (32*E820_RECORD_SIZE),0x0 # space for 32 records, each E820_RECORD_SIZE bytes long |
/SPARTAN/trunk/arch/amd64/src/mm/page.c |
---|
0,0 → 1,34 |
/* |
* Copyright (C) 2001-2004 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include <mm/page.h> |
#include <arch/mm/page.h> |
void page_arch_init(void) |
{ |
} |
/SPARTAN/trunk/arch/amd64/src/dummy.s |
---|
35,12 → 35,9 |
.global cpu_arch_init |
.global cpu_sleep |
.global cpu_print_report |
.global get_memory_size |
.global arch_late_init |
.global calibrate_delay_loop |
.global cpu_halt |
.global page_arch_init |
.global frame_arch_init |
.global dummy |
.global rdtsc |
.global reset_TS_flag |
48,7 → 45,13 |
.global interrupt_handler_size |
.global interrupt_handlers |
.global memory_print_map |
.global get_memory_size |
get_memory_size: |
movq $4*1024*1024, %rax |
ret |
interrupt_handler_size: |
interrupt_handlers: |
rdtsc: |
60,14 → 63,12 |
cpu_arch_init: |
cpu_sleep: |
cpu_print_report: |
get_memory_size: |
arch_late_init: |
calibrate_delay_loop: |
cpu_halt: |
page_arch_init: |
frame_arch_init: |
reset_TS_flag: |
fpu_init: |
memory_print_map: |
dummy: |
0: |