Changeset 4965a846 in mainline
- Timestamp:
- 2006-07-24T14:19:44Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5de522d
- Parents:
- d227101
- Location:
- kernel/arch/xen32
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/xen32/include/boot/boot.h
rd227101 r4965a846 36 36 #define __xen32_BOOT_H__ 37 37 38 #define GUEST_CMDLINE 1024 39 #define START_INFO_SIZE 1104 38 40 #define BOOT_OFFSET 0x0000 39 #define TEMP_STACK_SIZE 0x400 41 42 #ifndef __ASM__ 43 44 #include <arch/types.h> 45 46 typedef struct { 47 char magic[32]; /**< "xen-<version>-<platform>" */ 48 unsigned long nr_pages; /**< Total pages allocated to this domain */ 49 unsigned long shared_info; /**< Physical address of shared info struct */ 50 uint32_t flags; /**< SIF_xxx flags */ 51 unsigned long store_mfn; /**< Physical page number of shared page */ 52 uint32_t store_evtchn; /**< Event channel for store communication */ 53 unsigned long console_mfn; /**< Physical address of console page */ 54 uint32_t console_evtchn; /**< Event channel for console messages */ 55 unsigned long pt_base; /**< Virtual address of page directory */ 56 unsigned long nr_pt_frames; /**< Number of bootstrap p.t. frames */ 57 unsigned long mfn_list; /**< Virtual address of page-frame list */ 58 unsigned long mod_start; /**< Virtual address of pre-loaded module */ 59 unsigned long mod_len; /**< Size (bytes) of pre-loaded module */ 60 int8_t cmd_line[GUEST_CMDLINE]; 61 } start_info_t; 62 63 extern start_info_t start_info; 64 65 #endif 40 66 41 67 #endif -
kernel/arch/xen32/src/boot/boot.S
rd227101 r4965a846 35 35 .ascii "GUEST_OS=HelenOS," 36 36 .ascii "XEN_VER=xen-3.0," 37 .ascii "HYPERCALL_PAGE=0x 2,"37 .ascii "HYPERCALL_PAGE=0x0002," 38 38 .ascii "LOADER=generic," 39 39 .ascii "PT_MODE_WRITABLE" … … 48 48 kernel_image_start: 49 49 cld 50 movl $kernel_stack, %esp # initialize stack pointer51 50 51 # copy start_info (esi initialized by Xen) 52 53 movl $start_info, %edi 54 movl $START_INFO_SIZE >> 2, %ecx 55 cld 56 rep movsb 57 52 58 call main_bsp # never returns 53 59 … … 55 61 hlt 56 62 57 . data63 .global hypercall_page 58 64 59 .align 4096 60 page_directory: 61 .space 4096, 0 62 63 kernel_stack_bottom: 64 .space TEMP_STACK_SIZE 65 kernel_stack: 65 .org (0x0002 * PAGE_SIZE) 66 hypercall_page: 67 .space PAGE_SIZE -
kernel/arch/xen32/src/mm/memory_init.c
rd227101 r4965a846 35 35 #include <arch/mm/memory_init.h> 36 36 #include <arch/mm/page.h> 37 #include <arch/boot/boot.h> 37 38 #include <print.h> 38 39 39 40 size_t get_memory_size(void) 40 41 { 41 return 0;42 return start_info.nr_pages * PAGE_SIZE; 42 43 } 43 44 -
kernel/arch/xen32/src/xen32.c
rd227101 r4965a846 56 56 #include <arch/bios/bios.h> 57 57 58 #include <arch/boot/boot.h> 58 59 #include <arch/mm/memory_init.h> 59 60 #include <interrupt.h> … … 62 63 #include <syscall/syscall.h> 63 64 #include <console/console.h> 65 66 start_info_t start_info; 64 67 65 68 void arch_pre_mm_init(void)
Note:
See TracChangeset
for help on using the changeset viewer.