devlml: use 64-bit physical addresses
This commit is contained in:
parent
7db23bb2f0
commit
4c8d2b0ebf
1 changed files with 5 additions and 5 deletions
|
@ -44,7 +44,7 @@ typedef struct LML LML;
|
||||||
struct LML {
|
struct LML {
|
||||||
/* Hardware */
|
/* Hardware */
|
||||||
Pcidev *pcidev;
|
Pcidev *pcidev;
|
||||||
ulong pciBaseAddr;
|
uintptr pciBaseAddr;
|
||||||
|
|
||||||
/* Allocated memory */
|
/* Allocated memory */
|
||||||
CodeData *codedata;
|
CodeData *codedata;
|
||||||
|
@ -132,7 +132,7 @@ prepbuf(LML *lml)
|
||||||
static void
|
static void
|
||||||
lmlreset(void)
|
lmlreset(void)
|
||||||
{
|
{
|
||||||
ulong regpa;
|
uvlong regpa;
|
||||||
char name[32];
|
char name[32];
|
||||||
void *regva;
|
void *regva;
|
||||||
LML *lml;
|
LML *lml;
|
||||||
|
@ -170,8 +170,8 @@ lmlreset(void)
|
||||||
print("lml: failed to map registers\n");
|
print("lml: failed to map registers\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lml->pciBaseAddr = (ulong)regva;
|
lml->pciBaseAddr = (uintptr)regva;
|
||||||
print(", mapped at 0x%.8lux\n", lml->pciBaseAddr);
|
print(", mapped at %#p\n", lml->pciBaseAddr);
|
||||||
|
|
||||||
memset(&segbuf, 0, sizeof(segbuf));
|
memset(&segbuf, 0, sizeof(segbuf));
|
||||||
segbuf.attr = SG_PHYSICAL;
|
segbuf.attr = SG_PHYSICAL;
|
||||||
|
@ -188,7 +188,7 @@ lmlreset(void)
|
||||||
segbuf.attr = SG_PHYSICAL | SG_DEVICE | SG_NOEXEC;
|
segbuf.attr = SG_PHYSICAL | SG_DEVICE | SG_NOEXEC;
|
||||||
sprint(name, "lml%d.regs", nlml);
|
sprint(name, "lml%d.regs", nlml);
|
||||||
kstrdup(&segbuf.name, name);
|
kstrdup(&segbuf.name, name);
|
||||||
segbuf.pa = (ulong)regpa;
|
segbuf.pa = (uintptr)regpa;
|
||||||
segbuf.size = pcidev->mem[0].size;
|
segbuf.size = pcidev->mem[0].size;
|
||||||
if(addphysseg(&segbuf) == nil){
|
if(addphysseg(&segbuf) == nil){
|
||||||
print("lml: physsegment: %s\n", name);
|
print("lml: physsegment: %s\n", name);
|
||||||
|
|
Loading…
Reference in a new issue