1
0
mirror of git://projects.qi-hardware.com/iris.git synced 2025-04-21 12:27:27 +03:00

mass storage sort of working, but not nice

This commit is contained in:
Bas Wijnen
2010-10-07 09:52:04 +02:00
parent 87acc47fd9
commit 5f9fd7cc0f
9 changed files with 264 additions and 115 deletions

View File

@@ -19,6 +19,8 @@
asm volatile ("\t.set noreorder\n"
"\t.text\n"
"\t.globl __start\n"
"\t.globl addr_0\n"
"addr_0:\n"
"\t.word ~0\n"
"__start:\n"
"\tbal 1f\n"
@@ -33,6 +35,40 @@ asm volatile ("\t.set noreorder\n"
"\tla $t9, nandboot_start\n"
"\tjr $t9\n"
"\tnop\n"
"\t.fill 0x1b8 - (. - addr_0)\n"
"\t.word 0xd2b9e1a8\n" // Disk signature.
"\t.short 0x0000\n"
"\t.byte 0x00\n" // bootable: no.
"\t.byte 0x00, 0x02, 0x00\n" // first sector chs.
"\t.byte 0x83\n" // type.
"\t.byte 0x08, 0x18, 0x00\n" // last sector chs.
"\t.byte 0x01, 0x00, 0x00, 0x00\n" // first sector, lba.
"\t.byte 0xff, 0x01, 0x00, 0x00\n" // size, lba.
"\t.byte 0x00\n" // bootable: no.
"\t.byte 0x08, 0x19, 0x00\n" // first sector chs.
"\t.byte 0x83\n" // type.
"\t.byte 0x05, 0xe1, 0xf3\n" // last sector chs.
"\t.byte 0x00, 0x02, 0x00, 0x00\n" // first sector, lba: 256 kB.
"\t.byte 0x00, 0xfe, 0x1f, 0x00\n" // size, lba: 1 GB - first.
"\t.byte 0\n" // bootable: no.
"\t.byte 0, 0, 0\n" // first sector chs.
"\t.byte 0\n" // type.
"\t.byte 0, 0, 0\n" // last sector chs.
"\t.byte 0, 0, 0, 0\n" // first sector, lba.
"\t.byte 0, 0, 0, 0\n" // size, lba.
"\t.byte 0\n" // bootable: no.
"\t.byte 0, 0, 0\n" // first sector chs.
"\t.byte 0\n" // type.
"\t.byte 0, 0, 0\n" // last sector chs.
"\t.byte 0, 0, 0, 0\n" // first sector, lba.
"\t.byte 0, 0, 0, 0\n" // size, lba.
"\t.byte 0x55, 0xaa\n" // mbr signature.
"\t.set reorder")
#define __KERNEL__