Subversion Repositories Kolibri OS

Rev

Rev 2169 | Rev 3031 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2169 Rev 2967
Line 35... Line 35...
35
u32_t  IMPORT  GetTimerTicks(void)__asm__("GetTimerTicks");
35
u32_t  IMPORT  GetTimerTicks(void)__asm__("GetTimerTicks");
Line 36... Line 36...
36
 
36
 
37
addr_t STDCALL AllocPage(void)__asm__("AllocPage");
37
addr_t STDCALL AllocPage(void)__asm__("AllocPage");
-
 
38
addr_t STDCALL AllocPages(count_t count)__asm__("AllocPages");
-
 
39
void   IMPORT  __attribute__((regparm(1)))
-
 
40
               FreePage(addr_t page)__asm__("FreePage");
Line 38... Line 41...
38
addr_t STDCALL AllocPages(count_t count)__asm__("AllocPages");
41
 
Line 39... Line 42...
39
 
42
 
Line 49... Line 52...
49
 
52
 
Line 50... Line 53...
50
addr_t IMPORT  GetStackBase(void)__asm__("GetStackBase");
53
addr_t IMPORT  GetStackBase(void)__asm__("GetStackBase");
51
u32_t  IMPORT  GetPid(void)__asm__("GetPid");
54
u32_t  IMPORT  GetPid(void)__asm__("GetPid");
Line -... Line 55...
-
 
55
 
-
 
56
u32 STDCALL TimerHs(u32 delay, u32 interval,
-
 
57
                    void *fn, void *data)asm("TimerHs");
52
 
58
 
Line 53... Line 59...
53
///////////////////////////////////////////////////////////////////////////////
59
///////////////////////////////////////////////////////////////////////////////
54
 
60
 
Line 83... Line 89...
83
 
89
 
Line 84... Line 90...
84
#define pciWriteLong(tag, reg, val) \
90
#define pciWriteLong(tag, reg, val) \
85
        PciWrite32(PCI_BUS_FROM_TAG(tag),PCI_DFN_FROM_TAG(tag),(reg),(val))
91
        PciWrite32(PCI_BUS_FROM_TAG(tag),PCI_DFN_FROM_TAG(tag),(reg),(val))
Line 86... Line -...
86
 
-
 
87
 
92
 
Line 88... Line 93...
88
///////////////////////////////////////////////////////////////////////////////
93
///////////////////////////////////////////////////////////////////////////////
89
 
94
 
Line 123... Line 128...
123
     ::"a"(evh.handle),"b"(evh.euid));
128
     ::"a"(evh.handle),"b"(evh.euid));
124
     __asm__ __volatile__ ("":::"ebx","ecx","edx","esi","edi");
129
     __asm__ __volatile__ ("":::"ebx","ecx","edx","esi","edi");
125
};
130
};
126
 
131
 
Line -... Line 132...
-
 
132
static inline void DestroyEvent(evhandle_t evh)
-
 
133
{
-
 
134
     __asm__ __volatile__ (
-
 
135
     "call *__imp__DestroyEvent"
-
 
136
     ::"a"(evh.handle),"b"(evh.euid));
-
 
137
     __asm__ __volatile__ ("":::"ebx","ecx","edx","esi","edi");
-
 
138
};
-
 
139
 
127
static inline u32_t GetEvent(kevent_t *ev)
140
static inline u32_t GetEvent(kevent_t *ev)
128
{
141
{
129
    u32_t  handle;
142
    u32_t  handle;
Line 130... Line 143...
130
 
143
 
Line 173... Line 186...
173
     u32_t retval;
186
     u32_t retval;
174
 
187
 
Line 175... Line 188...
175
     __asm__ __volatile__ (
188
     __asm__ __volatile__ (
176
     "call *__imp__GetPgAddr \n\t"
189
     "call *__imp__GetPgAddr \n\t"
177
     :"=eax" (retval)
190
     :"=a" (retval)
178
     :"a" (mem) );
191
     :"a" (mem) );
179
     return retval;
192
     return retval;
180
};
193
};
Line 181... Line 194...
181
 
194
 
Line 214... Line 227...
214
 
227
 
Line 215... Line 228...
215
static inline void udelay(u32_t delay)
228
static inline void udelay(u32_t delay)
216
{
229
{
217
    if(!delay) delay++;
230
    if(!delay) delay++;
218
    delay*= 500;
231
    delay*= 100;
Line 219... Line 232...
219
 
232
 
220
    while(delay--)
233
    while(delay--)
221
    {
234
    {
222
        __asm__ __volatile__(
235
        __asm__ __volatile__(
Line 296... Line 309...
296
    __asm__ __volatile__
309
    __asm__ __volatile__
297
    (
310
    (
298
     "pushl %%eax \n\t"
311
     "pushl %%eax \n\t"
299
     "call *__imp__GetService"
312
     "call *__imp__GetService"
300
     :"=eax" (handle)
313
     :"=a" (handle)
301
     :"a" (name)
314
     :"a" (name)
302
     :"ebx","ecx","edx","esi", "edi"
315
     :"ebx","ecx","edx","esi", "edi"
303
  );
316
  );
304
  return handle;
317
  return handle;
305
};
318
};
Line 415... Line 428...
415
int drm_order(unsigned long size);
428
int drm_order(unsigned long size);
Line 416... Line 429...
416
 
429
 
417
static inline void __iomem *ioremap(uint32_t offset, size_t size)
430
static inline void __iomem *ioremap(uint32_t offset, size_t size)
418
{
431
{
419
    return (void __iomem*) MapIoMem(offset, size, 3);
432
    return (void __iomem*) MapIoMem(offset, size, PG_SW|PG_NOCACHE);
Line 420... Line 433...
420
}
433
}
421
 
434
 
422
static inline void iounmap(void *addr)
435
static inline void iounmap(void *addr)