VirtualBox

source: vbox/trunk/include/VBox/sup.h@ 3710

Last change on this file since 3710 was 3641, checked in by vboxsync, 17 years ago

darn.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 19.4 KB
Line 
1/** @file
2 * SUP - Support Library.
3 */
4
5/*
6 * Copyright (C) 2006-2007 innotek GmbH
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License as published by the Free Software Foundation,
12 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
13 * distribution. VirtualBox OSE is distributed in the hope that it will
14 * be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * If you received this file as part of a commercial VirtualBox
17 * distribution, then only the terms of your commercial VirtualBox
18 * license agreement apply instead of the previous paragraph.
19 */
20
21#ifndef ___VBox_sup_h
22#define ___VBox_sup_h
23
24#include <VBox/cdefs.h>
25#include <VBox/types.h>
26#include <iprt/assert.h>
27#include <iprt/asm.h>
28
29__BEGIN_DECLS
30
31/** @defgroup grp_sup The Support Library API
32 * @{
33 */
34
35/**
36 * Physical page descriptor.
37 */
38#pragma pack(4) /* space is more important. */
39typedef struct SUPPAGE
40{
41 /** Physical memory address. */
42 RTHCPHYS Phys;
43 /** Reserved entry for internal use by the caller. */
44 RTHCUINTPTR uReserved;
45} SUPPAGE;
46#pragma pack()
47/** Pointer to a page descriptor. */
48typedef SUPPAGE *PSUPPAGE;
49/** Pointer to a const page descriptor. */
50typedef const SUPPAGE *PCSUPPAGE;
51
52/**
53 * The paging mode.
54 */
55typedef enum SUPPAGINGMODE
56{
57 /** The usual invalid entry.
58 * This is returned by SUPGetPagingMode() */
59 SUPPAGINGMODE_INVALID = 0,
60 /** Normal 32-bit paging, no global pages */
61 SUPPAGINGMODE_32_BIT,
62 /** Normal 32-bit paging with global pages. */
63 SUPPAGINGMODE_32_BIT_GLOBAL,
64 /** PAE mode, no global pages, no NX. */
65 SUPPAGINGMODE_PAE,
66 /** PAE mode with global pages. */
67 SUPPAGINGMODE_PAE_GLOBAL,
68 /** PAE mode with NX, no global pages. */
69 SUPPAGINGMODE_PAE_NX,
70 /** PAE mode with global pages and NX. */
71 SUPPAGINGMODE_PAE_GLOBAL_NX,
72 /** AMD64 mode, no global pages. */
73 SUPPAGINGMODE_AMD64,
74 /** AMD64 mode with global pages, no NX. */
75 SUPPAGINGMODE_AMD64_GLOBAL,
76 /** AMD64 mode with NX, no global pages. */
77 SUPPAGINGMODE_AMD64_NX,
78 /** AMD64 mode with global pages and NX. */
79 SUPPAGINGMODE_AMD64_GLOBAL_NX
80} SUPPAGINGMODE;
81
82
83#pragma pack(1) /* paranoia */
84
85/**
86 * Per CPU data.
87 * This is only used when
88 */
89typedef struct SUPGIPCPU
90{
91 /** Update transaction number.
92 * This number is incremented at the start and end of each update. It follows
93 * thusly that odd numbers indicates update in progress, while even numbers
94 * indicate stable data. Use this to make sure that the data items you fetch
95 * are consistent. */
96 volatile uint32_t u32TransactionId;
97 /** The interval in TSC ticks between two NanoTS updates.
98 * This is the average interval over the last 2, 4 or 8 updates + a little slack.
99 * The slack makes the time go a tiny tiny bit slower and extends the interval enough
100 * to avoid ending up with too many 1ns increments. */
101 volatile uint32_t u32UpdateIntervalTSC;
102 /** Current nanosecond timestamp. */
103 volatile uint64_t u64NanoTS;
104 /** The TSC at the time of u64NanoTS. */
105 volatile uint64_t u64TSC;
106 /** Current CPU Frequency. */
107 volatile uint64_t u64CpuHz;
108 /** Number of errors during updating.
109 * Typical errors are under/overflows. */
110 volatile uint32_t cErrors;
111 /** Index of the head item in au32TSCHistory. */
112 volatile uint32_t iTSCHistoryHead;
113 /** Array of recent TSC interval deltas.
114 * The most recent item is at index iTSCHistoryHead.
115 * This history is used to calculate u32UpdateIntervalTSC.
116 */
117 volatile uint32_t au32TSCHistory[8];
118 /** Reserved for future per processor data. */
119 volatile uint32_t au32Reserved[6];
120} SUPGIPCPU;
121AssertCompileSize(SUPGIPCPU, 96);
122/*AssertCompileMemberAlignment(SUPGIPCPU, u64TSC, 8); -fixme */
123
124/** Pointer to per cpu data.
125 * @remark there is no const version of this typedef, see g_pSUPGlobalInfoPage for details. */
126typedef SUPGIPCPU *PSUPGIPCPU;
127
128/**
129 * Global Information Page.
130 *
131 * This page contains useful information and can be mapped into any
132 * process or VM. It can be accessed thru the g_pSUPGlobalInfoPage
133 * pointer when a session is open.
134 */
135typedef struct SUPGLOBALINFOPAGE
136{
137 /** Magic (SUPGLOBALINFOPAGE_MAGIC). */
138 uint32_t u32Magic;
139 /** The GIP version. */
140 uint32_t u32Version;
141
142 /** The GIP update mode, see SUPGIPMODE. */
143 uint32_t u32Mode;
144 /** Reserved / padding. */
145 uint32_t u32Padding0;
146 /** The update frequency of the of the NanoTS. */
147 volatile uint32_t u32UpdateHz;
148 /** The update interval in nanoseconds. (10^9 / u32UpdateHz) */
149 volatile uint32_t u32UpdateIntervalNS;
150 /** The timestamp of the last time we update the update frequency. */
151 volatile uint64_t u64NanoTSLastUpdateHz;
152
153 /** Padding / reserved space for future data. */
154 uint32_t au32Padding1[56];
155
156 /** Array of per-cpu data.
157 * If u32Mode == SUPGIPMODE_SYNC_TSC then only the first entry is used.
158 * If u32Mode == SUPGIPMODE_ASYNC_TSC then the CPU ACPI ID is used as an
159 * index into the array. */
160 SUPGIPCPU aCPUs[32];
161} SUPGLOBALINFOPAGE;
162AssertCompile(sizeof(SUPGLOBALINFOPAGE) <= 0x1000);
163/* AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, aCPU, 32); - fixme */
164
165/** Pointer to the global info page.
166 * @remark there is no const version of this typedef, see g_pSUPGlobalInfoPage for details. */
167typedef SUPGLOBALINFOPAGE *PSUPGLOBALINFOPAGE;
168
169#pragma pack() /* end of paranoia */
170
171/** The value of the SUPGLOBALINFOPAGE::u32Magic field. (Soryo Fuyumi) */
172#define SUPGLOBALINFOPAGE_MAGIC 0x19590106
173/** The GIP version.
174 * Upper 16 bits is the major version. Major version is only changed with
175 * incompatible changes in the GIP. */
176#define SUPGLOBALINFOPAGE_VERSION 0x00020000
177
178/**
179 * SUPGLOBALINFOPAGE::u32Mode values.
180 */
181typedef enum SUPGIPMODE
182{
183 /** The usual invalid null entry. */
184 SUPGIPMODE_INVALID = 0,
185 /** The TSC of the cores and cpus in the system is in sync. */
186 SUPGIPMODE_SYNC_TSC,
187 /** Each core has it's own TSC. */
188 SUPGIPMODE_ASYNC_TSC,
189 /** The usual 32-bit hack. */
190 SUPGIPMODE_32BIT_HACK = 0x7fffffff
191} SUPGIPMODE;
192
193/** Pointer to the Global Information Page.
194 *
195 * This pointer is valid as long as SUPLib has a open session. Anyone using
196 * the page must treat this pointer as higly volatile and not trust it beyond
197 * one transaction.
198 *
199 * @remark The GIP page is read-only to everyone but the support driver and
200 * is actually mapped read only everywhere but in ring-0. However
201 * it is not marked 'const' as this might confuse compilers into
202 * thinking that values doesn't change even if members are marked
203 * as volatile. Thus, there is no PCSUPGLOBALINFOPAGE type.
204 */
205#if defined(IN_SUP_R0) || defined(IN_SUP_R3) || defined(IN_SUP_GC)
206extern DECLEXPORT(PSUPGLOBALINFOPAGE) g_pSUPGlobalInfoPage;
207#elif defined(IN_RING0)
208extern DECLIMPORT(SUPGLOBALINFOPAGE) g_SUPGlobalInfoPage;
209# if defined(__GNUC__) && !defined(RT_OS_DARWIN) && defined(RT_ARCH_AMD64)
210/** Workaround for ELF+GCC problem on 64-bit hosts.
211 * (GCC emits a mov with a R_X86_64_32 reloc, we need R_X86_64_64.) */
212DECLINLINE(PSUPGLOBALINFOPAGE) SUPGetGIP(void)
213{
214 PSUPGLOBALINFOPAGE pGIP;
215 __asm__ __volatile__ ("movabs $g_SUPGlobalInfoPage,%0\n\t"
216 : "=a" (pGIP));
217 return pGIP;
218}
219# define g_pSUPGlobalInfoPage (SUPGetGIP())
220# else
221# define g_pSUPGlobalInfoPage (&g_SUPGlobalInfoPage)
222# endif
223#else
224extern DECLIMPORT(PSUPGLOBALINFOPAGE) g_pSUPGlobalInfoPage;
225#endif
226
227
228/**
229 * Gets the TSC frequency of the calling CPU.
230 *
231 * @returns TSC frequency.
232 * @param pGip The GIP pointer.
233 */
234DECLINLINE(uint64_t) SUPGetCpuHzFromGIP(PSUPGLOBALINFOPAGE pGip)
235{
236 unsigned iCpu;
237
238 if (RT_UNLIKELY(!pGip || pGip->u32Magic != SUPGLOBALINFOPAGE_MAGIC))
239 return ~(uint64_t)0;
240
241 if (pGip->u32Mode != SUPGIPMODE_ASYNC_TSC)
242 iCpu = 0;
243 else
244 {
245 iCpu = ASMGetApicId();
246 if (RT_UNLIKELY(iCpu >= RT_ELEMENTS(pGip->aCPUs)))
247 return ~(uint64_t)0;
248 }
249
250 return pGip->aCPUs[iCpu].u64CpuHz;
251}
252
253
254#ifdef IN_RING3
255
256/** @defgroup grp_sup_r3 SUP Host Context Ring 3 API
257 * @ingroup grp_sup
258 * @{
259 */
260
261/**
262 * Installs the support library.
263 *
264 * @returns VBox status code.
265 */
266SUPR3DECL(int) SUPInstall(void);
267
268/**
269 * Uninstalls the support library.
270 *
271 * @returns VBox status code.
272 */
273SUPR3DECL(int) SUPUninstall(void);
274
275/**
276 * Initializes the support library.
277 * Each succesful call to SUPInit() must be countered by a
278 * call to SUPTerm(false).
279 *
280 * @returns VBox status code.
281 * @param ppSession Where to store the session handle. Defaults to NULL.
282 * @param cbReserve The number of bytes of contiguous memory that should be reserved by
283 * the runtime / support library.
284 * Set this to 0 if no reservation is required. (default)
285 * Set this to ~0 if the maximum amount supported by the VM is to be
286 * attempted reserved, or the maximum available.
287 */
288#ifdef __cplusplus
289SUPR3DECL(int) SUPInit(PSUPDRVSESSION *ppSession = NULL, size_t cbReserve = 0);
290#else
291SUPR3DECL(int) SUPInit(PSUPDRVSESSION *ppSession, size_t cbReserve);
292#endif
293
294/**
295 * Terminates the support library.
296 *
297 * @returns VBox status code.
298 * @param fForced Forced termination. This means to ignore the
299 * init call count and just terminated.
300 */
301#ifdef __cplusplus
302SUPR3DECL(int) SUPTerm(bool fForced = false);
303#else
304SUPR3DECL(int) SUPTerm(int fForced);
305#endif
306
307/**
308 * Sets the ring-0 VM handle for use with fast IOCtls.
309 *
310 * @returns VBox status code.
311 * @param pVMR0 The ring-0 VM handle.
312 * NIL_RTR0PTR can be used to unset the handle when the
313 * VM is about to be destroyed.
314 */
315SUPR3DECL(int) SUPSetVMForFastIOCtl(PVMR0 pVMR0);
316
317/**
318 * Calls the HC R0 VMM entry point.
319 * See VMMR0Entry() for more details.
320 *
321 * @returns error code specific to uFunction.
322 * @param pVMR0 Pointer to the Ring-0 (Host Context) mapping of the VM structure.
323 * @param uOperation Operation to execute.
324 * @param pvArg Argument.
325 */
326SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, unsigned uOperation, void *pvArg);
327
328/**
329 * Calls the HC R0 VMM entry point, in a safer but slower manner than SUPCallVMMR0.
330 * When entering using this call the R0 components can call into the host kernel
331 * (i.e. use the SUPR0 and RT APIs).
332 *
333 * See VMMR0Entry() for more details.
334 *
335 * @returns error code specific to uFunction.
336 * @param pVMR0 Pointer to the Ring-0 (Host Context) mapping of the VM structure.
337 * @param uOperation Operation to execute.
338 * @param pvArg Pointer to argument structure or if cbArg is 0 just an value.
339 * @param cbArg The size of the argument. This is used to copy whatever the argument
340 * points at into a kernel buffer to avoid problems like the user page
341 * being invalidated while we're executing the call.
342 */
343SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, unsigned uOperation, void *pvArg, unsigned cbArg);
344
345/**
346 * Queries the paging mode of the host OS.
347 *
348 * @returns The paging mode.
349 */
350SUPR3DECL(SUPPAGINGMODE) SUPGetPagingMode(void);
351
352/**
353 * Allocate zero-filled pages.
354 *
355 * Use this to allocate a number of pages rather than using RTMem*() and mess with
356 * alignment. The returned address is of course page aligned. Call SUPPageFree()
357 * to free the pages once done with them.
358 *
359 * @returns VBox status.
360 * @param cPages Number of pages to allocate.
361 * @param ppvPages Where to store the base pointer to the allocated pages.
362 */
363SUPR3DECL(int) SUPPageAlloc(size_t cPages, void **ppvPages);
364
365/**
366 * Frees pages allocated with SUPPageAlloc().
367 *
368 * @returns VBox status.
369 * @param pvPages Pointer returned by SUPPageAlloc().
370 * @param cPages Number of pages that was allocated.
371 */
372SUPR3DECL(int) SUPPageFree(void *pvPages, size_t cPages);
373
374/**
375 * Locks down the physical memory backing a virtual memory
376 * range in the current process.
377 *
378 * @returns VBox status code.
379 * @param pvStart Start of virtual memory range.
380 * Must be page aligned.
381 * @param cPages Number of pages.
382 * @param paPages Where to store the physical page addresses returned.
383 * On entry this will point to an array of with cbMemory >> PAGE_SHIFT entries.
384 */
385SUPR3DECL(int) SUPPageLock(void *pvStart, size_t cPages, PSUPPAGE paPages);
386
387/**
388 * Releases locked down pages.
389 *
390 * @returns VBox status code.
391 * @param pvStart Start of virtual memory range previously locked
392 * down by SUPPageLock().
393 */
394SUPR3DECL(int) SUPPageUnlock(void *pvStart);
395
396/**
397 * Allocated memory with page aligned memory with a contiguous and locked physical
398 * memory backing below 4GB.
399 *
400 * @returns Pointer to the allocated memory (virtual address).
401 * *pHCPhys is set to the physical address of the memory.
402 * The returned memory must be freed using SUPContFree().
403 * @returns NULL on failure.
404 * @param cPages Number of pages to allocate.
405 * @param pHCPhys Where to store the physical address of the memory block.
406 */
407SUPR3DECL(void *) SUPContAlloc(size_t cPages, PRTHCPHYS pHCPhys);
408
409/**
410 * Allocated memory with page aligned memory with a contiguous and locked physical
411 * memory backing below 4GB.
412 *
413 * @returns Pointer to the allocated memory (virtual address).
414 * *pHCPhys is set to the physical address of the memory.
415 * If ppvR0 isn't NULL, *ppvR0 is set to the ring-0 mapping.
416 * The returned memory must be freed using SUPContFree().
417 * @returns NULL on failure.
418 * @param cPages Number of pages to allocate.
419 * @param pR0Ptr Where to store the ring-0 mapping of the allocation. (optional)
420 * @param pHCPhys Where to store the physical address of the memory block.
421 *
422 * @remark This 2nd version of this API exists because we're not able to map the
423 * ring-3 mapping executable on WIN64. This is a serious problem in regard to
424 * the world switchers.
425 */
426SUPR3DECL(void *) SUPContAlloc2(size_t cPages, PRTR0PTR pR0Ptr, PRTHCPHYS pHCPhys);
427
428/**
429 * Frees memory allocated with SUPContAlloc().
430 *
431 * @returns VBox status code.
432 * @param pv Pointer to the memory block which should be freed.
433 * @param cPages Number of pages to be freed.
434 */
435SUPR3DECL(int) SUPContFree(void *pv, size_t cPages);
436
437/**
438 * Allocated non contiguous physical memory below 4GB.
439 *
440 * @returns VBox status code.
441 * @returns NULL on failure.
442 * @param cPages Number of pages to allocate.
443 * @param ppvPages Where to store the pointer to the allocated memory.
444 * The pointer stored here on success must be passed to SUPLowFree when
445 * the memory should be released.
446 * @param ppvPagesR0 Where to store the ring-0 pointer to the allocated memory. optional.
447 * @param paPages Where to store the physical addresses of the individual pages.
448 */
449SUPR3DECL(int) SUPLowAlloc(size_t cPages, void **ppvPages, PRTR0PTR ppvPagesR0, PSUPPAGE paPages);
450
451/**
452 * Frees memory allocated with SUPLowAlloc().
453 *
454 * @returns VBox status code.
455 * @param pv Pointer to the memory block which should be freed.
456 * @param cPages Number of pages that was allocated.
457 */
458SUPR3DECL(int) SUPLowFree(void *pv, size_t cPages);
459
460/**
461 * Load a module into R0 HC.
462 *
463 * @returns VBox status code.
464 * @param pszFilename The path to the image file.
465 * @param pszModule The module name. Max 32 bytes.
466 */
467SUPR3DECL(int) SUPLoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase);
468
469/**
470 * Frees a R0 HC module.
471 *
472 * @returns VBox status code.
473 * @param pszModule The module to free.
474 * @remark This will not actually 'free' the module, there are of course usage counting.
475 */
476SUPR3DECL(int) SUPFreeModule(void *pvImageBase);
477
478/**
479 * Get the address of a symbol in a ring-0 module.
480 *
481 * @returns VBox status code.
482 * @param pszModule The module name.
483 * @param pszSymbol Symbol name. If it's value is less than 64k it's treated like a
484 * ordinal value rather than a string pointer.
485 * @param ppvValue Where to store the symbol value.
486 */
487SUPR3DECL(int) SUPGetSymbolR0(void *pvImageBase, const char *pszSymbol, void **ppvValue);
488
489/**
490 * Load R0 HC VMM code.
491 *
492 * @returns VBox status code.
493 * @deprecated Use SUPLoadModule(pszFilename, "VMMR0.r0", &pvImageBase)
494 */
495SUPR3DECL(int) SUPLoadVMM(const char *pszFilename);
496
497/**
498 * Unloads R0 HC VMM code.
499 *
500 * @returns VBox status code.
501 * @deprecated Use SUPFreeModule().
502 */
503SUPR3DECL(int) SUPUnloadVMM(void);
504
505/**
506 * Get the physical address of the GIP.
507 *
508 * @returns VBox status code.
509 * @param pHCPhys Where to store the physical address of the GIP.
510 */
511SUPR3DECL(int) SUPGipGetPhys(PRTHCPHYS pHCPhys);
512
513/** @} */
514#endif /* IN_RING3 */
515
516
517#ifdef IN_RING0
518/** @defgroup grp_sup_r0 SUP Host Context Ring 0 API
519 * @ingroup grp_sup
520 * @{
521 */
522
523/**
524 * Security objectype.
525 */
526typedef enum SUPDRVOBJTYPE
527{
528 /** The usual invalid object. */
529 SUPDRVOBJTYPE_INVALID = 0,
530 /** Internal network. */
531 SUPDRVOBJTYPE_INTERNAL_NETWORK,
532 /** Internal network interface. */
533 SUPDRVOBJTYPE_INTERNAL_NETWORK_INTERFACE,
534 /** The first invalid object type in this end. */
535 SUPDRVOBJTYPE_END,
536 /** The usual 32-bit type size hack. */
537 SUPDRVOBJTYPE_32_BIT_HACK = 0x7ffffff
538} SUPDRVOBJTYPE;
539
540/**
541 * Object destructor callback.
542 * This is called for reference counted objectes when the count reaches 0.
543 *
544 * @param pvObj The object pointer.
545 * @param pvUser1 The first user argument.
546 * @param pvUser2 The second user argument.
547 */
548typedef DECLCALLBACK(void) FNSUPDRVDESTRUCTOR(void *pvObj, void *pvUser1, void *pvUser2);
549/** Pointer to a FNSUPDRVDESTRUCTOR(). */
550typedef FNSUPDRVDESTRUCTOR *PFNSUPDRVDESTRUCTOR;
551
552SUPR0DECL(void *) SUPR0ObjRegister(PSUPDRVSESSION pSession, SUPDRVOBJTYPE enmType, PFNSUPDRVDESTRUCTOR pfnDestructor, void *pvUser1, void *pvUser2);
553SUPR0DECL(int) SUPR0ObjAddRef(void *pvObj, PSUPDRVSESSION pSession);
554SUPR0DECL(int) SUPR0ObjRelease(void *pvObj, PSUPDRVSESSION pSession);
555SUPR0DECL(int) SUPR0ObjVerifyAccess(void *pvObj, PSUPDRVSESSION pSession, const char *pszObjName);
556
557SUPR0DECL(int) SUPR0LockMem(PSUPDRVSESSION pSession, RTR3PTR pvR3, uint32_t cPages, PSUPPAGE paPages);
558SUPR0DECL(int) SUPR0UnlockMem(PSUPDRVSESSION pSession, RTR3PTR pvR3);
559SUPR0DECL(int) SUPR0ContAlloc(PSUPDRVSESSION pSession, uint32_t cPages, PRTR0PTR ppvR0, PRTR3PTR ppvR3, PRTHCPHYS pHCPhys);
560SUPR0DECL(int) SUPR0ContFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr);
561SUPR0DECL(int) SUPR0LowAlloc(PSUPDRVSESSION pSession, uint32_t cPages, PRTR0PTR ppvR0, PRTR3PTR ppvR3, PSUPPAGE paPages);
562SUPR0DECL(int) SUPR0LowFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr);
563SUPR0DECL(int) SUPR0MemAlloc(PSUPDRVSESSION pSession, uint32_t cb, PRTR0PTR ppvR0, PRTR3PTR ppvR3);
564SUPR0DECL(int) SUPR0MemGetPhys(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr, PSUPPAGE paPages);
565SUPR0DECL(int) SUPR0MemFree(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr);
566SUPR0DECL(int) SUPR0GipMap(PSUPDRVSESSION pSession, PRTR3PTR ppGipR3, PRTHCPHYS pHCPhysGid);
567SUPR0DECL(int) SUPR0GipUnmap(PSUPDRVSESSION pSession);
568SUPR0DECL(int) SUPR0Printf(const char *pszFormat, ...);
569
570/** @} */
571#endif
572
573/** @} */
574
575__END_DECLS
576
577#endif
578
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette