Linux-MIPS Archive on lore.kernel.org
 help / color / Atom feed
From: Fredrik Noring <noring@nocrew.org>
To: linux-mips@vger.kernel.org
Subject: [PATCH 036/120] MIPS: PS2: ROM: Iterate over the files in a given ROM directory
Date: Sun, 1 Sep 2019 17:49:36 +0200
Message-ID: <335c94c5e90f1422b7512c3a1ef1da4f0f1b212a.1567326213.git.noring@nocrew.org> (raw)
In-Reply-To: <cover.1567326213.git.noring@nocrew.org>

All PlayStation 2 machines have at least two read-only memories (ROMs)
called ROM0 and ROM1. A ROM consists of concatenated files forming a
directory.

The rom_for_each_file() iterator will be used to search for certain
ROM files in subsequent changes. The rom0:ROMVER file, for example,
contains information on the ROM version, the machine region, the
machine type (CEX for retail, DEX for debug, or TOOL), etc.

The input/output processor (IOP) of the PlayStation 2 links several
of its modules by reading ROM files. When the kernel links additional
modules to handle relayed interrupt services, for example, the kernel
module linker must resolve dependencies by identifying whether
libraries are linked as ROM or firmware files.

Signed-off-by: Fredrik Noring <noring@nocrew.org>
---
 arch/mips/include/asm/mach-ps2/rom.h |  79 +++++
 arch/mips/ps2/Makefile               |   1 +
 arch/mips/ps2/rom.c                  | 501 +++++++++++++++++++++++++++
 3 files changed, 581 insertions(+)
 create mode 100644 arch/mips/ps2/rom.c

diff --git a/arch/mips/include/asm/mach-ps2/rom.h b/arch/mips/include/asm/mach-ps2/rom.h
index 6760be183696..063c8b6acf15 100644
--- a/arch/mips/include/asm/mach-ps2/rom.h
+++ b/arch/mips/include/asm/mach-ps2/rom.h
@@ -8,10 +8,89 @@
 #ifndef __ASM_MACH_PS2_ROM_H
 #define __ASM_MACH_PS2_ROM_H
 
+#include <linux/types.h>
+
 #define ROM0_BASE	0x1fc00000	/* ROM0 base address (boot) */
 #define ROM0_SIZE	0x400000	/* ROM0 maximum size */
 
 #define ROM1_BASE	0x1e000000	/* ROM1 base address (DVD) */
 #define ROM1_SIZE	0x100000	/* ROM1 maximum size */
 
+struct rom_dir_entry;
+
+/**
+ * struct rom_dir - ROM directory
+ * @size: size in bytes of all files combined
+ * @data: pointer to data of all files combined
+ * @extinfo: extended information of all files combined
+ * @extinfo.size: size in bytes of all extended information combined
+ * @extinfo.data: pointer to data of all extended information combined
+ * @entries: pointer to array of ROM directory entries, with the terminating
+ * 	file as the last entry
+ *
+ * A directory is considered to be empty if @size is zero, in which case all
+ * members are zero.
+ */
+struct rom_dir {
+	size_t size;
+	const void *data;
+
+	struct {
+		size_t size;
+		const void *data;
+	} extinfo;
+
+	const struct rom_dir_entry *entries;
+};
+
+/**
+ * struct rom_file - ROM file
+ * @name: name of file, or the empty string for the terminating file
+ * @size: size in bytes of file
+ * @data: pointer to data of file
+ * @extinfo: extended ROM file information
+ * @extinfo.size: size in bytes of extended file information
+ * @extinfo.data: pointer to data of extended file information
+ * @next: pointer to next file, unless this is the terminating file
+ *
+ * A file is considered to be a terminating file if @name is the empty string.
+ * A terminating file is the last file in a &struct rom_dir directory.
+ */
+struct rom_file {
+	const char *name;
+	size_t size;
+	const void *data;
+
+	struct {
+		size_t size;
+		const void *data;
+	} extinfo;
+
+	const struct rom_dir_entry *next;
+};
+
+extern struct rom_dir rom0_dir;		/* ROM0 directory (boot) */
+extern struct rom_dir rom1_dir;		/* ROM1 directory (DVD) */
+
+/**
+ * rom_for_each_file - iterate over files in given ROM directory
+ * @file: &struct rom_file to use as a ROM file loop cursor
+ * @dir: &struct rom_dir with ROM directory to iterate over
+ *
+ * The statement following the macro is executed for ROM files in the
+ * directory.
+ */
+#define rom_for_each_file(file, dir)					\
+	for ((file) = rom_first_file(dir);				\
+	     !rom_terminating_file(file);				\
+	     (file) = rom_next_file(file))
+
+bool rom_empty_dir(const struct rom_dir dir);
+
+bool rom_terminating_file(const struct rom_file file);
+
+struct rom_file rom_next_file(const struct rom_file file);
+
+struct rom_file rom_first_file(const struct rom_dir dir);
+
 #endif /* __ASM_MACH_PS2_ROM_H */
diff --git a/arch/mips/ps2/Makefile b/arch/mips/ps2/Makefile
index d90d3e06387f..1101ad0d702b 100644
--- a/arch/mips/ps2/Makefile
+++ b/arch/mips/ps2/Makefile
@@ -2,5 +2,6 @@ obj-y		+= dmac-irq.o
 obj-y		+= intc-irq.o
 obj-y		+= irq.o
 obj-y		+= memory.o
