# HG changeset patch # User Paul Boddie # Date 1462374215 -7200 # Node ID 09b0fea027bdc546b5c72372b2441d0163614249 # Parent 8b4c47d9d10a3acb0e194bef0d615f3fd6e38da8 Replaced assembly language section with plain storage operations. diff -r 8b4c47d9d10a -r 09b0fea027bd stage2/cpu.c --- a/stage2/cpu.c Wed May 04 16:59:15 2016 +0200 +++ b/stage2/cpu.c Wed May 04 17:03:35 2016 +0200 @@ -250,16 +250,12 @@ /* Each page table entry corresponds to a pair of 4KB pages and holds two values. */ u32 entry = ((virtual & 0xffffe000) >> 13) * 8; - u32 address = base + entry; + u32 *address = (u32 *) (base + entry); /* The page tables should be permanently mapped to avoid hierarchical TLB miss handling. */ - asm volatile( - "sw %1, 0(%0)\n" - "sw %2, 4(%0)\n" - : - : "r" (address), "r" (lower), "r" (upper) - ); + *address = lower; + *(address + 1) = upper; } void map_page(u32 virtual, u32 physical, u32 pagesize, u8 flags, u8 asid)