Clubcos  0.0.0
Clubcos - Clubc Operating System
 모두 데이타 구조 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 매크로 페이지들
memory_map.h
이 파일의 문서화 페이지로 가기
1 // Copyright (c) 2014, 임경현 (dlarudgus20)
2 // All rights reserved.
3 //
4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are met:
6 //
7 // * Redistributions of source code must retain the above copyright notice, this
8 // list of conditions and the following disclaimer.
9 //
10 // * Redistributions in binary form must reproduce the above copyright notice,
11 // this list of conditions and the following disclaimer in the documentation
12 // and/or other materials provided with the distribution.
13 //
14 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
18 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 
32 #ifndef MEMORY_MAP_H_
33 #define MEMORY_MAP_H_
34 
35 // 참조: misc/docs/memory_map.txt
36 // 이곳의 address는 특별한 언급이 없는 한 전부 logical address입니다.
37 
39 #define MINIMAL_REQUIRE_MEMORY 0x02000000 // 32MB
40 
42 #define KERNEL_BASE_ADDRESS 0xfe000000
43 
44 #define KERNEL_PHY_BASE_ADDR 0x00100000
45 
47 #define KERNEL_PAGE_DIR_NUM 0x3f8
48 
49 #define KERNEL_PAGE_DIR_ENT_COUNT (0x400 - KERNEL_PAGE_DIR_NUM)
50 
52 #define PAGE_DIRECTORY_ADDRESS 0xfe200000
53 
54 #define PAGE_TABLE_ADDRESS 0xfe201000
55 
57 #define PAGE_TABLE_OF_SHARED_MEMORY 0xbf800
58 
59 #define PAGE_TABLE_ADDR_OF_SHARED_MEMORY (PAGE_TABLE_ADDRESS + PAGE_TABLE_OF_SHARED_MEMORY * 4)
60 
62 #define GDT_TABLE_ADDRESS 0xfe601000
63 
64 #define IDT_TABLE_ADDRESS 0xfe611000
65 
67 #define TASKSTRUCT_ADDRESS 0xfe611800
68 
70 #define COSHELL_TASK_STACK_TOP 0xfe780000
71 
73 #define IDLE_TASK_STACK_TOP 0xfe800000
74 
75 
77 #define DYN_MEMORY_START_ADDRESS 0x00100000
78 
79 #define IOMAP_MEMORY_START_ADDRESS 0xbf800000
80 
82 #define DYN_MEMORY_METADATA_ADDR 0xfffcf000
83 
85 #define DYN_MEMORY_PHYSICAL_ADDRESS 0x00900000
86 
87 
93 static inline uint32_t ckDynMemLogicalToPhysical(uint32_t address)
94 {
96 }
102 static inline uint32_t ckDynMemPhysicalToLogical(uint32_t address)
103 {
105 }
106 
107 #endif /* MEMORY_MAP_H_ */
#define DYN_MEMORY_START_ADDRESS
동적 메모리 영역의 선형 시작 주소입니다.
Definition: memory_map.h:77
#define DYN_MEMORY_PHYSICAL_ADDRESS
동적 메모리 영역의 물리 시작 주소입니다.
Definition: memory_map.h:85