+obj-y		+= rom.o
 obj-y		+= scmd.o
 obj-y		+= time.o
diff --git a/arch/mips/ps2/rom.c b/arch/mips/ps2/rom.c
new file mode 100644
index 000000000000..12a57f24bd63
--- /dev/null
+++ b/arch/mips/ps2/rom.c
@@ -0,0 +1,501 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * PlayStation 2 read-only memory (ROM)
+ *
+ * Copyright (C) 2019 Fredrik Noring
+ */
+
+/**
+ * DOC: PlayStation 2 read-only memory (ROM) layout and handling
+ *
+ * All PlayStation 2 machines have at least two ROMs called ROM0 and ROM1.
+ * A ROM consists of concatenated files. All known ROMs have the three files
+ * named RESET, ROMDIR and EXTINFO at the very beginning of the ROM:
+ *
+ *	- RESET: The internal structure of this file is currently unknown.
+ *	- ROMDIR: Array of 16-byte &rom_dir_entry directory entries. The file
+ *		name of the last entry is empty and this file is designated
+ *		the terminating file.
+ *	- EXTINFO: Concatenated variable length extended information entries,
+ *		where &rom_dir_entry.extinfo.size gives the size in bytes of
+ *		each entry.
+ *
+ * Since the internal layout of the RESET file is unknown, this implementation
+ * searches for the ROMDIR file by looking after the ``"RESET"`` string that
+ * is always the first entry of the ROMDIR file directory structure.
+ *
+ * Then the ROMDIR and EXTINFO files, and finally the whole ROM, are validated.
+ * The ROM is accepted if no structural errors are found. Otherwise the ROM is
+ * discarded and an error message is printed.
+ *
+ * Example of a ROM0 directory structure, as decoded from the ROMDIR file:
+ *
+ *	=================== =========================== ===================
+ *	&rom_dir_entry.name &rom_dir_entry.extinfo.size &rom_dir_entry.size
+ *	              RESET                          12               10048
+ *	             ROMDIR                          80                1584
+ *	            EXTINFO                           0                2028
+ *	             ROMVER                           0                  16
+ *	               SBIN                          12               28576
+ *	               LOGO                          12               83604
+ *	          IOPBTCONF                           8                 234
+ *	          IOPBTCON2                           8                 195
+ *	             SYSMEM                          40                4625
+ *	           LOADCORE                          32                9597
+ *	                ...                         ...                 ...
+ *	            PS2LOGO                          12              216260
+ *	             OSDSYS                          12              336808
+ *	             KERNEL                          12               93736
+ *	                                              0                   0
+ *	=================== =========================== ===================
+ *
+ * In this example the RESET file is 10048 bytes, which means that the offset
+ * to the ROMDIR file is 10048 bytes. This is also the location of the
+ * ``"RESET"`` string. The size of the ROMDIR file is 1584 bytes, which means
+ * there are 1584 / 16 = 99 files, including the terminating file. Thus there
+ * are 98 normal files, excluding the terminating file.
+ *
+ * The sum of all &rom_dir_entry.extinfo.size correspond to the size of the
+ * EXTINFO file, which is 2028 bytes in this case. The sum of all
+ * &rom_dir_entry.size is the size of the ROM, which is 3900816 bytes in this
+ * case.
+ *
+ * Files are padded to align with 16 byte boundaries. The EXTINFO file, in
+ * this example, is therefore padded to 2032 bytes. Some files named ``-``
+ * contain zeros only and seem to be padding to align the following file to
+ * a specific address.
+ */
+
+#include <linux/build_bug.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+
+#include <asm/io.h>
+
+#include <asm/mach-ps2/rom.h>
+
+struct rom_dir rom0_dir;
+struct rom_dir rom1_dir;
+EXPORT_SYMBOL_GPL(rom0_dir);
+EXPORT_SYMBOL_GPL(rom1_dir);
+
+/**
+ * struct rom - ROM object
+ * @name: name of ROM, for example "rom0" or "rom1"
+ * @base: virtual address of ROM
+ * @size: ROM size in bytes
+ */
+struct rom {
+	const char *name;
+	const void *base;
+	size_t size;
+};
+
+/**
+ * struct rom_dir_entry - raw 16-byte ROM directory entry of the ROMDIR file
+ * @name: file name; the empty string for the last terminating file
+ * @extinfo: extended ROM file information
+ * @extinfo.size: size in bytes of extended ROM file information
+ * @size: file size in bytes
+ */
+struct rom_dir_entry {
+	char name[10];
+	struct {
+		u16 size;
+	} extinfo;
+	u32 size;
+};
+
+/**
+ * rom_align_file_size - align ROM file size to 16 byte boundaries
+ * @size: possibly unaligned ROM size in bytes
+ *
+ * The aligned file size is used to obtain the offset to the subsequent file
+ * in a ROM.
+ *
+ * Return: padded file size in bytes, aligned to 16 byte boundaries
+ */
+static size_t rom_align_file_size(size_t size)
+{
+	return ALIGN(size, 16);
+}
+
+/**
+ * rom_next_extinfo_data - pointer to the EXTINFO entry for the subsequent file
+ * @file: file to find the next EXTINFO entry pointer for
+ *
+ * Return: pointer to the following EXTINFO entry
+ */
+static const void *rom_next_extinfo_data(const struct rom_file *file)
+{
+	const u8 *d = file->extinfo.data;
+
+	return &d[file->extinfo.size];
+}
+
+/**
+ * rom_next_data - pointer to the data for the subsequent file
+ * @file: file to find the next data pointer for
+ *
+ * Return: pointer to the data for the subsequent file
+ */
+static const void *rom_next_data(const struct rom_file *file)
+{
+	const u8 *d = file->data;
+
+	return &d[rom_align_file_size(file->size)];
+}
+
+/**
+ * rom_empty_dir - is the ROM directory empty?
+ * @dir: ROM directory to check
+ *
+ * Context: any
+ * Return: %true if the ROM directory is empty, else %false
+ */
+bool rom_empty_dir(const struct rom_dir dir)
+{
+	return !dir.size;
+}
+EXPORT_SYMBOL_GPL(rom_empty_dir);
+
+/**
+ * rom_terminating_file - is this a terminating ROM file?
+ * @file: ROM file to check
+ *
+ * Context: any
+ * Return: %true if the ROM file is a terminating entry, else %false
+ */
+bool rom_terminating_file(const struct rom_file file)
+{
+	return file.name[0] == '\0';
+}
+EXPORT_SYMBOL_GPL(rom_terminating_file);
+
+/**
+ * rom_next_file - advance to next ROM file, unless terminating file is given
+ * @file: ROM file to advance from
+ *
+ * Context: any
+ * Return: next ROM file, or a terminating file
+ */
+struct rom_file rom_next_file(const struct rom_file file)
+{
+	if (rom_terminating_file(file))
+		return file;
+
+	return (struct rom_file) {
+			.name = file.next->name,
+			.size = file.next->size,
+			.data = rom_next_data(&file),
+			.extinfo = {
+				.size = file.next->extinfo.size,
+				.data = rom_next_extinfo_data(&file)
+			},
+			.next = &file.next[file.next->name[0] != '\0' ? 1 : 0]
+		};
+}
+EXPORT_SYMBOL_GPL(rom_next_file);
+
+/**
+ * rom_first_file - first ROM file of a ROM directory
+ * @dir: ROM directory to retrieve the first file for
+ *
+ * Context: any
+ * Return: first ROM file, or a terminating file if the directory is empty
+ */
+struct rom_file rom_first_file(const struct rom_dir dir)
+{
+	if (rom_empty_dir(dir))
+		return (struct rom_file) { .name = "" };
+
+	return (struct rom_file) {
+			.name = dir.entries->name,
+			.size = dir.entries->size,
+			.data = dir.data,
+			.extinfo = {
+				.size = dir.entries->extinfo.size,
+				.data = dir.extinfo.data
+			},
+			.next = &dir.entries[1]
+		};
+}
+EXPORT_SYMBOL_GPL(rom_first_file);
+
+/**
+ * find_reset_string - find the offset to the ``"RESET"`` string, if it exists
+ * @rom: ROM to search in
+ *
+ * The ``"RESET"`` string that is always the first entry of the ROMDIR file
+ * directory structure.
+ *
+ * Return: byte offset to ``"RESET"``, or the size of the ROM on failure
+ */
+static loff_t __init find_reset_string(const struct rom rom)
+{
+	const char *s = rom.base;
+	size_t i;
+
+	for (i = 0; i + sizeof(struct rom_dir_entry) <= rom.size; i++)
+		if (s[i + 0] == 'R' &&
+		    s[i + 1] == 'E' &&
+		    s[i + 2] == 'S' &&
+		    s[i + 3] == 'E' &&
+		    s[i + 4] == 'T' &&
+		    s[i + 5] == '\0')
+			return i;
+
+	return rom.size;
+}
+
+/**
+ * rom_addr - pointer at offset within a given ROM object
+ * @rom: ROM object
+ * @offset: offset in bytes for the pointer location
+ * @size: size in bytes of the data at the given offset
+ *
+ * Return: ROM pointer, or %NULL if @size at the @offset is outside of the ROM
+ */
+static const void * __init rom_addr(
+	const struct rom rom, loff_t offset, size_t size)
+{
+	const u8 *b = rom.base;
+
+	return offset + size <= rom.size ? &b[offset] : NULL;
+}
+
+/**
+ * valid_rom_dir_entry_name - does the ROM directory entry has a valid name?
+ * @entry: ROM directory entry
+ *
+ * Return: %true if the ROM directory entry has a valid name, otherwise %false
+ */
+static bool __init valid_rom_dir_entry_name(const struct rom_dir_entry *entry)
+{
+	size_t i;
+
+	for (i = 0; i < ARRAY_SIZE(entry->name); i++)
+		if (entry->name[i] == '\0')
+			return true;
+
+	return false;
+}
+
+/**
+ * rom_dir_entry - ROM directory entry for a given ROM index
+ * @rom: ROM object
+ * @reset_offset: offset in bytes from ROM object start to the RESET file
+ * @entry_index: file index starting from zero
+ *
+ * Return: ROM directory entry for the given index
+ */
+static const struct rom_dir_entry * __init rom_dir_entry(
+	const struct rom rom, loff_t reset_offset, size_t entry_index)
+{
+	return rom_addr(rom,
+		reset_offset + entry_index * sizeof(struct rom_dir_entry),
+		sizeof(struct rom_dir_entry));
+}
+
+/**
+ * valid_rom_dir_header - is the ROM object valid?
+ * @rom: ROM object
+ * @reset_offset: offset in bytes from ROM object start to the RESET file
+ * @reset: the RESET ROM file
+ * @romdir: the ROMDIR ROM file
+ * @extinfo: the EXTINFO ROM file
+ *
+ * This verifies some of the assumptions that are made about read-only memories.
+ *
+ * Return: %true if the ROM appears to have a valid header, otherwise %false
+ */
+static bool __init valid_rom_dir_header(const struct rom rom,
+	const loff_t reset_offset,
+	const struct rom_dir_entry *reset,
+	const struct rom_dir_entry *romdir,
+	const struct rom_dir_entry *extinfo)
+{
+	size_t aligned_rom_header_size;
+
+	if (!reset || !romdir || !extinfo) {
+		pr_debug("%s: Missing RESET, ROMDIR or EXTINFO\n", rom.name);
+		return false;
+	}
+
+	if (strcmp(reset->name, "RESET") != 0 ||
+	    strcmp(romdir->name, "ROMDIR") != 0 ||
+	    strcmp(extinfo->name, "EXTINFO") != 0) {
+		pr_debug("%s: Misnamed RESET, ROMDIR or EXTINFO\n", rom.name);
+		return false;
+	}
+
+	if (rom_align_file_size(reset->size) != reset_offset) {
+		pr_debug("%s: Unaligned RESET %zu != %llu\n", rom.name,
+			rom_align_file_size(reset->size), reset_offset);
+		return false;
+	}
+
+	if (romdir->size % sizeof(struct rom_dir_entry) != 0) {
+		pr_debug("%s: ROMDIR unaligned %zu\n", rom.name, romdir->size);
+		return false;
+	}
+
+	aligned_rom_header_size =
+		rom_align_file_size(reset->size) +
+		rom_align_file_size(romdir->size) +
+		rom_align_file_size(extinfo->size);
+	if (aligned_rom_header_size > rom.size) {
+		pr_debug("%s: ROM header to large %zu > %zu\n", rom.name,
+			aligned_rom_header_size, rom.size);
+		return false;
+	}
+
+	return true;
+}
+
+/**
+ * rom_dir_size - total ROM object file size in bytes
+ * @rom: ROM object
+ * @reset: the RESET ROM file
+ * @romdir: the ROMDIR ROM file
+ * @extinfo: the EXTINFO ROM file
+ *
+ * Return: total size in bytes of all files for the ROM object
+ */
+static size_t __init rom_dir_size(const struct rom rom,
+	const struct rom_dir_entry *reset,
+	const struct rom_dir_entry *romdir,
+	const struct rom_dir_entry *extinfo)
+{
+	const size_t n = romdir->size / sizeof(struct rom_dir_entry);
+	const struct rom_dir_entry *entries = reset;
+	size_t extinfo_size = 0;
+	size_t size = 0;
+	size_t i;
+
+	if (!n) {
+		pr_debug("%s: Missing terminating entry\n", rom.name);
+		return 0;
+	}
+
+	if (entries[n - 1].name[0] != '\0') {
+		pr_debug("%s: Nonterminating name: \"%s\"\n", rom.name,
+			entries[n - 1].name);
+		return 0;
+	}
+
+	for (i = 0; i < n; i++) {
+		if (!valid_rom_dir_entry_name(&entries[i])) {
+			pr_debug("%s: Invalid entry name\n", rom.name);
+			return 0;
+		}
+
+		extinfo_size += entries[i].extinfo.size;
+		size += rom_align_file_size(entries[i].size);
+	}
+
+	if (extinfo_size > extinfo->size) {
+		pr_debug("%s: EXTINFO too large %zu > %zu\n", rom.name,
+			extinfo_size, extinfo->size);
+		return 0;
+	}
+
+	if (size > rom.size) {
+		pr_debug("%s: ROM size too large %zu > %zu\n", rom.name,
+			size, rom.size);
+		return 0;
+	}
+
+	pr_info("%s: Found %zu files in %zu bytes\n", rom.name, n - 1, size);
+
+	return size;
+}
+
+/**
+ * extinfo_data - data for the EXTINFO ROM file
+ * @rom: read-only memory object
+ * @reset: the RESET ROM file
+ * @romdir: the ROMDIR ROM file
+ *
+ * The EXTINFO file comes as the third file after RESET and ROMDIR.
+ *
+ * Return: EXTINFO ROM file data
+ */
+static const void * __init extinfo_data(const struct rom rom,
+	const struct rom_dir_entry *reset,
+	const struct rom_dir_entry *romdir)
+{
+	const u8 *b = rom.base;
+
+	return &b[rom_align_file_size(reset->size) +
+		  rom_align_file_size(romdir->size)];
+}
+
+/**
+ * rom_dir_for_rom - the ROM directory for a given ROM object
+ * @rom: ROM object
+ *
+ * Return: ROM directory
+ */
+static struct rom_dir __init rom_dir_for_rom(const struct rom rom)
+{
+	const loff_t reset_offset = find_reset_string(rom);
+	struct rom_dir dir = { };
+	size_t size;
+
+	/* RESET, ROMDIR and EXTINFO always come at indices 0, 1, 2. */
+	const struct rom_dir_entry
+		*reset   = rom_dir_entry(rom, reset_offset, 0),
+		*romdir  = rom_dir_entry(rom, reset_offset, 1),
+		*extinfo = rom_dir_entry(rom, reset_offset, 2);
+
+	if (!valid_rom_dir_header(rom, reset_offset, reset, romdir, extinfo))
+		return dir;
+
+	size = rom_dir_size(rom, reset, romdir, extinfo);
+	if (!size)
+		return dir;
+
+	dir.size = size;
+	dir.data = rom.base;
+	dir.extinfo.size = extinfo->size;
+	dir.extinfo.data = extinfo_data(rom, reset, romdir);
+	dir.entries = reset;
+
+	return dir;
+}
+
+/**
+ * rom_dir_init - the ROM directory for a given physical address
+ * @name: name of the ROM object
+ * @rom_phys_base: physical address of the ROM
+ * @rom_size: maximum size in bytes of the ROM
+ *
+ * The ROM directory is adjusted to the actual total size of the ROM files.
+ *
+ * Return: ROM directory
+ */
+static struct rom_dir __init rom_dir_init(const char *name,
+	phys_addr_t rom_phys_base, size_t rom_size)
+{
+	const struct rom rom = {
+		.name = name,
+		.base = phys_to_virt(rom_phys_base),
+		.size = rom_size
+	};
+
+	return rom_dir_for_rom(rom);
+}
+
+static int __init ps2_rom_init(void)
+{
+	BUILD_BUG_ON(sizeof(struct rom_dir_entry) != 16);
+
+	rom0_dir = rom_dir_init("rom0", ROM0_BASE, ROM0_SIZE);
+	rom1_dir = rom_dir_init("rom1", ROM1_BASE, ROM1_SIZE);
+
+	return 0;
+}
+arch_initcall(ps2_rom_init);
-- 
2.21.0


  parent reply index

