Changeset 8fc0d455 in mainline
- Timestamp:
- 2005-08-30T17:50:07Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9c0a9b3
- Parents:
- b45aa23
- Location:
- arch/amd64
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/_link.ld
rb45aa23 r8fc0d455 41 41 _hardcoded_kdata_size = kdata_end - kdata_start + (unmapped_kdata_end - unmapped_kdata_start); 42 42 _hardcoded_load_address = 0xffffffff80008000; 43 _ka_start = 0xffffffff80000000;44 43 } -
arch/amd64/include/barrier.h
rb45aa23 r8fc0d455 27 27 */ 28 28 29 #ifndef __ ppc_BARRIER_H__30 #define __ ppc_BARRIER_H__29 #ifndef __amd64_BARRIER_H__ 30 #define __amd64_BARRIER_H__ 31 31 32 32 #define CS_ENTER_BARRIER() __asm__ volatile ("" ::: "memory") -
arch/amd64/include/boot/memmap.h
rb45aa23 r8fc0d455 27 27 */ 28 28 29 #ifndef __ ia32_MEMMAP_H__30 #define __ ia32_MEMMAP_H__29 #ifndef __amd64_MEMMAP_H__ 30 #define __amd64_MEMMAP_H__ 31 31 32 32 -
arch/amd64/include/boot/memmapasm.h
rb45aa23 r8fc0d455 27 27 */ 28 28 29 #ifndef __ ia32_MEMMAPASM_H__30 #define __ ia32_MEMMAPASM_H__29 #ifndef __amd64_MEMMAPASM_H__ 30 #define __amd64_MEMMAPASM_H__ 31 31 32 32 -
arch/amd64/include/interrupt.h
rb45aa23 r8fc0d455 27 27 */ 28 28 29 #ifndef __ INTERRUPT_H__30 #define __ INTERRUPT_H__29 #ifndef __amd64_INTERRUPT_H__ 30 #define __amd64_INTERRUPT_H__ 31 31 32 32 extern void interrupt(void); -
arch/amd64/include/mm/frame.h
rb45aa23 r8fc0d455 32 32 #define FRAME_SIZE 4096 33 33 34 #ifndef __ASM__ 34 35 extern void frame_arch_init(void); 36 #endif 35 37 36 38 #endif -
arch/amd64/include/mm/page.h
rb45aa23 r8fc0d455 30 30 #define __amd64_PAGE_H__ 31 31 32 #include <mm/page.h> 33 #include <arch/mm/frame.h> 34 #include <arch/types.h> 35 #include <arch/mm/ptl.h> 32 #ifndef __ASM__ 33 # include <mm/page.h> 34 # include <arch/mm/frame.h> 35 # include <arch/types.h> 36 #endif 36 37 37 38 #define PAGE_SIZE FRAME_SIZE 39 40 #ifndef __ASM__ 41 # define KA2PA(x) (((__address) (x)) + 0x80000000) 42 # define PA2KA(x) (((__address) (x)) - 0x80000000) 43 #else 44 # define KA2PA(x) ((x) + 0x80000000) 45 # define PA2KA(x) ((x)) - 0x80000000) 46 #endif 38 47 39 48 #define PTL0_INDEX_ARCH(vaddr) 0 … … 65 74 #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) 66 75 76 #ifndef __ASM__ 67 77 extern void page_arch_init(void); 68 78 69 typedef __u32 pte_t; 79 typedef __u64 pte_t; 80 #endif 70 81 71 82 #endif -
arch/amd64/include/mm/ptl.h
rb45aa23 r8fc0d455 40 40 #define PTL_2MB_PAGE (1<<7) 41 41 42 #define KA2PA(x) (((__address) (x)) + 0x80000000)43 #define PA2KA(x) (((__address) (x)) - 0x80000000)44 45 42 46 43 #endif -
arch/amd64/include/pm.h
rb45aa23 r8fc0d455 27 27 */ 28 28 29 #ifndef __ PM_H__30 #define __ PM_H__29 #ifndef __amd64_PM_H__ 30 #define __amd64_PM_H__ 31 31 32 #include <arch/types.h> 33 #include <typedefs.h> 34 #include <arch/context.h> 32 #ifndef __ASM__ 33 # include <arch/types.h> 34 # include <typedefs.h> 35 # include <arch/context.h> 36 #endif 35 37 36 38 #define IDT_ITEMS 64 … … 42 44 #define UTEXT_DES 3 43 45 #define UDATA_DES 4 44 #define TSS_DES 5 46 #define KTEXT32_DES 5 47 #define TSS_DES 6 45 48 46 49 #define selector(des) ((des)<<3) … … 61 64 62 65 #define IO_MAP_BASE (104) 66 67 #ifndef __ASM__ 63 68 64 69 struct ptr_16_32 { … … 146 151 extern void tss_initialize(struct tss *t); 147 152 153 #endif /* __ASM__ */ 154 148 155 #endif -
arch/amd64/src/boot/boot.S
rb45aa23 r8fc0d455 1 1 # 2 # Copyright (C) 2001-2004 Jakub Jermar2 # Copyright (C) 2001-2004 Ondrej Palkovsky 3 3 # All rights reserved. 4 4 # … … 27 27 # 28 28 29 #define __ASM__ 30 31 #include <arch/mm/page.h> 29 32 #include <arch/mm/ptl.h> 33 #include <arch/pm.h> 30 34 31 35 #define START_STACK 0x7c00 … … 52 56 # call memmap_arch_init 53 57 54 mov $0x80000000, %eax58 movl $0x80000000, %eax 55 59 cpuid 56 60 cmp $0x80000000, %eax # any function > 80000000h? 57 61 jbe no_long_mode 58 mov $0x80000001, %eax # Extended function code 8000000162 movl $0x80000001, %eax # Extended function code 80000001 59 63 cpuid 60 64 bt $29, %edx # Test if long mode is supported. … … 69 73 movl %eax,%cr0 # switch to protected mode 70 74 71 jmpl $ 40, $now_in_prot75 jmpl $selector(KTEXT32_DES), $now_in_prot 72 76 73 77 no_long_mode: … … 79 83 now_in_prot: 80 84 # Set up stack & data descriptors 81 movw $ 16, %ax85 movw $selector(KDATA_DES), %ax 82 86 movw %ax, %ds 83 87 movw %ax, %fs … … 107 111 108 112 # At this point we are in compatibility mode 109 jmpl $ 8, $start64113 jmpl $selector(KTEXT_DES), $start64 110 114 111 115 .code64 … … 150 154 .global gdtr_inst 151 155 gdtr_inst: 152 .word 7*8 # GDT_ITEMS * 8153 .long gdt + 0x80000000156 .word selector(GDT_ITEMS) 157 .long KA2PA(gdt) 154 158 155 159 .global idtr_inst 156 160 idtr_inst: 157 161 .word 0 158 .long idt + 0x80000000162 .long KA2PA(idt)
Note:
See TracChangeset
for help on using the changeset viewer.