Rev 1233 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1233 | Rev 1239 | ||
---|---|---|---|
Line 101... | Line 101... | ||
101 | int dbgprintf(const char* format, ...); |
101 | int dbgprintf(const char* format, ...); |
102 | 102 | ||
Line 103... | Line 103... | ||
103 | /////////////////////////////////////////////////////////////////////////////// |
103 | /////////////////////////////////////////////////////////////////////////////// |
Line 104... | Line 104... | ||
104 | 104 | ||
105 | extern inline int GetScreenSize() |
105 | static inline int GetScreenSize() |
106 | { |
106 | { |
Line 107... | Line 107... | ||
107 | int retval; |
107 | int retval; |
108 | 108 | ||
109 | asm("int $0x40" |
109 | asm("int $0x40" |
110 | :"=a"(retval) |
110 | :"=a"(retval) |
111 | :"a"(61), "b"(1)); |
111 | :"a"(61), "b"(1)); |
Line 112... | Line 112... | ||
112 | return retval; |
112 | return retval; |
113 | } |
113 | } |
114 | 114 | ||
Line 115... | Line 115... | ||
115 | extern inline int GetScreenBpp() |
115 | static inline int GetScreenBpp() |
116 | { |
116 | { |
117 | int retval; |
117 | int retval; |
118 | 118 | ||
119 | asm("int $0x40" |
119 | asm("int $0x40" |
Line 120... | Line 120... | ||
120 | :"=a"(retval) |
120 | :"=a"(retval) |
121 | :"a"(61), "b"(2)); |
121 | :"a"(61), "b"(2)); |
122 | return retval; |
122 | return retval; |
Line 123... | Line 123... | ||
123 | } |
123 | } |
124 | 124 | ||
125 | extern inline int GetScreenPitch() |
125 | static inline int GetScreenPitch() |
126 | { |
126 | { |
127 | int retval; |
127 | int retval; |
Line 128... | Line 128... | ||
128 | 128 | ||
129 | asm("int $0x40" |
129 | asm("int $0x40" |
130 | :"=a"(retval) |
130 | :"=a"(retval) |
Line 131... | Line 131... | ||
131 | :"a"(61), "b"(3)); |
131 | :"a"(61), "b"(3)); |
132 | return retval; |
132 | return retval; |
133 | } |
133 | } |
134 | 134 | ||
135 | extern inline u32_t GetPgAddr(void *mem) |
135 | static inline u32_t GetPgAddr(void *mem) |
136 | { |
136 | { |
Line 137... | Line 137... | ||
137 | u32_t retval; |
137 | u32_t retval; |
138 | 138 | ||
139 | __asm__ __volatile__ ( |
139 | __asm__ __volatile__ ( |
140 | "call *__imp__GetPgAddr \n\t" |
140 | "call *__imp__GetPgAddr \n\t" |
141 | :"=eax" (retval) |
141 | :"=eax" (retval) |
142 | :"a" (mem) ); |
142 | :"a" (mem) ); |
143 | return retval; |
143 | return retval; |
144 | }; |
144 | }; |
145 | 145 | ||
Line 146... | Line 146... | ||
146 | extern inline void CommitPages(void *mem, u32_t page, u32_t size) |
146 | static inline void CommitPages(void *mem, u32_t page, u32_t size) |
147 | { |
147 | { |
148 | size = (size+4095) & ~4095; |
148 | size = (size+4095) & ~4095; |
149 | __asm__ __volatile__ ( |
149 | __asm__ __volatile__ ( |
150 | "call *__imp__CommitPages" |
150 | "call *__imp__CommitPages" |
151 | ::"a" (page), "b"(mem),"c"(size>>12) |
151 | ::"a" (page), "b"(mem),"c"(size>>12) |
152 | :"edx" ); |
152 | :"edx" ); |
153 | __asm__ __volatile__ ("":::"eax","ebx","ecx"); |
153 | __asm__ __volatile__ ("":::"eax","ebx","ecx"); |
154 | }; |
154 | }; |
Line 155... | Line 155... | ||
155 | 155 | ||
156 | extern inline void UnmapPages(void *mem, size_t size) |
156 | static inline void UnmapPages(void *mem, size_t size) |
157 | { |
157 | { |
158 | size = (size+4095) & ~4095; |
158 | size = (size+4095) & ~4095; |
159 | __asm__ __volatile__ ( |
159 | __asm__ __volatile__ ( |
Line 255... | Line 255... | ||
255 | return retval; |
255 | return retval; |
256 | }; |
256 | }; |
257 | */ |
257 | */ |
258 | 258 | ||
Line -... | Line 259... | ||
- | 259 | ||
- | 260 | static inline u32_t GetService(const char *name) |
|
- | 261 | { |
|
- | 262 | u32_t handle; |
|
- | 263 | ||
- | 264 | __asm__ __volatile__ |
|
- | 265 | ( |
|
- | 266 | "pushl %%eax \n\t" |
|
- | 267 | "call *__imp__GetService" |
|
- | 268 | :"=eax" (handle) |
|
- | 269 | :"a" (name) |
|
- | 270 | :"ebx","ecx","edx","esi", "edi" |
|
- | 271 | ); |
|
- | 272 | return handle; |
|
- | 273 | }; |
|
- | 274 | ||
259 | static inline u32_t safe_cli(void) |
275 | static inline u32_t safe_cli(void) |
260 | { |
276 | { |
261 | u32_t ifl; |
277 | u32_t ifl; |
262 | __asm__ __volatile__ ( |
278 | __asm__ __volatile__ ( |
263 | "pushf\n\t" |
279 | "pushf\n\t" |