Thread overview: 152+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-01 15:35 [PATCH 000/120] Linux for the PlayStation 2 Fredrik Noring
2019-09-01 15:35 ` [PATCH 001/120] MIPS: R5900: Initial support for the Emotion Engine in " Fredrik Noring
2019-09-01 21:14   ` Maciej W. Rozycki
2019-09-02 15:09     ` Fredrik Noring
2019-09-01 15:36 ` [PATCH 002/120] MIPS: R5900: Trap the RDHWR instruction as an SQ address exception Fredrik Noring
2019-09-01 22:00   ` Maciej W. Rozycki
2019-09-01 15:36 ` [PATCH 003/120] MIPS: R5900: Sign-extend o32 system call registers Fredrik Noring
2019-09-01 15:37 ` [PATCH 004/120] MIPS: R5900: Reset bits 127..64 of GPRs in RESTORE_SOME Fredrik Noring
2019-09-01 15:38 ` [PATCH 005/120] MIPS: R5900: Reset the funnel shift amount (SA) register " Fredrik Noring
2019-09-01 15:38 ` [PATCH 006/120] MIPS: R5900: Workaround for the short loop bug Fredrik Noring
2019-09-01 15:39 ` [PATCH 007/120] MIPS: R5900: Add the SYNC.P instruction Fredrik Noring
2019-09-01 15:39 ` [PATCH 008/120] MIPS: R5900: Add implicit SYNC.P to the UASM_i_M[FT]C0 macros Fredrik Noring
2019-09-01 15:39 ` [PATCH 009/120] MIPS: R5900: Add mandatory SYNC.P to all M[FT]C0 instructions Fredrik Noring
2019-09-01 15:39 ` [PATCH 010/120] MIPS: R5900: Workaround exception NOP execution bug (FLX05) Fredrik Noring
2019-09-01 23:01   ` Philippe Mathieu-Daudé
2019-09-01 15:40 ` [PATCH 011/120] MIPS: R5900: Avoid pipeline hazard with the TLBP instruction Fredrik Noring
2019-09-01 17:15   ` Sergei Shtylyov
2019-09-01 17:36     ` Fredrik Noring
2019-09-01 15:40 ` [PATCH 012/120] MIPS: R5900: Avoid pipeline hazards with the TLBW[IR] instructions Fredrik Noring
2019-09-01 15:40 ` [PATCH 013/120] MIPS: R5900: Avoid pipeline hazard with the TLBR instruction Fredrik Noring
2019-09-01 15:41 ` [PATCH 014/120] MIPS: R5900: Install final length of TLB refill handler rather than 256 bytes Fredrik Noring
2019-09-01 15:41 ` [PATCH 015/120] MIPS: R5900: Verify that the TLB refill handler does not overflow Fredrik Noring
2019-09-01 15:41 ` [PATCH 016/120] MIPS: R5900: The ERET instruction has issues with delay slot and CACHE Fredrik Noring
2019-09-01 15:42 ` [PATCH 017/120] MIPS: R5900: Define CACHE instruction operation field encodings Fredrik Noring
2019-09-01 15:42 ` [PATCH 018/120] MIPS: R5900: Workaround where MSB must be 0 for the instruction cache Fredrik Noring
2019-09-01 15:42 ` [PATCH 019/120] MIPS: R5900: Use SYNC.L for data cache and SYNC.P for " Fredrik Noring
2019-09-01 15:43 ` [PATCH 020/120] MIPS: R5900: Define CP0.Config register fields Fredrik Noring
2019-09-01 23:04   ` Philippe Mathieu-Daudé
2019-09-01 15:43 ` [PATCH 021/120] MIPS: R5900: Workaround for CACHE instruction near branch delay slot Fredrik Noring
2019-09-01 15:46 ` [PATCH 022/120] MIPS: R5900: Support 64-bit inq() and outq() macros in 32-bit kernels Fredrik Noring
2019-09-04  1:04   ` Jiaxun Yang
2019-09-04 16:00     ` Maciej W. Rozycki
2019-09-01 15:46 ` [PATCH 023/120] MIPS: R5900: Add MFSA and MTSA instructions for the special SA register Fredrik Noring
2019-09-01 15:46 ` [PATCH 024/120] MIPS: PS2: Define PlayStation 2 I/O port, ROM and RAM address spaces Fredrik Noring
2019-09-01 15:47 ` [PATCH 025/120] MIPS: PS2: Define interrupt controller, DMA and timer IRQs Fredrik Noring
2019-09-01 15:47 ` [PATCH 026/120] MIPS: PS2: Interrupt controller (INTC) IRQ support Fredrik Noring
2019-09-01 15:47 ` [PATCH 027/120] MIPS: PS2: DMAC: Define DMA controller registers Fredrik Noring
2019-09-01 15:47 ` [PATCH 028/120] MIPS: PS2: DMAC: Define tag structures Fredrik Noring
2019-09-01 15:48 ` [PATCH 029/120] MIPS: PS2: DMAC: IRQ support Fredrik Noring
2019-09-01 15:48 ` [PATCH 030/120] MIPS: PS2: Timer support Fredrik Noring
2019-09-01 15:48 ` [PATCH 031/120] MIPS: PS2: SCMD: System command support Fredrik Noring
2019-09-01 15:48 ` [PATCH 032/120] MIPS: PS2: SCMD: System power off command Fredrik Noring
2019-09-01 15:48 ` [PATCH 033/120] MIPS: PS2: SCMD: Read system machine name command Fredrik Noring
2019-09-01 15:49 ` [PATCH 034/120] MIPS: PS2: SCMD: Read system command for the real-time clock (RTC) Fredrik Noring
2019-09-01 15:49 ` [PATCH 035/120] MIPS: PS2: SCMD: Set " Fredrik Noring
2019-09-01 15:49 ` Fredrik Noring [this message]
2019-09-01 15:49 ` [PATCH 037/120] MIPS: PS2: ROM: Find ROM files with a given name, if they exist Fredrik Noring
2019-09-01 15:50 ` [PATCH 038/120] MIPS: PS2: ROM: Read data for a given ROM file name Fredrik Noring
2019-09-02  9:05   ` Sergei Shtylyov
2019-09-04 11:46     ` Sergei Shtylyov
2019-09-06 13:07       ` Fredrik Noring
2019-09-01 15:50 ` [PATCH 039/120] MIPS: PS2: ROM: Read extended information for a given ROM file Fredrik Noring
2019-09-01 15:50 ` [PATCH 040/120] MIPS: PS2: ROM: Read and decode the ROMVER file Fredrik Noring
2019-09-01 15:52 ` [PATCH 041/120] MIPS: PS2: ROM: Resolve the name for the type in " Fredrik Noring
2019-09-01 15:52 ` [PATCH 042/120] MIPS: PS2: ROM: Resolve the name for the region " Fredrik Noring
2019-09-01 15:53 ` [PATCH 043/120] MIPS: PS2: ROM: Permit /dev/mem to access read-only memory Fredrik Noring
2019-09-01 15:53 ` [PATCH 044/120] MIPS: PS2: ROM: Sysfs module to inspect ROM files Fredrik Noring
2019-09-01 15:54 ` [PATCH 045/120] MIPS: PS2: ROM: Provide extended file information via sysfs Fredrik Noring
2019-09-01 15:54 ` [PATCH 046/120] MIPS: PS2: Identify the machine by model name Fredrik Noring
2019-09-01 15:54 ` [PATCH 047/120] MIPS: PS2: Let the system type be Sony PlayStation 2 Fredrik Noring
2019-09-01 23:09   ` Philippe Mathieu-Daudé
2019-09-01 15:55 ` [PATCH 048/120] MIPS: Define and use cpu_relax_forever() for various halting loops Fredrik Noring
2019-09-01 15:55 ` [PATCH 049/120] MIPS: PS2: Power off support Fredrik Noring
2019-09-01 15:55 ` [PATCH 050/120] MIPS: PS2: Real-time clock (RTC) driver Fredrik Noring
2019-09-01 15:56 ` [PATCH 051/120] MIPS: PS2: IOP: I/O processor DMA register PCR2 set and clear Fredrik Noring
2019-09-01 15:57 ` [PATCH 052/120] MIPS: PS2: SIF: Sub-system interface reset of the I/O processor (IOP) Fredrik Noring
2019-09-01 15:57 ` [PATCH 053/120] MIPS: PS2: IOP: Define error numbers, descriptions and errno mapping Fredrik Noring
2019-09-01 15:58 ` [PATCH 054/120] MIPS: PS2: SIF: SIF register write command support Fredrik Noring
2019-09-01 15:58 ` [PATCH 055/120] MIPS: PS2: SIF: Respond to remote procedure call (RPC) bind command Fredrik Noring
2019-09-01 15:58 ` [PATCH 056/120] MIPS: PS2: SIF: Respond to RPC bind end command Fredrik Noring
2019-09-01 15:59 ` [PATCH 057/120] MIPS: PS2: SIF: Reset the SIF0 (sub-to-main) DMA controller Fredrik Noring
2019-09-01 15:59 ` [PATCH 058/120] MIPS: PS2: SIF: Handle SIF0 (sub-to-main) RPCs via interrupts Fredrik Noring
2019-09-01 15:59 ` [PATCH 059/120] MIPS: PS2: SIF: Enable the IOP to issue SIF commands Fredrik Noring
2019-09-01 16:00 ` [PATCH 060/120] MIPS: PS2: SIF: Enable the IOP to issue SIF RPCs Fredrik Noring
2019-09-01 16:01 ` [PATCH 061/120] MIPS: PS2: SIF: sif_rpc_bind() to request an RPC server connection Fredrik Noring
2019-09-01 16:02 ` [PATCH 062/120] MIPS: PS2: SIF: sif_rpc_unbind() to release " Fredrik Noring
2019-09-01 16:02 ` [PATCH 063/120] MIPS: PS2: SIF: sif_rpc() to issue a remote procedure call Fredrik Noring
2019-09-01 16:03 ` [PATCH 064/120] MIPS: PS2: IOP: Permit /dev/mem to access IOP memory Fredrik Noring
2019-09-01 16:03 ` [PATCH 065/120] MIPS: PS2: IOP: I/O processor memory support Fredrik Noring
2019-09-01 16:10 ` [PATCH 066/120] FIXME: Export _dma_cache_{wback,wback_inv,inv} Fredrik Noring
2019-09-01 16:10 ` [PATCH 067/120] MIPS: PS2: IOP: Module linking support Fredrik Noring
2019-09-01 16:11 ` [PATCH 068/120] MIPS: PS2: IOP: Verify that modules are IRX objects Fredrik Noring
2019-09-01 16:11 ` [PATCH 069/120] MIPS: PS2: IOP: Module version compatibility verification Fredrik Noring
2019-09-01 16:11 ` [PATCH 070/120] MIPS: PS2: IOP: Avoid linking already linked library modules Fredrik Noring
2019-09-01 16:12 ` [PATCH 071/120] MIPS: PS2: IOP: Resolve module dependencies Fredrik Noring
2019-09-01 16:12 ` [PATCH 072/120] MIPS: PS2: IOP: SIF printk command support Fredrik Noring
2019-09-01 17:44   ` Sergei Shtylyov
2019-09-01 18:08     ` Fredrik Noring
2019-09-01 16:16 ` [PATCH 073/120] MIPS: PS2: IOP: Heap memory allocate and free Fredrik Noring
2019-09-01 16:16 ` [PATCH 074/120] MIPS: PS2: SIF: Request RPC IRQ command Fredrik Noring
2019-09-01 16:17 ` [PATCH 075/120] MIPS: PS2: IOP: IRQ support Fredrik Noring
2019-09-01 16:17 ` [PATCH 076/120] MIPS: PS2: GS: Define privileged Graphics Synthesizer registers Fredrik Noring
2019-09-01 16:18 ` [PATCH 077/120] MIPS: PS2: GS: Write privileged registers Fredrik Noring
2019-09-01 16:18 ` [PATCH 078/120] MIPS: PS2: GS: Read " Fredrik Noring
2019-09-01 16:18 ` [PATCH 079/120] MIPS: PS2: GS: Define privileged register structures Fredrik Noring
2019-09-01 16:19 ` [PATCH 080/120] MIPS: PS2: GS: Define gs_xorq_imr() Fredrik Noring
2019-09-01 16:20 ` [PATCH 081/120] MIPS: PS2: GS: Privileged register write macros with named fields Fredrik Noring
2019-09-01 16:20 ` [PATCH 082/120] MIPS: PS2: GS: IRQ support Fredrik Noring
2019-09-01 16:21 ` [PATCH 083/120] MIPS: PS2: GS: Define Graphics Synthesizer primitive structures Fredrik Noring
2019-09-01 16:21 ` [PATCH 084/120] MIPS: PS2: GIF: Define Graphics Synthesizer interface structures Fredrik Noring
2019-09-01 16:22 ` [PATCH 085/120] MIPS: PS2: GIF: Graphics Synthesizer interface support Fredrik Noring
2019-09-01 16:22 ` [PATCH 086/120] MIPS: PS2: GS: Graphics Synthesizer device init and video clock Fredrik Noring
2019-09-01 16:23 ` [PATCH 087/120] MIPS: PS2: GS: Compute block count and indices Fredrik Noring
2019-09-01 16:23 ` [PATCH 088/120] MIPS: PS2: GS: Primitive and texel coordinate transformations Fredrik Noring
2019-09-01 16:23 ` [PATCH 089/120] MIPS: PS2: GS: Approximate video region with ROM region Fredrik Noring
2019-09-01 16:24 ` [PATCH 090/120] macro: Extend COUNT_ARGS() from 12 to 32 arguments Fredrik Noring
2019-09-01 16:25 ` [PATCH 091/120] MIPS: PS2: GS: Show privileged registers with sysfs Fredrik Noring
2019-09-01 16:25 ` [PATCH 092/120] MIPS: PS2: GS: Store " Fredrik Noring
2019-09-01 16:25 ` [PATCH 093/120] fbdev: Add fb_warn_once() variant that only prints a warning once Fredrik Noring
2019-09-01 23:12   ` Philippe Mathieu-Daudé
2019-09-01 16:26 ` [PATCH 094/120] MIPS: PS2: FB: Frame buffer driver for the PlayStation 2 Fredrik Noring
2019-09-02  1:12   ` Jiaxun Yang
2019-09-02 14:40     ` Fredrik Noring
2019-09-02 17:47       ` Aaro Koskinen
2019-09-03 14:32         ` Fredrik Noring
2019-09-03  4:01       ` Jiaxun Yang
2019-09-03 17:42         ` Fredrik Noring
2019-09-03 17:59           ` Maciej W. Rozycki
2019-09-03 18:46             ` Fredrik Noring
2019-09-01 16:30 ` [PATCH 095/120] MIPS: PS2: FB: fb_set_par() standard-definition television support Fredrik Noring
2019-09-01 16:30 ` [PATCH 096/120] MIPS: PS2: FB: fb_set_par() high-definition " Fredrik Noring
2019-09-01 16:31 ` [PATCH 097/120] MIPS: PS2: FB: fb_set_par() VESA computer display mode support Fredrik Noring
2019-09-01 16:31 ` [PATCH 098/120] MIPS: PS2: FB: Preconfigure standard PAL, NTSC and VESA display modes Fredrik Noring
2019-09-01 16:31 ` [PATCH 099/120] MIPS: PS2: FB: Reset the Graphics Synthesizer drawing environment Fredrik Noring
2019-09-01 16:32 ` [PATCH 100/120] MIPS: PS2: FB: Clear the display buffer when changing video modes Fredrik Noring
2019-09-01 16:32 ` [PATCH 101/120] MIPS: PS2: FB: fb_setcolreg() 256 colour pseudo palette support Fredrik Noring
2019-09-01 16:32 ` [PATCH 102/120] MIPS: PS2: FB: fb_settile() with font stored as palette indexed textures Fredrik Noring
2019-09-01 16:32 ` [PATCH 103/120] MIPS: PS2: FB: Hardware accelerated fb_tilecopy() support Fredrik Noring
2019-09-01 16:33 ` [PATCH 104/120] MIPS: PS2: FB: Hardware accelerated fb_tilefill() support Fredrik Noring
2019-09-01 16:33 ` [PATCH 105/120] MIPS: PS2: FB: Simplified fb_tileblit() support Fredrik Noring
2019-09-01 16:33 ` [PATCH 106/120] MIPS: PS2: FB: fb_tilecursor() placeholder Fredrik Noring
2019-09-01 16:33 ` [PATCH 107/120] MIPS: PS2: FB: Hardware accelerated fb_pan_display() support Fredrik Noring
2019-09-01 16:34 ` [PATCH 108/120] MIPS: PS2: FB: fb_blank() display power management signaling (DPMS) Fredrik Noring
2019-09-01 16:34 ` [PATCH 109/120] MIPS: PS2: FB: Disable GIF DMA completion interrupts Fredrik Noring
2019-09-01 16:34 ` [PATCH 110/120] MIPS: PS2: FB: PAL and NTSC grayscale support Fredrik Noring
2019-09-01 16:34 ` [PATCH 111/120] MIPS: PS2: FB: Analogue display mode adjustment module parameter Fredrik Noring
2019-09-01 16:35 ` [PATCH 112/120] USB: OHCI: Support for the PlayStation 2 Fredrik Noring
2019-09-01 16:35 ` [PATCH 113/120] USB: OHCI: OHCI_INTR_MIE workaround for freeze on " Fredrik Noring
2019-09-01 16:35 ` [PATCH 114/120] MIPS: PS2: Workaround for unexpected uLaunchELF CP0 Status user mode Fredrik Noring
2019-09-01 16:35 ` [PATCH 115/120] MIPS: PS2: Define initial PlayStation 2 devices Fredrik Noring
2019-09-01 16:35 ` [PATCH 116/120] MIPS: PS2: Define workarounds related to the PlayStation 2 Fredrik Noring
2019-09-01 16:36 ` [PATCH 117/120] MIPS: PS2: Define R5900 feature overrides Fredrik Noring
2019-09-01 16:36 ` [PATCH 118/120] MIPS: PS2: Define the PlayStation 2 platform Fredrik Noring
2019-09-01 16:36 ` [PATCH 119/120] MIPS: PS2: Initial support for the Sony PlayStation 2 Fredrik Noring
2019-09-01 16:37 ` [PATCH 120/120] MIPS: Fix name of BOOT_MEM_ROM_DATA Fredrik Noring
2019-09-01 23:15   ` Philippe Mathieu-Daudé
2019-09-02  1:02   ` Jiaxun Yang
2019-09-02 15:26     ` Fredrik Noring
2019-09-03  3:50       ` Jiaxun Yang
2019-09-03 16:06         ` Fredrik Noring
2019-09-04 14:19 ` [PATCH 000/120] Linux for the PlayStation 2 Paul Burton
2019-09-05 18:32   ` Fredrik Noring

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=335c94c5e90f1422b7512c3a1ef1da4f0f1b212a.1567326213.git.noring@nocrew.org \
    --to=noring@nocrew.org \
    --cc=linux-mips@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org linux-mips@archiver.kernel.org
	public-inbox-index linux-mips

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/ public-inbox