1 --- NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c.orig 2004-03-08 15:48:46.000000000 +0100
2 +++ NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c 2004-03-08 15:55:11.718705016 +0100
4 * waiting on the wait queue
7 -void nv_set_hotkey_occurred_flag(void)
8 +void NV_API_CALL nv_set_hotkey_occurred_flag(void)
10 nv_printf(NV_DBG_EVENTINFO,"setting the hotkey occurred flag!\n");
13 *** EXPORTS to rest of resman
16 -void *nv_find_nv_mapping(
17 +void * NV_API_CALL nv_find_nv_mapping(
22 * the TYPE_AGP flag to differeniate it from a PCI allocation.
23 * failure is fine, we may just be checking if a given page is agp
27 nv_find_agp_kernel_mapping(
31 return (unsigned long) NULL;
35 +unsigned long NV_API_CALL
36 nv_get_kern_phys_address(
40 return _get_phys_address(address, 1);
44 +unsigned long NV_API_CALL
45 nv_get_user_phys_address(
51 /* allocate memory for DMA push buffers */
67 nvl->rm_lock_count = 0;
71 +void NV_API_CALL nv_lock_rm(
76 nvl->rm_lock_count = 1;
80 +void NV_API_CALL nv_unlock_rm(
85 spin_unlock_irq(&nvl->rm_lock);
89 +void NV_API_CALL nv_lock_heap(
94 nv_lock(nvl->heap_lock);
98 +void NV_API_CALL nv_unlock_heap(
102 @@ -2744,7 +2744,7 @@
107 +void NV_API_CALL nv_post_event(
111 @@ -2782,7 +2782,7 @@
112 nv_unlock_irq(nvfp->fp_lock, eflags);
116 +int NV_API_CALL nv_get_event(
120 @@ -2823,7 +2823,7 @@
129 @@ -2889,7 +2889,7 @@
138 @@ -2927,7 +2927,7 @@
139 * (if the linear mapping was real, this is the page that would have been
140 * addressed by the virtual address. I know, confusing).
144 nv_agp_translate_address(
147 @@ -2957,7 +2957,7 @@
156 @@ -2971,7 +2971,7 @@
159 /* set a timer to go off every second */
165 @@ -2992,7 +2992,7 @@
174 --- NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/os-interface.c.orig 2004-01-15 04:29:11.000000000 +0100
175 +++ NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/os-interface.c 2004-03-08 16:10:44.435910448 +0100
180 -RM_STATUS os_raise_smp_barrier(VOID)
181 +RM_STATUS NV_API_CALL os_raise_smp_barrier(VOID)
183 os_block_on_smp_barrier = 1;
189 -RM_STATUS os_clear_smp_barrier(VOID)
190 +RM_STATUS NV_API_CALL os_clear_smp_barrier(VOID)
192 os_block_on_smp_barrier = 0;
196 // return TRUE if the caller is the super-user
197 -BOOL os_is_administrator(
198 +BOOL NV_API_CALL os_is_administrator(
202 return NV_IS_SUSER();
205 -U032 os_get_page_size(VOID)
206 +U032 NV_API_CALL os_get_page_size(VOID)
211 -ULONG os_get_page_mask(VOID)
212 +ULONG NV_API_CALL os_get_page_mask(VOID)
217 // just replace the code within osStringCopy with a call to the C library
220 -U008* os_string_copy(
221 +U008* NV_API_CALL os_string_copy(
226 return strcpy(dst, src);
229 -RM_STATUS os_strncpy_from_user(
230 +RM_STATUS NV_API_CALL os_strncpy_from_user(
238 -S032 os_string_compare(
239 +S032 NV_API_CALL os_string_compare(
243 @@ -107,14 +107,14 @@
244 return strcmp(s1, s2);
247 -U032 os_string_length(
248 +U032 NV_API_CALL os_string_length(
256 +U008* NV_API_CALL os_mem_copy(
261 return memcpy(dst, src, length);
264 -RM_STATUS os_memcpy_from_user(
265 +RM_STATUS NV_API_CALL os_memcpy_from_user(
270 return copy_from_user(dst, src, length) ? RM_ERR_BAD_ADDRESS : RM_OK;
273 -RM_STATUS os_memcpy_to_user(
274 +RM_STATUS NV_API_CALL os_memcpy_to_user(
279 return copy_to_user(dst, src, length) ? RM_ERR_BAD_ADDRESS : RM_OK;
283 +VOID* NV_API_CALL os_mem_set(
288 return memset(dst, (int)c, length);
292 +S032 NV_API_CALL os_mem_cmp(
297 return memcmp(buf0, buf1, length);
300 -VOID* os_copy_in_ioctl_param(
301 +VOID* NV_API_CALL os_copy_in_ioctl_param(
309 -VOID* os_copy_out_ioctl_param(
310 +VOID* NV_API_CALL os_copy_out_ioctl_param(
316 #define KMALLOC_LIMIT 131072
318 -RM_STATUS os_alloc_mem(
319 +RM_STATUS NV_API_CALL os_alloc_mem(
324 return *address ? RM_OK : RM_ERR_NO_FREE_MEM;
327 -void os_free_mem(VOID *address)
328 +void NV_API_CALL os_free_mem(VOID *address)
333 * we may allocate more pages than the caller really asked for.
334 * we'll only lock down the number of pages the caller asked for.
336 -RM_STATUS os_alloc_contig_pages(
337 +RM_STATUS NV_API_CALL os_alloc_contig_pages(
342 * the same number of pages we locked, and to calculate the order we
343 * allocated, so we properly free the allocation.
345 -VOID os_free_contig_pages(
346 +VOID NV_API_CALL os_free_contig_pages(
352 *****************************************************************************/
354 -RM_STATUS os_get_current_time(
355 +RM_STATUS NV_API_CALL os_get_current_time(
360 * this, we use mdelay() for any full millisecond to be safe.
363 -RM_STATUS os_delay_us(U032 MicroSeconds)
364 +RM_STATUS NV_API_CALL os_delay_us(U032 MicroSeconds)
366 unsigned long mdelay_safe_msec;
369 * remainder will be accounted for with mdelay().
372 -RM_STATUS os_delay(U032 MilliSeconds)
373 +RM_STATUS NV_API_CALL os_delay(U032 MilliSeconds)
375 unsigned long MicroSeconds;
376 unsigned long jiffies;
380 /* return CPU frequency in MHz */
381 -U032 os_get_cpu_frequency(VOID)
382 +U032 NV_API_CALL os_get_cpu_frequency(VOID)
386 @@ -500,13 +500,13 @@
390 -RM_STATUS os_get_current_process(U032 *pPid)
391 +RM_STATUS NV_API_CALL os_get_current_process(U032 *pPid)
393 *pPid = current->pid;
397 -RM_STATUS os_kill_process(
398 +RM_STATUS NV_API_CALL os_kill_process(
404 // this is what actually outputs the data.
406 -inline void out_string(const char *str)
407 +inline void NV_API_CALL out_string(const char *str)
409 printk("%d: %s", smp_processor_id(), str);
412 * Returns the number of characters written.
416 +int NV_API_CALL nv_printf(
418 const char *printf_format,
421 return chars_written;
424 -BOOL os_pci_device_present(
425 +BOOL NV_API_CALL os_pci_device_present(
433 -VOID* os_pci_init_handle(
434 +VOID* NV_API_CALL os_pci_init_handle(
442 -U008 os_pci_read_byte(
443 +U008 NV_API_CALL os_pci_read_byte(
451 -U016 os_pci_read_word(
452 +U016 NV_API_CALL os_pci_read_word(
460 -U032 os_pci_read_dword(
461 +U032 NV_API_CALL os_pci_read_dword(
469 -VOID os_pci_write_byte(
470 +VOID NV_API_CALL os_pci_write_byte(
475 pci_write_config_byte( (struct pci_dev *) handle, offset, value);
478 -VOID os_pci_write_word(
479 +VOID NV_API_CALL os_pci_write_word(
484 pci_write_config_word( (struct pci_dev *) handle, offset, value);
487 -VOID os_pci_write_dword(
488 +VOID NV_API_CALL os_pci_write_dword(
493 pci_write_config_dword( (struct pci_dev *) handle, offset, value);
496 -VOID os_io_write_byte(
497 +VOID NV_API_CALL os_io_write_byte(
502 outb(value, address);
505 -VOID os_io_write_word(
506 +VOID NV_API_CALL os_io_write_word(
511 outw(value, address);
514 -VOID os_io_write_dword(
515 +VOID NV_API_CALL os_io_write_dword(
520 outl(value, address);
523 -U008 os_io_read_byte(
524 +U008 NV_API_CALL os_io_read_byte(
532 -U016 os_io_read_word(
533 +U016 NV_API_CALL os_io_read_word(
541 -U032 os_io_read_dword(
542 +U032 NV_API_CALL os_io_read_dword(
546 @@ -718,14 +718,14 @@
550 -ULONG os_cli(ULONG flags)
551 +ULONG NV_API_CALL os_cli(ULONG flags)
553 NV_SAVE_FLAGS(flags);
558 -ULONG os_sti(ULONG flags)
559 +ULONG NV_API_CALL os_sti(ULONG flags)
561 NV_RESTORE_FLAGS(flags);
564 * achieve the same results on a PIII or higher
567 -RM_STATUS os_set_mem_range(
568 +RM_STATUS NV_API_CALL os_set_mem_range(
576 -RM_STATUS os_unset_mem_range(
577 +RM_STATUS NV_API_CALL os_unset_mem_range(
582 * should this also check for Write-Combining??
585 -VOID *os_map_kernel_space(
586 +VOID * NV_API_CALL os_map_kernel_space(
594 -VOID os_unmap_kernel_space(
595 +VOID NV_API_CALL os_unmap_kernel_space(
600 NV_IOUNMAP(addr, size_bytes);
603 -VOID* os_map_user_space(
604 +VOID* NV_API_CALL os_map_user_space(
608 @@ -883,14 +883,14 @@
612 -VOID os_unmap_user_space(
613 +VOID NV_API_CALL os_unmap_user_space(
620 -VOID* os_map_io_space(
621 +VOID* NV_API_CALL os_map_io_space(
626 return (void *)(NV_UINTPTR_T) vma->vm_start;
629 -VOID os_unmap_io_space(
630 +VOID NV_API_CALL os_unmap_io_space(
637 // override initial debug level from registry
638 -VOID os_dbg_init(void)
639 +VOID NV_API_CALL os_dbg_init(void)
642 if (RM_OK == rm_read_registry_dword(0,
647 -VOID os_dbg_set_level(U032 new_debuglevel)
648 +VOID NV_API_CALL os_dbg_set_level(U032 new_debuglevel)
650 nv_printf(NV_DBG_SETUP, "Changing debuglevel from 0x%x to 0x%x\n", cur_debuglevel, new_debuglevel);
651 cur_debuglevel = new_debuglevel;
653 * a lock or which threw the breakpoint. I should probably scan the list of
654 * nv_state_t's and drop any held locks before throwing this breakpoint.
656 -VOID os_dbg_breakpoint(void)
657 +VOID NV_API_CALL os_dbg_breakpoint(void)
660 out_string("Break\n");