PavelChekov wrote:
but finding that relies on using physical addresses, yet the pointer to the table is a 64-bit address. I can't access that outside of long mode,
You're wrong, you can use PAE paging in 32-bit mode and access as much of the 64-bit physical address space as in long mode (namely the architecturally defined 52 bits). Of course I'd recommend 64-bit mode over 32-bit mode, but that doesn't mean you can't use it still.
PavelChekov wrote:
thus making the whole exercise moot, because my kernel wouldn't be able to access the physical address.
Surely your kernel has some way to map arbitrary physical addresses, right? It must have, since many device drivers require this. When you write any driver for a PCI device, it will read the IO base address out of some BAR, and then need to access that memory block as MMIO. You can't use a normal RAM mapping for this, because you need to map the memory as uncached. My solution for this is to have a function ioremap() that takes a physical address and a memory type and returns a virtual address. On x86_64, this basically adds or modifies the mapping in the linear range to have the requested memory type.