OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [common/] [crt0.S] - Diff between revs 73 and 74

Show entire file | Details | Blame | View Log

Rev 73 Rev 74
Line 45... Line 45...
 
 
 
 
// ************************************************************************************************
// ************************************************************************************************
// This is the very first instruction that is executed after hardware reset. It ensures that x0 is
// This is the very first instruction that is executed after hardware reset. It ensures that x0 is
// written at least once - the CPU HW will ensure it is always set to zero on any write access.
// written at least once - the CPU HW will ensure it is always set to zero on any write access.
 
//
 
// Furthermore, we have to disable ALL interrupts, which is required if this code is part of a
 
// program uploaded by the on-chip debugger (potentionally taking control from the bootloader).
 
// We setup a new stack pointer here and WE DO NOT WANT TO trap to an outdated trap handler with
 
// a modified stack pointer.
// ************************************************************************************************
// ************************************************************************************************
  lui zero, 0 // "dummy" instruction that uses no reg-file input operands at all
  csrrci zero, mstatus, (1<<3) // disable global interrupt flag and write "anything" to x0
 
 
 
 
// ************************************************************************************************
// ************************************************************************************************
// Setup pointers using linker script symbols
// Setup pointers using linker script symbols
// ************************************************************************************************
// ************************************************************************************************

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.