summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/loongson/loongson/machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c
index fc04f842f80..13475b282dc 100644
--- a/sys/arch/loongson/loongson/machdep.c
+++ b/sys/arch/loongson/loongson/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.92 2020/11/17 16:33:44 visa Exp $ */
+/* $OpenBSD: machdep.c,v 1.93 2020/11/17 16:38:10 visa Exp $ */
/*
* Copyright (c) 2009, 2010, 2014 Miodrag Vallat.
@@ -391,7 +391,7 @@ loongson_efi_setup(void)
entry.type != PMON_MEM_SYSTEM_HIGH))
continue;
fp = atop(entry.address);
- lp = atop(entry.address + (entry.size << 20));
+ lp = atop(entry.address + ((uint64_t)entry.size << 20));
if (lp > atop(pfn_to_pad(PG_FRAME)) + 1)
lp = atop(pfn_to_pad(PG_FRAME)) + 1;
if (fp >= lp)