Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1813 → Rev 1812

/trunk/kernel/arch/xen32/include/hypercall.h
File deleted
/trunk/kernel/arch/xen32/include/boot/boot.h
35,36 → 35,10
#ifndef __xen32_BOOT_H__
#define __xen32_BOOT_H__
 
#define GUEST_CMDLINE 1024
#define START_INFO_SIZE 1104
#define BOOT_OFFSET 0x0000
#define TEMP_STACK_SIZE 0x400
 
#ifndef __ASM__
 
#include <arch/types.h>
 
typedef struct {
char magic[32]; /**< "xen-<version>-<platform>" */
unsigned long nr_pages; /**< Total pages allocated to this domain */
unsigned long shared_info; /**< Physical address of shared info struct */
uint32_t flags; /**< SIF_xxx flags */
unsigned long store_mfn; /**< Physical page number of shared page */
uint32_t store_evtchn; /**< Event channel for store communication */
unsigned long console_mfn; /**< Physical address of console page */
uint32_t console_evtchn; /**< Event channel for console messages */
unsigned long pt_base; /**< Virtual address of page directory */
unsigned long nr_pt_frames; /**< Number of bootstrap p.t. frames */
unsigned long mfn_list; /**< Virtual address of page-frame list */
unsigned long mod_start; /**< Virtual address of pre-loaded module */
unsigned long mod_len; /**< Size (bytes) of pre-loaded module */
int8_t cmd_line[GUEST_CMDLINE];
} start_info_t;
 
extern start_info_t start_info;
 
#endif
 
#endif
 
/** @}
*/
/trunk/kernel/arch/xen32/src/xen32.c
55,7 → 55,6
 
#include <arch/bios/bios.h>
 
#include <arch/boot/boot.h>
#include <arch/mm/memory_init.h>
#include <interrupt.h>
#include <arch/debugger.h>
63,8 → 62,6
#include <syscall/syscall.h>
#include <console/console.h>
 
start_info_t start_info;
 
void arch_pre_mm_init(void)
{
// pm_init();
/trunk/kernel/arch/xen32/src/boot/boot.S
34,7 → 34,7
.section __xen_guest
.ascii "GUEST_OS=HelenOS,"
.ascii "XEN_VER=xen-3.0,"
.ascii "HYPERCALL_PAGE=0x0002,"
.ascii "HYPERCALL_PAGE=0x2,"
.ascii "LOADER=generic,"
.ascii "PT_MODE_WRITABLE"
.byte 0
47,21 → 47,19
kernel_image_start:
cld
movl $kernel_stack, %esp # initialize stack pointer
# copy start_info (esi initialized by Xen)
movl $start_info, %edi
movl $START_INFO_SIZE >> 2, %ecx
cld
rep movsb
 
call main_bsp # never returns
 
cli
hlt
 
.global hypercall_page
.data
 
.org (0x0002 * PAGE_SIZE)
hypercall_page:
.space PAGE_SIZE
.align 4096
page_directory:
.space 4096, 0
 
kernel_stack_bottom:
.space TEMP_STACK_SIZE
kernel_stack:
/trunk/kernel/arch/xen32/src/mm/memory_init.c
34,12 → 34,11
 
#include <arch/mm/memory_init.h>
#include <arch/mm/page.h>
#include <arch/boot/boot.h>
#include <print.h>
 
size_t get_memory_size(void)
{
return start_info.nr_pages * PAGE_SIZE;
return 0;
}
 
void memory_print_map(void)