search for: romptr

Displaying 10 results from an estimated 10 matches for "romptr".

2013 Mar 13
1
Fix unaligned accesses for SPARC
...(get_unaligned((u16 *)&(x))) +#define ROM32(x) le32_to_cpu(get_unaligned((u32 *)&(x))) #define ROM48(x) ({ u8 *p = &(x); (u64)ROM16(p[4]) << 32 | ROM32(p[0]); }) -#define ROM64(x) le64_to_cpu(*(u64 *)&(x)) +#define ROM64(x) le64_to_cpu(get_unaligned((u64 *)&(x))) #define ROMPTR(d,x) ({ \ struct nouveau_drm *drm = nouveau_drm((d)); \ ROM16(x) ? &drm->vbios.data[ROM16(x)] : NULL; \ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20130312/da6bf1dd/a...
2007 Sep 13
0
[LLVMdev] PointerTypes with AddressSpace
...AddSp of var > -- b) Address Space of the pointer is the address Space of the pointer > eg: ptr1 = ptr2; //AddSp of ptr1 becomes AddSp of ptr2 > -- c) Conflicts inside functions are not resolvable and should > generate > diagnostic. > eg: > void f(void){ > generalPtr = romPtr; > //some code > generalPtr = ramPtr; // non resolvable conflict > } This basically amounts to type inference. If you want this, it would have to be implemented in the front-end, not in at the LLVM level (you lose too much to give useful error reports etc). Type inference is...
2007 Sep 13
2
[LLVMdev] PointerTypes with AddressSpace
...AddSp of var > -- b) Address Space of the pointer is the address Space of the pointer > eg: ptr1 = ptr2; //AddSp of ptr1 becomes AddSp of ptr2 > -- c) Conflicts inside functions are not resolvable and should > generate > diagnostic. > eg: > void f(void){ > generalPtr = romPtr; > //some code > generalPtr = ramPtr; // non resolvable conflict > } This basically amounts to type inference. If you want this, it would have to be implemented in the front-end, not in at the LLVM level (you lose too much to give useful error reports etc). Type inference is...
2007 Sep 13
3
[LLVMdev] PointerTypes with AddressSpace
...: ptr = &var; //AddSp of ptr becomes AddSp of var -- b) Address Space of the pointer is the address Space of the pointer eg: ptr1 = ptr2; //AddSp of ptr1 becomes AddSp of ptr2 -- c) Conflicts inside functions are not resolvable and should generate diagnostic. eg: void f(void){ generalPtr = romPtr; //some code generalPtr = ramPtr; // non resolvable conflict } -- d) Conflicts at the function interface will spawn a new function eg: void inc(int *a){ (*a)++; } void g(void){ inc(romPointer); // this will spawn an f with rom pointer inc(ramPointer); // this will spawn an f wi...
2007 Sep 13
0
[LLVMdev] PointerTypes with AddressSpace
...dress Space of the pointer is the address Space of the pointer >> eg: ptr1 = ptr2; //AddSp of ptr1 becomes AddSp of ptr2 >> -- c) Conflicts inside functions are not resolvable and should >> generate >> diagnostic. >> eg: >> void f(void){ >> generalPtr = romPtr; >> //some code >> generalPtr = ramPtr; // non resolvable conflict >> } > > This basically amounts to type inference. If you want this, it would > have to be implemented in the front-end, not in at the LLVM level > (you lose too much to give useful error repor...
2016 Jul 27
0
[PATCH] nouveau: bios pointers may be unaligned, use proper accessors
...16 *)&(x)) -#define ROM32(x) le32_to_cpu(*(u32 *)&(x)) -#define ROM48(x) ({ u8 *p = &(x); (u64)ROM16(p[4]) << 32 | ROM32(p[0]); }) -#define ROM64(x) le64_to_cpu(*(u64 *)&(x)) +#define ROM16(x) get_unaligned_le16(&(x)) +#define ROM32(x) get_unaligned_le32(&(x)) #define ROMPTR(d,x) ({ \ struct nouveau_drm *drm = nouveau_drm((d)); \ ROM16(x) ? &drm->vbios.data[ROM16(x)] : NULL; \ diff --git a/drm/nouveau/nvkm/subdev/mxm/mxms.c b/drm/nouveau/nvkm/subdev/mxm/mxms.c index 45a2f8e..9abfa5e 100644 --- a/drm/nouveau/nvkm/subdev/mxm/mxms.c +++ b/drm/nouveau...
2012 May 20
16
nouveau_subdev & misc patches
Hello all, this series includes a wide range of fixes - from a few month's old one-liners from Andreas Heider regarding vga_switcheroo, via a null pointer dereference and double memory allocation, to a buffer overflow. Please review and comment --- drivers/gpu/drm/nouveau/nouveau_acpi.c | 3 ++- drivers/gpu/drm/nouveau/nouveau_device.c | 26 +++++++++++++++-----------
2007 Sep 14
2
[LLVMdev] Embedded C Language Extensions
...dress Space of the pointer is the address Space of the pointer >> eg: ptr1 = ptr2; //AddSp of ptr1 becomes AddSp of ptr2 >> -- c) Conflicts inside functions are not resolvable and should >> generate >> diagnostic. >> eg: >> void f(void){ >> generalPtr = romPtr; >> //some code >> generalPtr = ramPtr; // non resolvable conflict >> } > > This basically amounts to type inference. If you want this, it would > have to be implemented in the front-end, not in at the LLVM level > (you lose too much to give useful error repor...
2007 Sep 12
0
[LLVMdev] New to LLVM, Help needed
On Wed, 12 Sep 2007 Alireza.Moshtaghi at microchip.com wrote: > Thank you Chris, > I had the pointer size wrong. I fixed it and now it passes that point as > expected :) which takes me to a second question: cool > The processor that I am working on is 8-bit and has Harvard > architecture; this implies different pointer types (sizes) to objects in > data memory or program memory
2007 Sep 12
2
[LLVMdev] New to LLVM, Help needed
Thank you Chris, I had the pointer size wrong. I fixed it and now it passes that point as expected :) which takes me to a second question: The processor that I am working on is 8-bit and has Harvard architecture; this implies different pointer types (sizes) to objects in data memory or program memory (functions or data in program memory) At this moment, I am just using only one pointer size