* kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
This commit is contained in:
parent
c2cdde70b3
commit
ea3f72cf0e
2 changed files with 13 additions and 14 deletions
|
@ -3,6 +3,7 @@
|
||||||
* kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
|
* kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
|
||||||
support for R_SPARC_OLO10 relocations. Fix compile warning for
|
support for R_SPARC_OLO10 relocations. Fix compile warning for
|
||||||
R_SPARC_WDISP30 case.
|
R_SPARC_WDISP30 case.
|
||||||
|
* kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
|
||||||
|
|
||||||
2009-04-06 Pavel Roskin <proski@gnu.org>
|
2009-04-06 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* cache.S - Flush the processor cache for a specific region. */
|
/* cache.S - Flush the processor cache for a specific region. */
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2005,2007 Free Software Foundation, Inc.
|
* Copyright (C) 2005,2007,2009 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
* GRUB is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -27,17 +27,15 @@
|
||||||
* void grub_arch_sync_caches (void *address, grub_size_t len)
|
* void grub_arch_sync_caches (void *address, grub_size_t len)
|
||||||
*/
|
*/
|
||||||
FUNCTION(grub_arch_sync_caches)
|
FUNCTION(grub_arch_sync_caches)
|
||||||
save %o6, -0xC, %o6 ! Get a new register window,
|
brz,pn %o1, 2f
|
||||||
! reserve space on stack for
|
add %o0, %o1, %o1
|
||||||
! %i0, %i1, %i2
|
add %o1, 7, %o1
|
||||||
brz,pn %i0, return ! Return if address == 0.
|
andn %o1, 7, %o1
|
||||||
|
andn %o0, 7, %o0
|
||||||
|
sub %o1, %o0, %o1
|
||||||
|
1: subcc %o1, 8, %o1
|
||||||
|
bne,pt %icc, 1b
|
||||||
|
flush %o0 + %o1
|
||||||
|
2: retl
|
||||||
nop
|
nop
|
||||||
brz,pn %i1, return ! Return if len == 0.
|
|
||||||
clr %i2 ! index = 0.
|
|
||||||
loop: flush %i0 + %i2 ! Flush address + index.
|
|
||||||
cmp %i1, %i2 ! Compare len & index .
|
|
||||||
bpos,a,pt %xcc, loop ! If len > index, loop.
|
|
||||||
add %i2, 8, %i2 ! Go to next doubleword.
|
|
||||||
return: ret ! Restore caller's register
|
|
||||||
restore ! window and return.
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue