ref: 4c8d2b0ebf1fd3fe5b96e227da23a82f669a82fa
parent: 7db23bb2f00a9c8f53f7aa063112e946f7a9539a
author: cinap_lenrek <[email protected]>
date: Sat Jun 6 12:31:39 EDT 2020
devlml: use 64-bit physical addresses
--- a/sys/src/9/pc/devlml.c
+++ b/sys/src/9/pc/devlml.c
@@ -44,7 +44,7 @@
struct LML {
/* Hardware */
Pcidev *pcidev;
- ulong pciBaseAddr;
+ uintptr pciBaseAddr;
/* Allocated memory */
CodeData *codedata;
@@ -132,7 +132,7 @@
static void
lmlreset(void)
{
- ulong regpa;
+ uvlong regpa;
char name[32];
void *regva;
LML *lml;
@@ -170,8 +170,8 @@
print("lml: failed to map registers\n");
return;
}
- lml->pciBaseAddr = (ulong)regva;
- print(", mapped at 0x%.8lux\n", lml->pciBaseAddr);
+ lml->pciBaseAddr = (uintptr)regva;
+ print(", mapped at %#p\n", lml->pciBaseAddr);
memset(&segbuf, 0, sizeof(segbuf));
segbuf.attr = SG_PHYSICAL;
@@ -188,7 +188,7 @@
segbuf.attr = SG_PHYSICAL | SG_DEVICE | SG_NOEXEC;
sprint(name, "lml%d.regs", nlml);
kstrdup(&segbuf.name, name);
- segbuf.pa = (ulong)regpa;
+ segbuf.pa = (uintptr)regpa;
segbuf.size = pcidev->mem[0].size;
if(addphysseg(&segbuf) == nil){
print("lml: physsegment: %s\n", name);