summaryrefslogtreecommitdiff
path: root/src/northbridge/intel/i945/gma.c
diff options
context:
space:
mode:
authorPetr Cvek <petrcvekcz@gmail.com>2022-06-16 15:17:50 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-06-20 12:02:05 +0000
commitd6fb425ca69ae3c36e18c4be5c2a44f9b4fbdcf2 (patch)
tree69bcb388e22b3092fdabd326ad393189d0e0cb71 /src/northbridge/intel/i945/gma.c
parent3b0303dbe8c4883b329cab151de33d952baea02a (diff)
intel/gma: Use bitwise or instead addition for valid bit
Page table entries bit 0 is used as "valid". Its value should be set by a bitwise OR and not by an addition. Signed-off-by: Petr Cvek <petrcvekcz@gmail.com> Change-Id: I14467081c8279af4611007a25aefab606c61a058 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65172 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/northbridge/intel/i945/gma.c')
-rw-r--r--src/northbridge/intel/i945/gma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c
index 7f5aa094a1..d99a733773 100644
--- a/src/northbridge/intel/i945/gma.c
+++ b/src/northbridge/intel/i945/gma.c
@@ -343,7 +343,7 @@ static int intel_gma_init_lvds(struct northbridge_intel_i945_config *conf,
for (i = 0; i < (uma_size - 256) / 4; i++) {
outl((i << 2) | 1, piobase);
- outl(pphysbase + (i << 12) + 1, piobase + 4);
+ outl((pphysbase + (i << 12)) | 1, piobase + 4);
}
temp = read32(mmiobase + PGETBL_CTL);
@@ -521,7 +521,7 @@ static int intel_gma_init_vga(struct northbridge_intel_i945_config *conf,
for (i = 0; i < (uma_size - 256) / 4; i++) {
outl((i << 2) | 1, piobase);
- outl(pphysbase + (i << 12) + 1, piobase + 4);
+ outl((pphysbase + (i << 12)) | 1, piobase + 4);
}
/* Clear interrupts. */