Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  xip_fixup.h   Sprache: C

 
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * XIP fixup macros, only useful in assembly.
 */

#ifndef _ASM_RISCV_XIP_FIXUP_H
#define _ASM_RISCV_XIP_FIXUP_H

#include <linux/pgtable.h>

#ifdef CONFIG_XIP_KERNEL
.macro XIP_FIXUP_OFFSET reg
 /* Fix-up address in Flash into address in RAM early during boot before
 * MMU is up. Because generated code "thinks" data is in Flash, but it
 * is actually in RAM (actually data is also in Flash, but Flash is
 * read-only, thus we need to use the data residing in RAM).
 *
 * The start of data in Flash is _sdata and the start of data in RAM is
 * CONFIG_PHYS_RAM_BASE. So this fix-up essentially does this:
 * reg += CONFIG_PHYS_RAM_BASE - _start
 */

 li t0, CONFIG_PHYS_RAM_BASE
        add \reg, \reg, t0
 la t0, _sdata
 sub \reg, \reg, t0
.endm
.macro XIP_FIXUP_FLASH_OFFSET reg
 /* In linker script, at the transition from read-only section to
 * writable section, the VMA is increased while LMA remains the same.
 * (See in linker script how _sdata, __data_loc and LOAD_OFFSET is
 * changed)
 *
 * Consequently, early during boot before MMU is up, the generated code
 * reads the "writable" section at wrong addresses, because VMA is used
 * by compiler to generate code, but the data is located in Flash using
 * LMA.
 */

 la t0, _sdata
 sub \reg, \reg, t0
 la t0, __data_loc
 add \reg, \reg, t0
.endm
#else
.macro XIP_FIXUP_OFFSET reg
.endm
.macro XIP_FIXUP_FLASH_OFFSET reg
.endm
#endif /* CONFIG_XIP_KERNEL */

#endif

Messung V0.5
C=89 H=100 G=94

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge