Bit shifts are now used instead of multiplication
1 files changed, 1 insertions(+), 1 deletions(-)

M kernel/src/pcie.c
M kernel/src/pcie.c +1 -1
@@ 113,7 113,7 @@ void pcie_init(struct mcfg* mcfg) {
 		for(uint64_t bus = entry->start_bus; bus < entry->end_bus; ++bus) {
 			for(uint64_t dev = 0; dev < 0x20; ++dev) {
 				for(uint64_t func = 0; func < 8; ++func) {
-					struct pcie_header* hdr = (struct pcie_header*) LOW_TO_HIGH((entry->base_addr + (0x100000 * (bus - entry->start_bus)) + (0x8000 * dev) + (func * 0x1000)));
+					struct pcie_header* hdr = (struct pcie_header*) LOW_TO_HIGH((entry->base_addr + ((bus - entry->start_bus) << 20) + (dev << 15) + (func << 12)));
 					if(hdr->vendor_id == 0xFFFF) {
 						continue;
 					}