/*
  Linloader, Boots Linux/ARM on RISC OS based systems.
  Copyright (C) 1999  Timothy Baldwin

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

/* $Id: boot.c,v 1.4 2004/01/20 17:39:15 pnaulls Exp $ */


#include "oslib/osfscontrol.h"
#include "oslib/podule.h"

#include "internal.h"

#include <stdio.h>


unsigned int lll_fixup_physical_addr;

void lll_start_linux(void) {
    if (lll_noboot) return;
    xos_cli("%rc5pc off");
    osfscontrol_shutdown();
    os_remove_cursors();
    os_cli("%cache off");
    /* This causes problems with ViewFinder and Select.  So we don't
       call it any more. */
    if (lll_sys_id != lll_id_riscpc)
      service_pre_reset();  /* Reset hardware */

    lll_mmu_off(lll_fixup_physical_addr, lll_sys_to_linux[lll_sys_id],
                lll_phys_memory + 0x8000, PAGE_SIZE);
}
