Lines Matching refs:buf

24 	u8 *buf;
26 buf = map_sysmem(0, BUF_SIZE);
27 memset(buf, '\xff', BUF_SIZE);
30 buf[0x0] = 0x12;
37 *(short *)buf = 0x2345;
44 *(u32 *)buf = 0x3456789a;
51 *(u64 *)buf = 0x456789abcdef0123;
63 unmap_sysmem(buf);
72 char *buf;
74 buf = map_sysmem(0, BUF_SIZE);
75 memset(buf, '\xff', BUF_SIZE);
78 buf[0x0] = 0x12;
79 buf[0x10] = 0x34;
84 *(short *)buf = 0x2345;
85 *(short *)(buf + 0x10) = 0xf012;
90 *(u32 *)buf = 0x3456789a;
91 *(u32 *)(buf + 0x10) = 0xc3384235;
96 *(u64 *)buf = 0x456789abcdef0123;
97 *(u64 *)(buf + 0x10) = 0x4987328372849283;
105 unmap_sysmem(buf);
114 char *buf;
116 buf = map_sysmem(0, BUF_SIZE);
117 memset(buf, '\xff', BUF_SIZE);
119 *(u32 *)buf = 0x1234;
120 *(u32 *)(buf + 0x10) = 0x560000;
126 *(u32 *)buf = 0x561200;
127 *(u32 *)(buf + 0x10) = 0x1234;
148 unmap_sysmem(buf);
157 char *buf, *val;
159 buf = map_sysmem(0, BUF_SIZE);
192 unmap_sysmem(buf);
201 char *buf, *val;
203 buf = map_sysmem(0, BUF_SIZE);
209 unmap_sysmem(buf);
218 char *buf, *nbuf;
221 buf = map_sysmem(0, BUF_SIZE);
225 memset(buf, '\xff', BUF_SIZE);
228 buf[i] = i & 0xff;
231 strcpy(buf, "this is a test");
237 ut_assertok(setexpr_regex_sub(buf, BUF_SIZE, nbuf, BUF_SIZE, "is",
239 ut_asserteq_str("thus it is longer us it is longer a test", buf);
241 ut_assertf(buf[i] == (char)i,
242 "buf byte at %x should be %02x, got %02x)\n",
243 i, i & 0xff, (u8)buf[i]);
249 unmap_sysmem(buf);
258 char *buf, *nbuf;
261 buf = map_sysmem(0, BUF_SIZE);
265 memset(buf, '\xff', BUF_SIZE);
268 buf[i] = i & 0xff;
271 strcpy(buf, "this is surely a test is it? yes this is indeed a test");
277 ut_assertok(setexpr_regex_sub(buf, BUF_SIZE, nbuf, BUF_SIZE,
281 buf);
284 ut_assertf(buf[i] == (char)i,
285 "buf byte at %x should be %02x, got %02x)\n",
286 i, i & 0xff, (u8)buf[i]);
292 unmap_sysmem(buf);
302 char *buf;
304 buf = map_sysmem(0, BUF_SIZE);
305 memset(buf, '\xff', BUF_SIZE);
313 strcpy(buf, "hello");
327 unmap_sysmem(buf);
338 char *buf;
340 buf = map_sysmem(0, BUF_SIZE);
341 memset(buf, '\xff', BUF_SIZE);
342 strcpy(buf, "hello");
343 strcpy(buf + 0x10, " there");
377 unmap_sysmem(buf);
387 char *buf, *val;
389 buf = map_sysmem(0, size);
390 memset(buf, 'a', size);
397 unmap_sysmem(buf);
407 u8 *buf;
409 buf = map_sysmem(0, BUF_SIZE);
410 memset(buf, '\xff', BUF_SIZE);
479 unmap_sysmem(buf);