changeset 0:d31d54a41664 default tip

add thesis
author nana <e205729@ie.u-ryukyu.ac.jp>
date Wed, 31 Jan 2024 19:17:13 +0900
parents
children
files final/.DS_Store final/Readme.md final/code/.DS_Store final/code/bootloader.c final/code/run.sh final/code/xv6-aauefi.def final/code/xv6-boot.txt final/figs/.DS_Store final/figs/EL.pdf final/figs/boot.pdf final/figs/clang-xv6.pdf final/figs/gdb.pdf final/figs/gdb2.pdf final/figs/xv6-aarch64.pdf final/figs/卒論.png final/ie-thesis.sty final/logo_u-ryukyu.jpg final/text/.DS_Store final/text/Eabstract.tex final/text/Jabstract.log final/text/Jabstract.tex final/text/chapter2.aux final/text/chapter2.log final/text/chapter2.tex final/text/chapter3.aux final/text/chapter3.tex final/text/introduction.aux final/text/introduction.log final/text/introduction.tex final/text/reference.aux final/text/reference.log final/text/reference.tex final/thesis.aux final/thesis.lof final/thesis.log final/thesis.lot final/thesis.pdf final/thesis.synctex.gz final/thesis.tex final/thesis.toc
diffstat 37 files changed, 1839 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
Binary file final/.DS_Store has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/Readme.md	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,6 @@
+# tex to pdf の方法
+
+```
+$ platex thesis
+$ dvipdfmx thesis
+```
Binary file final/code/.DS_Store has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/code/bootloader.c	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,309 @@
+#include <efi.h>
+#include <efilib.h>
+
+struct rsdp {
+  CHAR8 sig[8];
+  UINT8 Checksum;
+  CHAR8 OEMID[6];
+  UINT8 Revision;
+  UINT32 RsdtAddress;
+  UINT32 Len;
+  UINT64 XsdtAddress;
+  UINT8 ExtChecksum;
+  UINT8 reserved[3];
+};
+
+struct __attribute((packed)) GraphicConfig {
+  UINT64 frame_base;
+  UINT64 frame_size;
+  UINT64 horizontal_resolution;
+  UINT64 vertical_resolution;
+  UINT64 pixels_per_scan_line;
+};
+
+struct __attribute__((packed)) BootParam {
+  UINT64 kernel_entry;
+  UINT64 rsdp_addr;
+  struct GraphicConfig graphic_config;
+//  struct gdt bootstrap_gdt[3];
+//  struct gdt_desc bootstrap_gdt_desc;
+  UINT64 kernel_addr;
+};
+
+struct MemoryMap {
+  UINTN BufferSize;
+  VOID *Buffer;
+  UINTN MapSize;
+  UINTN MapKey;
+  UINTN DescriptorSize;
+  UINT32 DescriptorVersion;
+};
+
+void HexDump(UINT8 *bytePtr, UINTN size) {
+    for (UINTN i = 0; i < size; i++) {
+        if (i % 16 == 0 && i != 0) {
+            Print(L"\n");
+        }
+        Print(L"%02x ", bytePtr[i]);
+    }
+    Print(L"\n");
+}
+
+
+EFI_STATUS LoadFile(CHAR16 *FileName, EFI_PHYSICAL_ADDRESS *FileAddr, UINTN *FilePageSize) {
+    EFI_STATUS Status;
+    EFI_FILE_IO_INTERFACE *IOVolume;
+    EFI_FILE_HANDLE Root;
+    EFI_FILE_HANDLE File;
+    Print(L"LoadFile\n");
+
+    // Locate all handles that support the Simple File System Protocol.
+    UINTN HandleCount = 5;
+    void **HandleBuffer;
+    Status = LibLocateHandle(ByProtocol, &FileSystemProtocol, NULL, &HandleCount, &HandleBuffer);
+    if (EFI_ERROR(Status)) {
+        Print(L"Failed to locate handles for file system protocol: %r\n", Status);
+        return Status;
+    }
+
+    for (UINTN Index = 0; Index < HandleCount; Index++) {
+        // Try to open the file system
+        Status = uefi_call_wrapper(BS->HandleProtocol, 3, HandleBuffer[Index], &FileSystemProtocol, (void **)&IOVolume);
+
+        if (!EFI_ERROR(Status)) {
+            // Open the root directory
+            Status = uefi_call_wrapper(IOVolume->OpenVolume, 2, IOVolume, &Root);
+            if (EFI_ERROR(Status)) {
+                Print(L"Failed to open root directory: %r\n", Status);
+                continue;
+            }
+
+            // Now open a file
+            Status = uefi_call_wrapper(Root->Open, 5, Root, &File,FileName , EFI_FILE_MODE_READ, 0);
+            if (EFI_ERROR(Status)) {
+                // Print(L"Failed to open file: %r\n", Status);
+                uefi_call_wrapper(Root->Close, 1, Root);
+                continue;
+            }
+
+            EFI_FILE_INFO *FileInfo;
+            UINTN FileInfoSize;
+            FileInfoSize = sizeof(EFI_FILE_INFO) + 1024;
+            FileInfo = AllocatePool(FileInfoSize);
+            Status = uefi_call_wrapper(File->GetInfo, 4, File, &gEfiFileInfoGuid, &FileInfoSize, FileInfo);
+            if (EFI_ERROR(Status)) {
+                Print(L"Failed to get file info.\n");
+                FreePool(FileInfo);
+                return Status;
+            }
+
+            UINTN FileSize = FileInfo->FileSize;
+            Print(L"FileSize = %d\n", FileSize);
+            *FilePageSize = (FileSize + 4095) / 4096;
+            *FileAddr = 0x40000000;
+            Status = uefi_call_wrapper(BS->AllocatePages, 4, AllocateAddress, EfiBootServicesCode, *FilePageSize, FileAddr);
+            if (EFI_ERROR(Status)) {
+                Print(L"Failed to allocate pages.\n");
+                FreePool(FileInfo);
+                return Status;
+            }
+
+            // skip header
+            FileSize = 0x1000;
+            Status = uefi_call_wrapper(File->Read, 3, File, &FileSize, (VOID *)*FileAddr);
+            if (EFI_ERROR(Status)) {
+                Print(L"Failed to load file.\n");
+                FreePool(FileInfo);
+                return Status;
+            }
+
+            // load binary part
+            FileSize = FileInfo->FileSize-0x1000;
+            Status = uefi_call_wrapper(File->Read, 3, File, &FileSize, (VOID *)*FileAddr);
+            if (EFI_ERROR(Status)) {
+                Print(L"Failed to load file.\n");
+                FreePool(FileInfo);
+                return Status;
+            }
+            Print(L"Successfully loaded file: %s\n", FileName);
+
+            FreePool(FileInfo);
+            // Close the file and root directory
+            uefi_call_wrapper(File->Close, 1, File);
+            uefi_call_wrapper(Root->Close, 1, Root);
+        }
+    }
+
+
+    return Status;
+}
+
+UINT64 ReadCurrentEL() {
+    UINT64 currentEL;
+    __asm__ volatile("MRS %0, CurrentEL" : "=r" (currentEL));
+    return (currentEL >> 2) & 0x3; // Extract EL value
+}
+
+void DumpLoadedImageProtocol(EFI_LOADED_IMAGE *LoadedImage) {
+    Print(L"Dumping EFI_LOADED_IMAGE_PROTOCOL\n");
+    Print(L"Revision: %x\n", LoadedImage->Revision);
+    Print(L"ParentHandle: %x\n", LoadedImage->ParentHandle);
+    Print(L"SystemTable: %x\n", LoadedImage->SystemTable);
+
+    Print(L"DeviceHandle: %x\n", LoadedImage->DeviceHandle);
+    Print(L"FilePath: %s\n", DevicePathToStr(LoadedImage->FilePath));
+    // Note: LoadedImage->Reserved is not dumped as it's meant to be NULL/unused
+
+    Print(L"LoadOptionsSize: %x\n", LoadedImage->LoadOptionsSize);
+    Print(L"LoadOptions: %s\n", LoadedImage->LoadOptions);
+
+    Print(L"ImageBase: %x\n", LoadedImage->ImageBase);
+    Print(L"ImageSize: %lx\n", LoadedImage->ImageSize);
+    Print(L"ImageCodeType: %x\n", LoadedImage->ImageCodeType);
+    Print(L"ImageDataType: %x\n", LoadedImage->ImageDataType);
+
+    if (LoadedImage->Unload != NULL) {
+        Print(L"Unload: %x\n", LoadedImage->Unload);
+    } else {
+        Print(L"Unload: NULL\n");
+    }
+}
+
+EFI_STATUS efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
+
+    EFI_STATUS Status;
+    CHAR16 *KernelFileName = L"\\kernel";
+    EFI_PHYSICAL_ADDRESS KernelBaseAddr;
+
+    InitializeLib(ImageHandle, SystemTable);
+    Print(L"Initializeing\n");
+    UINTN BufferPageSize;
+
+    Print(L"LoadFile: %s\n", KernelFileName);
+
+    Status = LoadFile(KernelFileName, &KernelBaseAddr, &BufferPageSize);
+    if (EFI_ERROR(Status)) {
+        return Status;
+    }
+    Print(L"Boot 1\n");
+
+    struct BootParam boot_param;
+    boot_param.kernel_addr = KernelBaseAddr ;
+    boot_param.kernel_entry = boot_param.kernel_addr ;
+    // GetGraphicMode(ImageHandle, &(boot_param.graphic_config));
+
+
+    Print(L"Boot 2\n");
+
+    void **rsdp = NULL;
+    EFI_GUID AcpiTableGuid = ACPI_20_TABLE_GUID; // Use ACPI 2.0 table GUID
+
+    Status = LibGetSystemConfigurationTable(&AcpiTableGuid, (void **)&rsdp);
+    if (EFI_ERROR(Status) || rsdp == NULL) {
+        Print(L"Error getting ACPI table: %r\n", Status);
+        return Status;
+    } else {
+        boot_param.rsdp_addr = (UINT64)rsdp;
+    }
+
+    Print(L"Boot 3\n");
+
+    struct MemoryMap MemoryMap = {4096, NULL, 4096, 0, 0, 0};
+    Status = uefi_call_wrapper(SystemTable->BootServices->AllocatePool, 3, EfiLoaderData, MemoryMap.BufferSize, &MemoryMap.Buffer);
+    if (EFI_ERROR(Status)) {
+        Print(L"Failed to allocate memory to get memory map\n");
+        return Status;
+    }
+
+    Status = uefi_call_wrapper(SystemTable->BootServices->GetMemoryMap, 5, &MemoryMap.MapSize, (EFI_MEMORY_DESCRIPTOR*)MemoryMap.Buffer, &MemoryMap.MapKey, &MemoryMap.DescriptorSize, &MemoryMap.DescriptorVersion);
+    if (EFI_ERROR(Status)) {
+        Print(L"Failed to get memory map.\n");
+        return Status;
+    }
+    Print(L"Boot r4\n");
+
+    Print(L"Kernel Entry: %llx\n",boot_param.kernel_entry);
+    Print(L"RSDP Address: %llx\n",boot_param.rsdp_addr);
+    Print(L"Kernel Address: %llx\n",boot_param.kernel_addr);
+
+    HexDump((UINT8 *)KernelBaseAddr,0x100);
+
+    EFI_DEVICE_PATH *Path;
+    EFI_LOADED_IMAGE *LoadedImageParent;
+    EFI_LOADED_IMAGE *LoadedImage;
+    EFI_HANDLE Image;
+    CHAR16 *Options = L"root=/dev/sda2 rootfstype=btrfs rw quiet splash";
+
+    Status = uefi_call_wrapper(BS->OpenProtocol, 6, ImageHandle, &LoadedImageProtocol,(void**)&LoadedImageParent, ImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
+    if (EFI_ERROR(Status)) {
+        Print(L"Could not get LoadedImageProtocol handler %r\n", Status);
+        return Status;
+    }
+    Print(L"Hello,2!\n");
+    if (0) {
+    Path = FileDevicePath(LoadedImageParent->DeviceHandle, L"\\kernel");
+    if (Path == NULL) {
+        Print(L"Could not get device path.");
+        return EFI_INVALID_PARAMETER;
+    }
+    Print(L"Hello,3!\n");
+    Status = uefi_call_wrapper(BS->LoadImage, 6, FALSE, ImageHandle, Path, NULL, 0, &Image);
+    if (EFI_ERROR(Status)) {
+        Print(L"Could not load %r", Status);
+        FreePool(Path);
+        return Status;
+    }
+    Print(L"Hello,4!\n");
+    Status = uefi_call_wrapper(BS->OpenProtocol, 6, Image, &LoadedImageProtocol, (void**)&LoadedImage, ImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
+    if (EFI_ERROR(Status)) {
+        Print(L"Could not get LoadedImageProtocol handler %r\n", Status);
+        uefi_call_wrapper(BS->UnloadImage, 1, Image);
+        FreePool(Path);
+        return Status;
+    }
+    Print(L"Hello,5!\n");
+    LoadedImage->LoadOptions = Options;
+    LoadedImage->LoadOptionsSize = (StrLen(LoadedImage->LoadOptions)+1) * sizeof(CHAR16);
+
+    DumpLoadedImageProtocol (LoadedImage);
+
+    Status = uefi_call_wrapper(SystemTable->BootServices->ExitBootServices, 2, ImageHandle, MemoryMap.MapKey);
+    if (EFI_ERROR(Status)) {
+        Print(L"Failed to exit boot services\n");
+        return Status;
+    }
+
+    // Start the image
+    Status = uefi_call_wrapper(SystemTable->BootServices->StartImage, 3, Image,  NULL, NULL);
+
+    uefi_call_wrapper(BS->UnloadImage, 1, Image);
+    FreePool(Path);
+
+    } else {
+
+    UINT64 el = ReadCurrentEL();
+    Print(L"Current Exception Level: %d\n", el);
+
+    Status = uefi_call_wrapper(SystemTable->BootServices->ExitBootServices, 2, ImageHandle, MemoryMap.MapKey);
+    if (EFI_ERROR(Status)) {
+        Print(L"Failed to exit boot services\n");
+        return Status;
+
+    }
+
+
+    // Inline assembly to jump to the kernel
+    // __asm__ volatile("br %0" : : "r"(0x40000000));
+
+    typedef unsigned long (EntryPoint)(struct BootParam*);
+    EntryPoint *Entry = (EntryPoint*)(KernelBaseAddr);
+    Entry(&boot_param);
+
+    }
+
+    return Status;
+}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/code/run.sh	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,6 @@
+#!/bin/sh
+export XV6=/mnt/ssd1/user/e205729
+singularity shell --shell /bin/zsh  \
+   -B /mnt/ssd1/user/e205729/xv6-UEFI:/mnt/ssd1/user/e205729/xv6-UEFI \
+   -B /mnt/ssd1/user/e205729/xv6:/mnt/ssd1/user/e205729/xv6 \
+   xv6-aauefi.sif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/code/xv6-aauefi.def	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,37 @@
+BootStrap: docker
+From: ubuntu:22.04
+
+%post
+    echo 'Acquire::http { Proxy "http://apt-cache.ie.u-ryukyu.ac.jp:3142"; };' >> /etc/apt/apt.conf.d/01proxy
+    apt-get update
+    apt-get upgrade -y
+    DEBIAN_FRONTEND=noninteractive \
+    apt-get install -y \
+    qemu-utils \
+	clang \
+	cmake \
+        qemu-efi-aarch64 \
+        qemu-system-aarch64 \
+        build-essential \
+        uuid-dev \
+        git \
+        gdb-multiarch \
+        tzdata \
+        mercurial \
+        python3-pip \
+        iasl \
+        nasm \
+    zsh \
+    vim \
+    wget
+    DEBIAN_FRONTEND=noninteractive \
+    apt-get install -y \
+        crossbuild-essential-armhf \
+        crossbuild-essential-arm64 \
+        gcc-aarch64-linux-gnu \
+        binutils-aarch64-linux-gnu 
+        
+    cd /usr/local/src
+    # git clone --recursive https://github.com/tianocore/edk2
+    wget "https://sourceforge.net/projects/gnu-efi/files/gnu-efi-3.0.15.tar.bz2/download"
+    tar xf download
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/code/xv6-boot.txt	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,65 @@
+Shell> bootloader
+FSOpen: Open '\bootloader.EFI' Success
+FSOpen: Open '\bootloader.EFI' Success
+FSOpen: Open '\bootloader.EFI' Success
+FSOpen: Open '\bootloader.EFI' Success
+
+[Security] 3rd party image[0] can be loaded after EndOfDxe: PciRoot(0x0)/Pci(0x2,0x0)/HD(1,MBR,0xBE1AFDFA,0x3F,0xFBFC1)/\bootloader.EFI.
+InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 45BCC040
+Loading driver at 0x0004402D000 EntryPoint=0x0004402E000
+Loading driver at 0x0004402D000 EntryPoint=0x0004402E000 
+InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 45BE6218
+ProtectUefiImageCommon - 0x45BCC040
+  - 0x000000004402D000 - 0x000000000000AC00
+SetUefiImageMemoryAttributes - 0x000000004402D000 - 0x0000000000001000 (0x0000000000004008)
+SetUefiImageMemoryAttributes - 0x000000004402E000 - 0x0000000000008000 (0x0000000000020008)
+SetUefiImageMemoryAttributes - 0x0000000044036000 - 0x0000000000002000 (0x0000000000004008)
+InstallProtocolInterface: 752F3136-4E16-4FDC-A22A-E5F46812F4CA 474FC890
+Initializeing
+LoadFile: \kernel
+LoadFile
+FSOpen: Open '\kernel' Success
+FileSize = 196880
+Successfully loaded file: \kernel
+Boot 1
+Boot 2
+Boot 3
+Boot r4
+Kernel Entry: 40000000
+RSDP Address: 43AB0018
+Kernel Address: 40000000
+A1 00 38 D5 21 04 40 92 41 00 00 B4 34 00 00 14 
+41 00 00 D0 82 09 00 18 82 00 00 34 3F 84 00 F8 
+42 04 00 51 FD FF FF 17 60 00 00 90 01 00 A8 D2 
+C2 08 00 58 23 FC 55 D3 63 20 40 92 44 FC 55 D3 
+84 20 40 92 A5 80 80 D2 26 00 05 AA 06 78 23 F8 
+63 04 00 91 C6 00 48 91 7F 00 04 EB 89 FF FF 54 
+60 00 00 B0 23 FC 5E D3 63 20 40 92 64 00 80 D2 
+65 00 00 90 86 00 05 AA 06 78 23 F8 40 00 00 D0 
+01 00 A8 D2 22 06 00 58 E3 63 59 B2 24 00 03 8B 
+45 00 03 8B 86 FC 55 D3 C6 20 40 92 A7 FC 55 D3 
+E7 20 40 92 A8 80 80 D2 29 00 08 AA 09 78 26 F8 
+C6 04 00 91 29 01 48 91 DF 00 07 EB 89 FF FF 54 
+40 00 00 F0 85 FC 5E D3 A5 20 40 92 66 00 80 D2 
+47 00 00 D0 C8 00 07 AA 08 78 25 F8 60 00 00 B0 
+41 00 00 F0 00 20 18 D5 21 20 18 D5 20 03 00 58 
+40 20 18 D5 21 03 00 58 01 A2 18 D5 DF 3F 03 D5 
+Hello,2!
+Current Exception Level: 1
+SetUefiImageMemoryAttributes - 0x0000000047340000 - 0x0000000000040000 (0x0000000000000008)
+SetUefiImageMemoryAttributes - 0x0000000043FB0000 - 0x0000000000040000 (0x0000000000000008)
+SetUefiImageMemoryAttributes - 0x0000000043F60000 - 0x0000000000040000 (0x0000000000000008)
+SetUefiImageMemoryAttributes - 0x0000000043F10000 - 0x0000000000040000 (0x0000000000000008)
+SetUefiImageMemoryAttributes - 0x0000000043E10000 - 0x0000000000050000 (0x0000000000000008)
+SetUefiImageMemoryAttributes - 0x0000000043D00000 - 0x0000000000040000 (0x0000000000000008)
+SetUefiImageMemoryAttributes - 0x0000000043C60000 - 0x0000000000040000 (0x0000000000000008)
+SetUefiImageMemoryAttributes - 0x0000000043BC0000 - 0x0000000000040000 (0x0000000000000008)
+
+xv6 kernel is booting
+
+lines 7
+hart 1 starting
+hart 3 starting
+hart 2 starting
+init: starting sh
+$ 
Binary file final/figs/.DS_Store has changed
Binary file final/figs/EL.pdf has changed
Binary file final/figs/boot.pdf has changed
Binary file final/figs/clang-xv6.pdf has changed
Binary file final/figs/gdb.pdf has changed
Binary file final/figs/gdb2.pdf has changed
Binary file final/figs/xv6-aarch64.pdf has changed
Binary file final/figs/卒論.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/ie-thesis.sty	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,103 @@
+%   ie-thesis:  Standard Thesis Style File @ ie.u-ryukyu
+%   (based on jsreport.cls)
+%   (c) Itsuki KUNITA (kunita@ie.u-ryukyu.ac.jp)
+%   2021/12/07
+%
+%
+% packages
+\usepackage[dvips]{graphicx}
+\usepackage[dvipdfmx]{color}
+\usepackage{setspace}
+\usepackage{url}
+\usepackage{amsmath}
+\usepackage{fancyhdr}
+\pagestyle{fancy}
+\chead{}
+\lhead{琉球大学学位論文(学士)}
+\rhead[\leftmark]{\leftmark}
+\cfoot[\thepage]{\thepage}
+\renewcommand{\chaptermark}[1]{\markboth{第\ \normalfont\thechapter\ 章~#1}{}}
+
+% settings
+\setcounter{secnumdepth}{3}
+\setcounter{tocdepth}{2}
+
+  
+%
+% title in Japanese
+\def\jtitle#1{\gdef\@jtitle{#1}}
+\def\@jtitle{}
+% affiliation
+\def\affiliation#1{\gdef\@affiliation{#1}}
+\def\@affiliation{}
+% student ID 
+\def\studentid#1{\gdef\@studentid{#1}}
+\def\@studentid{}
+% supervisor 
+\def\supervisor#1{\gdef\@supervisor{#1}}
+\def\@supervisor{}
+% abstract, Japanese
+\def\Jabstract#1{\gdef\@Jabstract{#1}}
+\def\Eabstract#1{\gdef\@Eabstract{#1}}
+%
+% maketitle
+\renewcommand{\maketitle}{%
+\newpage\null
+\thispagestyle{empty}
+%\pagenumbering{roman} %Don't remove.
+    \begin{center}%
+		\vskip -7.0em
+		%\begingroup
+		\renewcommand{\arraystretch}{1.5}
+		\begin{tabular}{c}
+			\textbf{\Large \number 2022年度 卒業論文}\\
+			\textbf{\Large Bachelor's Thesis}\\
+		\end{tabular}\\
+		\vspace{3zw}
+		\renewcommand{\arraystretch}{3.0}
+		\begin{tabular}{c}
+			\begin{minipage}[c]{36zw}	\center{\textbf{\LARGE \@jtitle}}\end{minipage}\\
+			\begin{minipage}[c]{36zw}	\center{\textbf{\LARGE \@title}}\end{minipage}\\
+		\end{tabular}\\%
+		\renewcommand{\arraystretch}{1.5}
+		\vspace{6zw}
+		\includegraphics[width=50mm]{logo_u-ryukyu.jpg}\\
+		\vspace{6zw}
+		\renewcommand{\arraystretch}{1.5}
+		\begin{tabular}{c}%
+			\textbf{\Large \@affiliation}\\
+			\textbf{\Large \@studentid \hspace{1zw} \@author}\\
+			\\
+			\textbf{\Large 指導教員 \hspace{1zw} \@supervisor}
+		\end{tabular}%
+	\end{center}%
+\newpage\null
+\thispagestyle{empty}
+	\begin{spacing}{1.5}
+		\leftline{\textbf{\Large 要旨}}
+	\end{spacing}
+	\begin{spacing}{1.2}
+		\fontsize{12pt}{0mm}\selectfont
+		\@Jabstract
+	\end{spacing}
+\newpage\null
+\thispagestyle{empty}
+	\begin{spacing}{1.5}
+		\leftline{\textbf{\Large Abstract}}
+	\end{spacing}
+	\begin{spacing}{1.2}
+		\fontsize{12pt}{4mm}\selectfont
+		\@Eabstract
+	\end{spacing}
+%\newpage\null
+}
+
+%章
+\renewcommand{\chapter}{%
+  \if@openright\cleardoublepage\else\clearpage\fi
+  %\pagenumbering{arabic} %Don't remove.
+  \thispagestyle{empty}%
+  \global\@topnum\z@
+  \@afterindentfalse
+  \secdef\@chapter\@schapter
+}
Binary file final/logo_u-ryukyu.jpg has changed
Binary file final/text/.DS_Store has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/text/Eabstract.tex	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,1 @@
+With the advancement of technology, 64-bit operating systems have become the mainstream, and the restrictive BIOS has been deprecated in favor of the more flexible UEFI firmware that connects the OS to the hardware. The Gears OS under development in our laboratory is implemented based on 32-bit xv6, so it cannot be booted from UEFI. In this age of high-performance CPUs and memory, the BIOS limitation is a bottleneck in OS development. In this study, we confirm that Arm's xv6 supporting 64-bit can be booted using UEFI, and based on the results, we discuss the implementation of Gears OS-64-bit using UEFI.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/text/Jabstract.log	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,39 @@
+This is e-pTeX, Version 3.141592653-p4.1.0-230214-2.6 (utf8.euc) (TeX Live 2023) (preloaded format=platex 2023.4.28)  29 JAN 2024 10:34
+entering extended mode
+ restricted \write18 enabled.
+ file:line:error style messages enabled.
+ %&-line parsing enabled.
+**Jabstract.tex
+(./Jabstract.tex
+pLaTeX2e <2023-02-14>+1 (based on LaTeX2e <2022-11-01> patch level 1)
+L3 programming layer <2023-02-22>
+
+./Jabstract.tex:1: LaTeX Error: Missing \begin{document}.
+
+See the LaTeX manual or LaTeX Companion for explanation.
+Type  H <return>  for immediate help.
+ ...                                              
+                                                  
+l.1 当
+      研究室では,信頼性をノーマルレベルの計算に対して保証し,拡張性をメタレ...
+
+? 
+./Jabstract.tex:1: Emergency stop.
+ ...                                              
+                                                  
+l.1 当
+      研究室では,信頼性をノーマルレベルの計算に対して保証し,拡張性をメタレ...
+
+You're in trouble here.  Try typing  <return>  to proceed.
+If that doesn't work, type  X <return>  to quit.
+
+ 
+Here is how much of TeX's memory you used:
+ 18 strings out of 476693
+ 470 string characters out of 5805373
+ 1842209 words of memory out of 5000000
+ 20571 multiletter control sequences out of 15000+600000
+ 516158 words of font info for 49 fonts, out of 8000000 for 9000
+ 929 hyphenation exceptions out of 8191
+ 15i,0n,23p,436b,18s stack positions out of 10000i,1000n,20000p,200000b,200000s
+No pages of output.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/text/Jabstract.tex	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,1 @@
+現代では技術の進展により、OSも64bitが主流となっている.OSとハードウェアを繋ぐファームウェアも,制約の多いBIOSは非推奨となり、より柔軟性があるUEFIが広く採用されている.当研究室で開発中のGears OSは,32bitのxv6をベースに実装されているため,UEFIから起動できない.高性能なCPUやメモリが主流になった現代で,OSの開発におけるBIOSの制約はネックとなるため,Geras OSは今後64ビットに書き換える方針である.本研究では,Armの64bitに対応したxv6がUEFIを用いてブートできることを確認し,その結果から,UEFIを用いたGears OS-64bitの実装について考察を述べる.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/text/chapter2.aux	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,31 @@
+\relax 
+\citation{sakamoto}
+\citation{matayu}
+\@writefile{toc}{\contentsline {chapter}{\numberline {第2章}Gears OSについて}{3}{}\protected@file@percent }
+\@writefile{lof}{\addvspace {10\jsc@mpt }}
+\@writefile{lot}{\addvspace {10\jsc@mpt }}
+\@writefile{toc}{\contentsline {subsection}{\numberline {2.0.1}Gears OS}{3}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {2.0.2}CbC(Continuation based C)}{3}{}\protected@file@percent }
+\@setckpt{./text/chapter2}{
+\setcounter{page}{4}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{2}
+\setcounter{section}{0}
+\setcounter{subsection}{2}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{lstnumber}{1}
+\setcounter{float@type}{8}
+\setcounter{lstlisting}{0}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/text/chapter2.tex	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,11 @@
+\chapter{Gears OSについて}
+
+\subsection{Gears OS}
+アプリケーションの動作信頼性を保証することは,情報システム社会における重要な課題である.当研究室で開発中のGears OSは,定理証明やモデル検査によって信頼性を高めることを目標としている.
+現在もGears OSは開発中であり,MITの開発したxv6をベースに,CbCを用いてkernelの一部を書き換えている.\cite{sakamoto}
+kernelの書き換えだけでなく,RedBlackTreeを用いたFileSystemの実装\cite{matayu}や,Gears AgdaによるRed Black Tree の検証などが進められている.
+
+Gears OSは当研究室が開発したCbCによって記述されており,CbCには状態遷移の仕組みが取り入れられている.状態遷移による記述はモデル検査のような技術との相性がよく,Gears OSの信頼性をモデル検査によって保証することも可能である.
+
+\subsection{CbC(Continuation based C)}
+CbCは,Cの下位言語として開発されている.関数呼び出しではなく,jmp 命令で コード間を移動することで軽量な継続を実現している. CbCは,関数の代わりにCodeGearという単位を持つ.データの単位にはDataGearという変数データを用いる.cbcで記述したアプリケーションは,CbCのコンパイラであるCbClang/LLVMによって実装される.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/text/chapter3.aux	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,117 @@
+\relax 
+\citation{xv6}
+\citation{AArch64}
+\citation{QEMU}
+\citation{UEFI}
+\@writefile{toc}{\contentsline {chapter}{\numberline {第3章}UEFIを用いたxv6のブート}{4}{}\protected@file@percent }
+\@writefile{lof}{\addvspace {10\jsc@mpt }}
+\@writefile{lot}{\addvspace {10\jsc@mpt }}
+\@writefile{toc}{\contentsline {section}{\numberline {3.1}基礎概念}{4}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.1}xv6}{4}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.2}ARM64/AAsrch64}{4}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.3}QEMU(Quick Emulator)}{4}{}\protected@file@percent }
+\citation{singularity}
+\citation{GCC}
+\citation{gnu-efi}
+\citation{EDK2}
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.4}UEFI}{5}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.5}singulariy}{5}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.6}GCC}{5}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.7}gnu-efi}{5}{}\protected@file@percent }
+\citation{Clang}
+\citation{Cmake}
+\citation{GDB}
+\citation{rpi}
+\citation{singularity}
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.8}EDK2}{6}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.9}clang}{6}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.10}CMake}{6}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.11}GDB}{6}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.1.12}RaspBerry Pi Model 3B+}{6}{}\protected@file@percent }
+\citation{Mercurial}
+\@writefile{toc}{\contentsline {section}{\numberline {3.2}Geras OSの開発環境について}{7}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {section}{\numberline {3.3}singularityによるコンテナの作成}{7}{}\protected@file@percent }
+\newlabel{container}{{3.3}{7}}
+\newlabel{program1}{{3.1}{7}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.1}xv6-aauefi.def}{7}{}\protected@file@percent }
+\citation{rpi}
+\newlabel{fuga}{{3.2}{8}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.2}singularity-build-command}{8}{}\protected@file@percent }
+\newlabel{program2}{{3.3}{8}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.3}run.sh}{8}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {section}{\numberline {3.4}QEMUを用いたUEFIのエミュレート}{8}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.4.1}UEFIのbuild}{8}{}\protected@file@percent }
+\newlabel{uefi-build}{{3.4.1}{8}}
+\citation{EDK2}
+\citation{gnu-efi}
+\citation{GCC}
+\citation{Clang}
+\citation{xv6-aarch64}
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.4.2}QEMUでUEFIのエミュレート}{9}{}\protected@file@percent }
+\newlabel{run-qemu}{{3.4}{9}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.4}run-qemu.sh}{9}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {section}{\numberline {3.5}UEFIアプリケーションとbootloader}{9}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.5.1}UEFIアプリケーションの作成とコンパイル}{9}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.5.2}OSがbootするまでの流れ}{9}{}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {3.1}{\ignorespaces OSがbootするまでの流れ}}{10}{}\protected@file@percent }
+\newlabel{fig:os-boot}{{3.1}{10}}
+\@writefile{lof}{\contentsline {figure}{\numberline {3.2}{\ignorespaces AArch64のException Level}}{11}{}\protected@file@percent }
+\newlabel{fig:EL}{{3.2}{11}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.5.3}bootloaderの実装}{11}{}\protected@file@percent }
+\newlabel{program3}{{3.5}{11}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.5}bootloader.c}{11}{}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {3.3}{\ignorespaces xv6-aarch64のブート}}{17}{}\protected@file@percent }
+\newlabel{fig:xv6-aarch64}{{3.3}{17}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.5.4}GBDを用いたデバッグ}{18}{}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {3.4}{\ignorespaces GDBによるデバッグ}}{18}{}\protected@file@percent }
+\newlabel{fig:gdb}{{3.4}{18}}
+\newlabel{gdb-remote}{{3.6}{18}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.6}gdb-remote}{18}{}\protected@file@percent }
+\newlabel{gdb-breakp}{{3.7}{19}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.7}gdb-breakp}{19}{}\protected@file@percent }
+\newlabel{gdb-remote}{{3.8}{19}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.8}gdb-remote}{19}{}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {3.5}{\ignorespaces ブレークポイントの設定}}{19}{}\protected@file@percent }
+\newlabel{fig:gdb2}{{3.5}{19}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.5.5}clangでのコンパイル}{20}{}\protected@file@percent }
+\newlabel{clang}{{3.9}{20}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.9}clang-Makefile}{20}{}\protected@file@percent }
+\newlabel{gcc}{{3.10}{20}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.10}gcc-Makefile}{20}{}\protected@file@percent }
+\newlabel{clang-proc}{{3.11}{20}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.11}clang-proc.c}{20}{}\protected@file@percent }
+\newlabel{gcc-proc}{{3.12}{20}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.12}gcc-proc.c}{20}{}\protected@file@percent }
+\newlabel{clang-swith}{{3.13}{21}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.13}clang-swith.S}{21}{}\protected@file@percent }
+\newlabel{gcc-swith}{{3.14}{21}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.14}gcc-swith.S}{21}{}\protected@file@percent }
+\newlabel{clang-syscall}{{3.15}{21}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.15}clang-syscall.c}{21}{}\protected@file@percent }
+\newlabel{gcc-syscall}{{3.16}{21}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3.16}gcc-syscall.S}{21}{}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {3.6}{\ignorespaces clangでコンパイルしたxv6-aarch64}}{22}{}\protected@file@percent }
+\newlabel{fig:clang-uefi}{{3.6}{22}}
+\@setckpt{./text/chapter3}{
+\setcounter{page}{23}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{3}
+\setcounter{section}{5}
+\setcounter{subsection}{5}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{6}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{lstnumber}{22}
+\setcounter{float@type}{8}
+\setcounter{lstlisting}{16}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/text/chapter3.tex	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,340 @@
+\chapter{UEFIを用いたxv6のブート}
+
+
+\section{基礎概念}
+
+\subsection{xv6}
+xv6\cite{xv6}は,MIT(マサチューセッツ工科大学)によって開発された,教育用のUnix系OSである.OSの機能には,プロセス、仮想メモリ、カーネルとユーザ の分離、割り込み、ファイルシステムなどの基本的な Unix の構造を持つが,シンプルな実装で学習しやすい.様々なプラットフォーム向けに書き換えられたものが存在しており,本研究ではAArch64に対応したxv6を使用する.
+
+\subsection{ARM64/AAsrch64}
+AArch64\cite{AArch64}は,Arm Holdingsによって設計された64bitプロセッサアーキテクチャである.AArch64はARMv8-Aアーキテクチャとも呼ばれ.32bit版(ARMv7-A以前)と比較して,CPUの特権モードがシンプルになり,マルチタスクに必要な割り込みやコンテキスト退避、メモリ保護に必要なMMUなどの機能が向上している.
+
+\subsection{QEMU(Quick Emulator)}
+QEMU\cite{QEMU}は,Fabrice Bellard が中心となって開発している,ハードウェアを仮想化したエミュレーターである.幅広いプラットフォームに対応しており,ホストマシンと異なるアーキテクチャのプログラムをエミュレートできる.本研究では,AArch64をターゲットとしたプログラムのクロスコンパイルと,UEFIのエミュレートに使用する.
+
+\subsection{UEFI}
+UEFI(Unified Extensible Firmware Interface)\cite{UEFI}は、コンピュータシステムの起動と初期化を担当するファームウェアの1種であり、Intel社のBIOSの後継として設計されたものである.64bitアーキテクチャに対応したことで,大容量のメモリやストレージを扱うことが可能になった.特定のプロセッサに依存せず,C言語を用いてUEFIアプリケーションを実装することができるため,制約の多いBIOSに代わって,近年のOS開発では主流のファームウェアとなっている.
+
+\subsection{singulariy}
+Singularity\cite{singularity}は、主に科学計算やハイパフォーマンスコンピューティング(HPC)の環境で利用されているコンテナベースの仮想化ソフトウェアである.Dockerとの差異として,ホストマシンのリソースを直接利用できる他,コンテナ内でもユーザー権限を引き継ぐことができる.コンテナは独自のSIFフォーマットに集約されるため,ファイルコピーによる環境の共有・再現が可能である.
+
+\subsection{GCC}
+GCC(GNU Compiler Collection)\cite{GCC}とは,GNUプロジェクトが開発および配布しているコンパイラ群である.C以外の言語もサポートしており,対応しているアーキテクチャも多い.本研究では,xv6本体のコンパイルと,UEFIアプリケーションをaarch64向けにコンパイルするために使用する.
+
+\subsection{gnu-efi}
+gnu-efi\cite{gnu-efi}は,UEFIアプリケーションをコンパイルするための,軽量なライブラリ・ヘッダ群である.同じUEFIのツールセットであるEDK2よりも軽量で,実装からコンパイルまでの作業が比較的簡易である.GCCと併用することで,C言語で記述したUEFIアプリケーションをコンパイルすることができる.
+
+\subsection{EDK2}
+EDK2\cite{EDK2}は,TianoCoreプロジェクトによって管理されているオープンソースのUEFI開発キットである.gnu-efiと比較してやや複雑なフレームワークを持っているが,UEFIアプリケーションの開発だけではなく,UEFI本体をビルドすることもできる.
+
+\subsection{clang}
+Clang\cite{Clang}は、プログラミング言語のC、C++、Objective-C、Objective-C++ 向けのコンパイラフロントエンドである。GCCを置き換えることを目標にしているため,大部分でGCCと互換性がある.Gears OSのコンパイラは,Clamgをベースに開発されている.
+
+\subsection{CMake}
+CMake\cite{Cmake}とは、コンパイラに依存しないビルド自動化のためのフリーソフトウェアであり、様々なオペレーティングシステムで動作させることができる.複数の言語とビルドターゲットに対応しており,CMakeLists.txtと呼ばれるテキストファイルでプロジェクト構成を記述し、それを元にビルド設定を生成する.
+
+\subsection{GDB}
+GNUデバッガ(GDB)\cite{GDB}は、GNUソフトウェア・システムで動く標準のデバッガである。プログラムの実行の変更や追跡機能を持ち,プログラム内部の変数の値を修正して状態を監視したり、プログラムの通常の動作とは別に関数を呼び出すことができる.
+
+
+\subsection{RaspBerry Pi Model 3B+}
+RaspBerry Pi \cite{rpi}は,英国のRaspberry Pi Foundationによって開発された,Armプロセッサを搭載した教育用シングルボードコンピュータである.本研究では,64bitのArmプロセッサであるAArch64を搭載したRaspBerry Pi 3B+を使用する.
+
+
+
+\section{Geras OSの開発環境について}
+
+過去に行われたGears OSに関する実装やOSのソースコードは,当研究室で使用しているサーバーのdalmoreと,fireflyのmercurial repositoryで管理されている.ソフトウェア開発をチームで行っている場合,開発環境は容易に共有・再現できるように構築することが望ましい.
+当研究室では,コンテナ仮想化プラットフォームの一種であるsingularity\cite{singularity}を用いて開発環境を構築している.singularityで作成したコンテナは複製して共有することが容易であり,複製した状態から開発を引き継ぐことが可能である.
+
+本研究では,dalmore上にsingularityのコンテナを作成し,仮想環境を用いてブートローダの実装とエミュレートを行う.実装したソースコード類の管理には,分散型バージョン管理システムのMercurial\cite{Mercurial}を用いる.
+
+\section{singularityによるコンテナの作成}\label{container}
+
+singularityでは,表\ref{program1}のように定義ファイルを作成することで,容易にコンテナのbuildを行うことができる.
+
+\lstinputlisting[caption = xv6-aauefi.def ,label = program1]{code/xv6-aauefi.def}
+
+
+コンテナのbuildは,以下のコマンドで行う.
+
+\begin{lstlisting}[caption=singularity-build-command,label=fuga]
+singularity build -f xv6-aarch64.sif xv6-aarch64.def
+\end{lstlisting}
+
+また,以下のようにsingularityの起動コマンドをシェルスクリプトに記述しておくと,コンテナの起動コマンドを省略できる.
+
+\lstinputlisting[caption = run.sh ,label = program2]{code/run.sh}
+
+シェルスクリプトの詳細を説明する.
+
+\begin{quote}
+ \begin{itemize}
+   \item singularity shell --shell /bin/zsh は,singularityをzshを使って起動するオプションである.
+   \item -B(バインド) の後に記述されたディレクトリは,コンテナの中でマウントされる.作業ディレクトリなどをバインドする.
+ \end{itemize}
+\end{quote}
+
+
+\section{QEMUを用いたUEFIのエミュレート}
+
+\subsection{UEFIのbuild}\label{uefi-build}
+
+Gears OSは,AArch64プロセッサをターゲットにOSの書き換えを行う予定である.
+当研究室で所有しているRaspberri Pi 3B+\cite{rpi}は,Armの64bitアーキテクチャを持つAArch64プロセッサが搭載されているため,UEFIを搭載することでGears OSのテストマシンとして扱える.実機でのテストを想定して,今回はRaspberry Pi用にビルド済みのUEFIを用いる.
+
+\subsection{QEMUでUEFIのエミュレート}
+
+表\ref{container}のコマンドで作成したコンテナを起動し,UEFIのFDファイルをQEMUで起動する.
+
+以下の表\ref{run-qemu}のように,シェルスクリプトを作成すると起動が容易である.
+
+\begin{lstlisting}[caption=run-qemu.sh,label=run-qemu]
+qemu-system-aarch64 -m 128 \
+    -M virt \
+    -bios ./QEMU_EFI_DBG.fd \
+    -drive format=raw,file=fat:rw:gnu-efi-3.0.12/arm/apps \
+    -net none \
+    -nographic
+\end{lstlisting}
+
+QEMUの起動オプションについて説明する.\\
+
+\begin{quote}
+ \begin{itemize}
+  \item -bios ./ここにbuildしたUEFIのFDファイルのパスを記述する.
+  \item -drive format=raw,file=fat:rw:\{directory\}で指定されているフォルダが,FATファイルシステムとしてマウントされる.
+ \end{itemize}
+\end{quote}
+
+FATファイルシステム下にEFIアプリケーションを配置すると,UEFiからファイルシステムとEFIアプリケーションが認識可能になる.
+
+
+\section{UEFIアプリケーションとbootloader}
+
+\subsection{UEFIアプリケーションの作成とコンパイル}
+
+UEFIアプリケーションは,EDK2\cite{EDK2}やgnu-efi\cite{gnu-efi}のような,UEFIアプリケーションを記述するためのライブラリ群とC言語を用いて記述する.記述したアプリケーションは,ターゲットとなるアーキテクチャに向けてクロスコンパイルする必要がある.C言語のコンパイラにはGCC\cite{GCC}とClang\cite{Clang}があるが,今回ブートするxv6-aarch64\cite{xv6-aarch64}はGCCを利用してコンパイルされる.
+ブートローダーも同様に,GCC とgnu-efiを利用して記述する.
+
+\subsection{OSがbootするまでの流れ}
+
+OSがUEFIを用いてbootするまでの流れを,図\ref{fig:os-boot}に示す.
+\begin{figure}[H]
+  \begin{center}
+   \includegraphics[width=60mm]{./figs/boot.pdf}
+   \caption[OSがbootするまでの流れ]{OSがbootするまでの流れ}
+   \label{fig:os-boot}
+   \end{center}
+\end{figure}
+
+UEFIを起動した後,ブートローダーによってkernelがロードされる.UEFIのブートサービスを終了してkernelのエントリポイントにジャンプすると,kernelのエントリポイントにある関数の処理が始まる.xv6-aarch64では,entry.Sが始めに実行される.
+AArch64は図\ref{fig:EL}のように実行権限を分離していて,UEFIを立ち上げる際はEL1,またはEL2で起動する.
+
+\begin{figure}[H]
+  \begin{center}
+   \includegraphics[width=40mm]{./figs/EL.pdf}
+   \caption[AArch64のException Level]{aarch64のException Level}
+   \label{fig:EL}
+   \end{center}
+\end{figure}
+
+\subsection{bootloaderの実装}
+
+xv6-AArch64は,コンパイルすることでバイナリファイルが生成される.
+ブートローダーで以下の処理を実装することで,kernelのバイナリを直接ロードする.
+
+\begin{quote}
+ \begin{itemize}
+  \item kernelのFileをロードする
+  \item エントリポイントを取得して,アドレスにjumpする
+  \item boot Serviceを終了する
+ \end{itemize}
+\end{quote}
+
+以下が実装されたブートローダである.
+
+\lstinputlisting[caption = bootloader.c ,label = program3]{code/bootloader.c}
+
+ブートローダーの処理を説明する.\\
+
+53行目から始まるEFI\_STATUS LoadFileは,UEFIによって提供されている,ファイルシステムをロードするためのプロトコルである.69行目からは,UEFIで認識されているファイルシステムデバイスをforループで開き,ファイルが存在する場合はロードされる.93行目のFile\-\>GetInfoでファイルサイズの情報を取得し,104行目のBS\-\>AllocatePagesで,読み込むファイルのサイズに対応したメモリを割り当てている.その後ファイルのヘッダを読み取り,バイナリを取得したらファイル操作を終了する.
+
+172行目からefi\_main関数が始まり,LoadFileを使用して,指定されたパスのkernelファイルをロードする.199行目では,ハードウェア構成を管理するACPIテーブルからアドレス\(RSDP\)を取得している.225行後は,ロードされたkernelと,kernelのヘッダ情報であるdumpを表示するコードである.287行目でブートサービスを終了し,インラインアセンブリを使用して、カーネルのエントリーポイント0x40000000にジャンプする.299行目のポインタのEntryによって,kernelのエントリーポイントにある関数が呼び出され,kernelが実行される.\\
+
+UEFI shellでbootloader.cを実行すると,xv6-aarch64のブートを確認できた.
+
+\begin{figure}[H]
+  \begin{center}
+   \includegraphics[width=100mm]{./figs/xv6-aarch64.pdf}
+   \caption[xv6-aarch64のブート]{xv6-aarch64のブート}
+   \label{fig:xv6-aarch64}
+   \end{center}
+\end{figure}
+
+
+\subsection{GBDを用いたデバッグ}
+
+今回の実装では,gdb-murtiarchを使用してブートローダーのデバッグを行った.AArch64などのマルチアーキテクチャに対応している.
+
+GDBのデバッグには,ターミナルの画面を2つ使用する.以下の図\ref{fig:gdb}は,左がQEMU+UEFIのコンソール画面で,右がGDBのデバッグコンソールである.
+
+\begin{figure}[H]
+  \begin{center}
+   \includegraphics[width=130mm]{./figs/gdb.pdf}
+   \caption[GDBによるデバッグ]{qemuとgdbによるデバッグ}
+   \label{fig:gdb}
+   \end{center}
+\end{figure}
+
+今回は,GDBを手動で接続する..gdbを記述する方法もある.
+\begin{lstlisting}[caption=gdb-remote,label=gdb-remote]
+(gdb) target remote 127.0.0.1:27698
+\end{lstlisting}
+
+terget remoteコマンドを用いてGDBを接続する.接続先のtcpの値は,左のQEMU+UEFIコンソールの,QEMUオプションの最後に見つけることができる.
+
+GDBは,以下のコマンドでブレークポイントを設置できる.今回はkernelが格納されていることを確認するため,エントリーポイントである0x40000000にブレークポイントを置く.
+
+\begin{lstlisting}[caption=gdb-breakp,label=gdb-breakp]
+(gdb) b *0x40000000
+\end{lstlisting}
+
+以下のように入力すると,0x40000000番地から20個先のメモリアドレスの中を確認することができる.
+
+\begin{lstlisting}[caption=gdb-remote,label=gdb-remote]
+(gdb) x/20i $pc
+\end{lstlisting}
+
+メモリアドレスに配置されているアセンブラを確認できる.
+
+\begin{figure}[H]
+  \begin{center}
+   \includegraphics[width=60mm]{./figs/gdb2.pdf}
+   \caption[ブレークポイントの設定]{メモリダンプ}
+   \label{fig:gdb2}
+   \end{center}
+\end{figure}
+
+\subsection{clangでのコンパイル}
+本研究で用いたxv6-aarch64はGCCでコンパイルされるが,Gears OSはClang/LLVMで実装されている.今後Gears OSを書き換えるにあたり,コンパイルはCbClang + cmakeで行う必要がある.
+CbClangは,ClangとLLVMをベースに,CbCのコンパイラとして開発されている.
+ClangはGCCの大部分に互換性があるため,Makefileとkernelのソースコードの一部を書き換えることで,Clangを用いてxv6-aarch64をコンパイルできた.\\
+
+Clangで変更したMakefileの部分を,以下に示す.
+
+\begin{lstlisting}[caption=clang-Makefile,label=clang]
+CC = clang
+
+CFLAGS = -Wall -Werror -Os -g -fno-omit-frame-pointer -target aarch64-none-linux-gnu
+
+ASFLAGS = -Og -ggdb -target aarch64-none-linux-gnu -MD -I.
+\end{lstlisting}
+
+\begin{lstlisting}[caption=gcc-Makefile,label=gcc]
+CC = $(TOOLPREFIX)gcc
+
+CFLAGS = -Wall -Werror -Os -g -fno-omit-frame-pointer -mcpu=cortex-a72+nofp
+
+ASFLAGS = -Og -ggdb -mcpu=cortex-a72 -MD -I.
+\end{lstlisting}
+
+ASFLAGS = -mcpu=cortex-a72,CFLAGS = -mcpu=cortex-a72+nofpはGNUのライブラリに依存しているため,-target aarch64-none-linux-gnuに置き換える.
+
+\begin{lstlisting}[caption=clang-proc.c,label=clang-proc]
+[0] = "unused",
+[1] = "sleep ",
+[2] = "runble",
+[3] = "run   ",
+[4] = "zombie"
+\end{lstlisting}
+
+\begin{lstlisting}[caption=gcc-proc.c,label=gcc-proc]
+[UNUSED] = "unused",
+[SLEEPING] = "sleep ",
+[RUNNABLE] = "runble",
+[RUNNING] =  "run   ",
+[ZOMBIE] =  "zombie"
+\end{lstlisting}
+
+
+
+\begin{lstlisting}[caption=clang-swith.S,label=clang-swith]
+ stp x10, x18, [x9, #16 * 0]
+ ldp x10, x18, [x9, #16 * 0]
+\end{lstlisting}
+
+\begin{lstlisting}[caption=gcc-swith.S,label=gcc-swith]
+stp x10/*sp*/, x18, [x9, #16 * 0]
+ldp x10/*sp*/, x18, [x9, #16 * 0
+\end{lstlisting}
+
+
+
+\begin{lstlisting}[caption=clang-syscall.c,label=clang-syscall]
+  uint64 sys_fork(void);
+  uint64 sys_exit(void);
+  uint64 sys_wait(void);
+  uint64 sys_pipe(void);
+  uint64 sys_read(void);
+  uint64 sys_kill(void);
+  uint64 sys_exec(void);
+  uint64 sys_fstat(void);
+  uint64 sys_chdir(void);
+  uint64 sys_dup(void);
+  uint64 sys_getpid(void);
+  uint64 sys_sbrk(void);
+  uint64 sys_sleep(void);
+  uint64 sys_uptime(void);
+  uint64 sys_open(void);
+  uint64 sys_write(void);
+  uint64 sys_mknod(void);
+  uint64 sys_unlink(void);
+  uint64 sys_link(void);
+  uint64 sys_mkdir(void);
+  uint64 sys_close(void);
+\end{lstlisting}
+
+\begin{lstlisting}[caption=gcc-syscall.S,label=gcc-syscall]
+  extern uint64 sys_chdir(void);
+  extern uint64 sys_close(void);
+  extern uint64 sys_dup(void);
+  extern uint64 sys_exec(void);
+  extern uint64 sys_exit(void);
+  extern uint64 sys_fork(void);
+  extern uint64 sys_fstat(void);
+  extern uint64 sys_getpid(void);
+  extern uint64 sys_kill(void);
+  extern uint64 sys_link(void);
+  extern uint64 sys_mkdir(void);
+  extern uint64 sys_mknod(void);
+  extern uint64 sys_open(void);
+  extern uint64 sys_pipe(void);
+  extern uint64 sys_read(void);
+  extern uint64 sys_sbrk(void);
+  extern uint64 sys_sleep(void);
+  extern uint64 sys_unlink(void);
+  extern uint64 sys_wait(void);
+  extern uint64 sys_write(void);
+  extern uint64 sys_uptime(void);
+\end{lstlisting}
+
+Clangでコンパイルしたxv6-aaarch64をQEMUで実行すると,xv6の起動を確認できた.
+
+\begin{figure}[H]
+  \begin{center}
+   \includegraphics[width=100mm]{./figs/clang-xv6.pdf}
+   \caption[clangでコンパイルしたxv6-aarch64]{clang-uefi}
+   \label{fig:clang-uefi}
+   \end{center}
+\end{figure}
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/text/introduction.aux	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,31 @@
+\relax 
+\citation{okuda}
+\citation{tokuzato}
+\@writefile{toc}{\contentsline {chapter}{\numberline {第1章}序論}{1}{}\protected@file@percent }
+\@writefile{lof}{\addvspace {10\jsc@mpt }}
+\@writefile{lot}{\addvspace {10\jsc@mpt }}
+\@writefile{toc}{\contentsline {section}{\numberline {1.1}背景と目的}{1}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {section}{\numberline {1.2}論文の構成}{2}{}\protected@file@percent }
+\@setckpt{./text/introduction}{
+\setcounter{page}{3}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{1}
+\setcounter{section}{2}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{lstnumber}{1}
+\setcounter{float@type}{8}
+\setcounter{lstlisting}{0}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/text/introduction.tex	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,21 @@
+\chapter{序論}
+
+
+\section{背景と目的}
+OSは,レジスタやメモリを始めとしたハードウェアを制御する基盤であり,その動作には高い信頼性が必要とされる.
+
+当研究室で開発しているGears OSは,OSの動作信頼性を保証することを目標としている.
+
+現在のGears OSは,MITの開発した教育用オペレーティングシステムであるxv6をベースに実装されている.このxv6はx86アーキテクチャの32bitで動作するため,BIOSからブートする.
+
+しかし,CPUやメモリの性能が向上している近年では,使用メモリの上限など制約の多いBIOSで高機能なOSを開発することは難しい.
+
+近年では,BIOSの制約課題を解消した後継のファームウェアとして,UEFIを使用することが主流となっている.
+また,UEFIはOSの64bitモードに対応している.OSがCPUやメモリのリソースを最大限に使用するためには,64bit CPUで動作するようにOSを書き換える必要がある.
+UEFIを用いてGears OSを動作させるため,当研究室では過去に,奥田\cite{okuda},徳里ら\cite{tokuzato}の研究によって,UEFIを用いたxv6のロードが試行されている.しかし,現時点でUEFIを用いたxv6のロードは成功していない.
+
+本研究では引き続きブートローダーの実装を行い,UEFIを用いてxv6のブートを成功させることで,Geras OSを64bitに書き換える具体的な手法について,考察を述べる.
+
+
+\section{論文の構成}
+1章では,本研究の背景と目的について述べた.続く2章では,Gears OSとCbCについて説明する.3章では,xv6をUEFIから起動するための提案手法を提示し,実際にブートローダーの実装を行う.4章では,ブートローダーの実装を踏まえて今後の課題を提示し,まとめと展望を述べる.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/text/reference.aux	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,43 @@
+\relax 
+\bibcite{Mercurial}{1}
+\bibcite{singularity}{2}
+\bibcite{EDK2}{3}
+\bibcite{gnu-efi}{4}
+\bibcite{GCC}{5}
+\bibcite{Clang}{6}
+\bibcite{GDB}{7}
+\bibcite{AArch64}{8}
+\bibcite{QEMU}{9}
+\bibcite{xv6}{10}
+\bibcite{UEFI}{11}
+\bibcite{cmake}{12}
+\bibcite{rpi}{13}
+\bibcite{tokuzato}{14}
+\bibcite{okuda}{15}
+\bibcite{sakamoto}{16}
+\bibcite{matayu}{17}
+\bibcite{mori}{18}
+\@writefile{toc}{\contentsline {chapter}{参考文献}{25}{}\protected@file@percent }
+\@setckpt{./text/reference}{
+\setcounter{page}{27}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{18}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{4}
+\setcounter{section}{0}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{parentequation}{0}
+\setcounter{lstnumber}{22}
+\setcounter{float@type}{8}
+\setcounter{lstlisting}{0}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/text/reference.tex	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,58 @@
+\begin{thebibliography}{99}
+
+\bibitem{Mercurial}
+Mercurial{https://sylabs.io/singularity/}
+
+\bibitem{singularity}
+singularity{https://www.mercurial-scm.org}
+
+\bibitem{EDK2}
+EDK2 \url{https://edk2.groups.io/g/devel}
+
+\bibitem{gnu-efi}
+gnu-efi \url{https://wiki.osdev.org/GNU-EFI}
+
+\bibitem{GCC}
+GCC \url{https://gcc.gnu.org}
+
+\bibitem{Clang}
+Clang \url{https://clang.llvm.org}
+
+\bibitem{GDB}
+GDB \url{https://www.sourceware.org/gdb/}
+
+\bibitem{AArch64}
+AArch64 \url{https://www.arm.com/ja/architecture/cpu/a-profile}
+
+\bibitem{QEMU}
+QEMU \url{https://www.qemu.org}
+
+\bibitem{xv6}
+xv6 \url{https://pdos.csail.mit.edu/6.828/2012/xv6.html}
+
+\bibitem{UEFI}
+UEFI \url{https://uefi.org}
+
+\bibitem{cmake}
+cmake \url{https://cmake.org}
+
+\bibitem{rpi}
+Raspberry Pi 3 Model B+ \url{https://www.raspberrypi.com/products/raspberry-pi-3-model-b-plus/}
+
+\bibitem{tokuzato}
+コンテナとQEMUを用いたGearsOS開発環境, 徳里 光陽,\url{https://gitlab.ie.u-ryukyu.ac.jp/dissertation/2022/e195748/-/raw/main/thesis.pdf},2022.
+
+\bibitem{okuda}
+Gears OSのBootに関する研究,奥田 光希,\url{https://ie.u-ryukyu.ac.jp/dissertation_test/dissertation/e175701/},2020.
+\bibitem{sakamoto}
+継続を用いたx.v6 kernelの書き換え,坂本昂弘,桃 原 優,河野真治,{https://ie.u-ryukyu.ac.jp/~kono/papers/kono/2019/menikon-sigos-2019.pdf},1959.
+
+\bibitem{matayu}
+Gears OSのファイルシステムとDB,又吉 雄斗,佐野 巧曜,河野真治,{https://ie.u-ryukyu.ac.jp/~kono/papers/kono/2023/matac-sigos-2023.pdf},2023.
+
+\bibitem{mori}
+GearsAgda による Red Black Tree の検証,森 逸汰,河野真治,{https://ie.u-ryukyu.ac.jp/~kono/papers/kono/2023/kono1-sigos-2023.pdf},2023.
+
+
+
+\end{thebibliography}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/thesis.aux	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,9 @@
+\relax 
+\@input{./text/introduction.aux}
+\@input{./text/chapter2.aux}
+\@input{./text/chapter3.aux}
+\@writefile{toc}{\contentsline {chapter}{\numberline {第4章}まとめと今後の展望}{23}{}\protected@file@percent }
+\@writefile{lof}{\addvspace {10\jsc@mpt }}
+\@writefile{lot}{\addvspace {10\jsc@mpt }}
+\@input{./text/reference.aux}
+\gdef \@abspage@last{32}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/thesis.lof	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,10 @@
+\addvspace {10\jsc@mpt }
+\addvspace {10\jsc@mpt }
+\addvspace {10\jsc@mpt }
+\contentsline {figure}{\numberline {3.1}{\ignorespaces OSがbootするまでの流れ}}{10}{}%
+\contentsline {figure}{\numberline {3.2}{\ignorespaces AArch64のException Level}}{11}{}%
+\contentsline {figure}{\numberline {3.3}{\ignorespaces xv6-aarch64のブート}}{17}{}%
+\contentsline {figure}{\numberline {3.4}{\ignorespaces GDBによるデバッグ}}{18}{}%
+\contentsline {figure}{\numberline {3.5}{\ignorespaces ブレークポイントの設定}}{19}{}%
+\contentsline {figure}{\numberline {3.6}{\ignorespaces clangでコンパイルしたxv6-aarch64}}{22}{}%
+\addvspace {10\jsc@mpt }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/thesis.log	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,471 @@
+This is e-pTeX, Version 3.141592653-p4.1.0-230214-2.6 (utf8.euc) (TeX Live 2023) (preloaded format=platex 2023.4.28)  31 JAN 2024 18:08
+entering extended mode
+ restricted \write18 enabled.
+ file:line:error style messages enabled.
+ %&-line parsing enabled.
+**thesis.tex
+(./thesis.tex
+pLaTeX2e <2023-02-14>+1 (based on LaTeX2e <2022-11-01> patch level 1)
+L3 programming layer <2023-02-22>
+(/usr/local/texlive/2023/texmf-dist/tex/platex/jsclasses/jsreport.cls
+Document Class: jsreport 2023/02/23 jsclasses (okumura, texjporg)
+Class jsreport Info: Autodetected engine: pLaTeX on input line 237.
+\jsc@mpt=\dimen156
+\jsc@mmm=\dimen157
+\jsc@smallskipamount=\skip48
+LaTeX Info: Redefining \textmc on input line 512.
+LaTeX Info: Redefining \textgt on input line 514.
+\symmincho=\mathgroup4
+LaTeX Font Info:    Overwriting symbol font `mincho' in version `bold'
+(Font)                  JY1/mc/m/n --> JY1/gt/m/n on input line 576.
+LaTeX Font Info:    Font shape `JT1/mc/m/n' will be
+(Font)              scaled to size 9.60999pt on input line 770.
+LaTeX Font Info:    Font shape `JY1/mc/m/n' will be
+(Font)              scaled to size 9.60999pt on input line 770.
+\fullwidth=\dimen158
+LaTeX Font Info:    Font shape `JT1/mc/m/n' will be
+(Font)              scaled to size 7.68799pt on input line 909.
+LaTeX Font Info:    Font shape `JY1/mc/m/n' will be
+(Font)              scaled to size 7.68799pt on input line 909.
+\c@part=\count184
+\c@chapter=\count185
+\c@section=\count186
+\c@subsection=\count187
+\c@subsubsection=\count188
+\c@paragraph=\count189
+\c@subparagraph=\count190
+\@abstractbox=\box68
+\c@figure=\count191
+\c@table=\count192
+\abovecaptionskip=\skip49
+\belowcaptionskip=\skip50
+\jsc@tocl@width=\dimen159
+\@lnumwidth=\dimen160
+\bibindent=\dimen161
+(/usr/local/texlive/2023/texmf-dist/tex/platex/jsclasses/jslogo.sty
+Package: jslogo 2019/07/25 okumura, texjporg
+LaTeX Info: Redefining \TeX on input line 82.
+LaTeX Info: Redefining \LaTeX on input line 135.
+LaTeX Info: Redefining \LaTeXe on input line 188.
+)
+\heisei=\count193
+)
+(./ie-thesis.sty
+(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/graphicx.sty
+Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
+
+(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/keyval.sty
+Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
+\KV@toks@=\toks17
+)
+(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/graphics.sty
+Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
+
+(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/trig.sty
+Package: trig 2021/08/11 v1.11 sin cos tan (DPC)
+)
+(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
+File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
+)
+Package graphics Info: Driver file: dvips.def on input line 107.
+
+(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics-def/dvips.def
+File: dvips.def 2022/09/22 v3.1e Graphics/color driver for dvips
+))
+\Gin@req@height=\dimen162
+\Gin@req@width=\dimen163
+)
+(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/color.sty
+Package: color 2022/01/06 v1.3d Standard LaTeX Color (DPC)
+
+(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics-cfg/color.cfg
+File: color.cfg 2016/01/02 v1.6 sample color configuration
+)
+Package color Info: Driver file: dvipdfmx.def on input line 149.
+
+(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics-def/dvipdfmx.def
+File: dvipdfmx.def 2022/09/22 v5.0m Graphics/color driver for dvipdfmx
+)
+(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/dvipsnam.def
+File: dvipsnam.def 2016/06/17 v3.0m Driver-dependent file (DPC,SPQR)
+)
+(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/mathcolor.ltx))
+(/usr/local/texlive/2023/texmf-dist/tex/latex/setspace/setspace.sty
+Package: setspace 2022/12/04 v6.7b set line spacing
+)
+(/usr/local/texlive/2023/texmf-dist/tex/latex/url/url.sty
+\Urlmuskip=\muskip16
+Package: url 2013/09/16  ver 3.4  Verb mode for urls, etc.
+)
+(/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amsmath.sty
+Package: amsmath 2022/04/08 v2.17n AMS math features
+\@mathmargin=\skip51
+
+For additional information on amsmath, use the `?' option.
+(/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amstext.sty
+Package: amstext 2021/08/26 v2.01 AMS text
+
+(/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amsgen.sty
+File: amsgen.sty 1999/11/30 v2.0 generic functions
+\@emptytoks=\toks18
+\ex@=\dimen164
+))
+(/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amsbsy.sty
+Package: amsbsy 1999/11/29 v1.2d Bold Symbols
+\pmbraise@=\dimen165
+)
+(/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amsopn.sty
+Package: amsopn 2022/04/08 v2.04 operator names
+)
+\inf@bad=\count194
+LaTeX Info: Redefining \frac on input line 234.
+\uproot@=\count195
+\leftroot@=\count196
+LaTeX Info: Redefining \overline on input line 399.
+LaTeX Info: Redefining \colon on input line 410.
+\classnum@=\count197
+\DOTSCASE@=\count198
+LaTeX Info: Redefining \ldots on input line 496.
+LaTeX Info: Redefining \dots on input line 499.
+LaTeX Info: Redefining \cdots on input line 620.
+\Mathstrutbox@=\box69
+\strutbox@=\box70
+LaTeX Info: Redefining \big on input line 722.
+LaTeX Info: Redefining \Big on input line 723.
+LaTeX Info: Redefining \bigg on input line 724.
+LaTeX Info: Redefining \Bigg on input line 725.
+\big@size=\dimen166
+LaTeX Font Info:    Redeclaring font encoding OML on input line 743.
+LaTeX Font Info:    Redeclaring font encoding OMS on input line 744.
+\macc@depth=\count199
+LaTeX Info: Redefining \bmod on input line 905.
+LaTeX Info: Redefining \pmod on input line 910.
+LaTeX Info: Redefining \smash on input line 940.
+LaTeX Info: Redefining \relbar on input line 970.
+LaTeX Info: Redefining \Relbar on input line 971.
+\c@MaxMatrixCols=\count266
+\dotsspace@=\muskip17
+\c@parentequation=\count267
+\dspbrk@lvl=\count268
+\tag@help=\toks19
+\row@=\count269
+\column@=\count270
+\maxfields@=\count271
+\andhelp@=\toks20
+\eqnshift@=\dimen167
+\alignsep@=\dimen168
+\tagshift@=\dimen169
+\tagwidth@=\dimen170
+\totwidth@=\dimen171
+\lineht@=\dimen172
+\@envbody=\toks21
+\multlinegap=\skip52
+\multlinetaggap=\skip53
+\mathdisplay@stack=\toks22
+LaTeX Info: Redefining \[ on input line 2953.
+LaTeX Info: Redefining \] on input line 2954.
+)
+(/usr/local/texlive/2023/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty
+Package: fancyhdr 2022/11/09 v4.1 Extensive control of page headers and footers
+
+\f@nch@headwidth=\skip54
+\f@nch@O@elh=\skip55
+\f@nch@O@erh=\skip56
+\f@nch@O@olh=\skip57
+\f@nch@O@orh=\skip58
+\f@nch@O@elf=\skip59
+\f@nch@O@erf=\skip60
+\f@nch@O@olf=\skip61
+\f@nch@O@orf=\skip62
+))
+(/usr/local/texlive/2023/texmf-dist/tex/latex/listings/listings.sty
+\lst@mode=\count272
+\lst@gtempboxa=\box71
+\lst@token=\toks23
+\lst@length=\count273
+\lst@currlwidth=\dimen173
+\lst@column=\count274
+\lst@pos=\count275
+\lst@lostspace=\dimen174
+\lst@width=\dimen175
+\lst@newlines=\count276
+\lst@lineno=\count277
+\lst@maxwidth=\dimen176
+
+(/usr/local/texlive/2023/texmf-dist/tex/latex/listings/lstmisc.sty
+File: lstmisc.sty 2023/02/27 1.9 (Carsten Heinz)
+\c@lstnumber=\count278
+\lst@skipnumbers=\count279
+\lst@framebox=\box72
+)
+(/usr/local/texlive/2023/texmf-dist/tex/latex/listings/listings.cfg
+File: listings.cfg 2023/02/27 1.9 listings configuration
+))
+Package: listings 2023/02/27 1.9 (Carsten Heinz)
+
+(/usr/local/texlive/2023/texmf-dist/tex/latex/here/here.sty)
+(/usr/local/texlive/2023/texmf-dist/tex/latex/float/float.sty
+Package: float 2001/11/08 v1.3d Float enhancements (AL)
+\c@float@type=\count280
+\float@exts=\toks24
+\float@box=\box73
+\@float@everytoks=\toks25
+\@floatcapt=\box74
+)
+(/usr/local/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
+File: l3backend-dvips.def 2023-01-16 L3 backend support: dvips
+\l__pdf_internal_box=\box75
+\g__pdf_backend_object_int=\count281
+\l__pdf_backend_content_box=\box76
+\l__pdf_backend_model_box=\box77
+\g__pdf_backend_annotation_int=\count282
+\g__pdf_backend_link_int=\count283
+\g__pdf_backend_link_sf_int=\count284
+)
+
+LaTeX Warning: Unused global option(s):
+    [title].
+
+(./thesis.aux (./text/introduction.aux) (./text/chapter2.aux)
+(./text/chapter3.aux
+
+LaTeX Warning: Label `gdb-remote' multiply defined.
+
+) (./text/reference.aux))
+\openout1 = `thesis.aux'.
+
+LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 39.
+LaTeX Font Info:    ... okay on input line 39.
+LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 39.
+LaTeX Font Info:    ... okay on input line 39.
+LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 39.
+LaTeX Font Info:    ... okay on input line 39.
+LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 39.
+LaTeX Font Info:    ... okay on input line 39.
+LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 39.
+LaTeX Font Info:    ... okay on input line 39.
+LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 39.
+LaTeX Font Info:    ... okay on input line 39.
+LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 39.
+LaTeX Font Info:    ... okay on input line 39.
+LaTeX Font Info:    Checking defaults for JY1/mc/m/n on input line 39.
+LaTeX Font Info:    ... okay on input line 39.
+LaTeX Font Info:    Checking defaults for JT1/mc/m/n on input line 39.
+LaTeX Font Info:    ... okay on input line 39.
+\c@lstlisting=\count285
+LaTeX Font Info:    Font shape `JY1/mc/m/n' will be
+(Font)              scaled to size 6.72699pt on input line 40.
+LaTeX Font Info:    Font shape `JY1/mc/m/n' will be
+(Font)              scaled to size 4.805pt on input line 40.
+LaTeX Font Info:    Font shape `JT1/mc/bx/n' in size <10> not available
+(Font)              Font shape `JT1/gt/m/n' tried instead on input line 40.
+LaTeX Font Info:    Font shape `JT1/gt/m/n' will be
+(Font)              scaled to size 9.60999pt on input line 40.
+LaTeX Font Info:    Font shape `JY1/mc/bx/n' in size <10> not available
+(Font)              Font shape `JY1/gt/m/n' tried instead on input line 40.
+LaTeX Font Info:    Font shape `JY1/gt/m/n' will be
+(Font)              scaled to size 9.60999pt on input line 40.
+LaTeX Font Info:    Font shape `JT1/mc/bx/n' in size <14.4> not available
+(Font)              Font shape `JT1/gt/m/n' tried instead on input line 40.
+LaTeX Font Info:    Font shape `JT1/gt/m/n' will be
+(Font)              scaled to size 13.83836pt on input line 40.
+LaTeX Font Info:    Font shape `JY1/mc/bx/n' in size <14.4> not available
+(Font)              Font shape `JY1/gt/m/n' tried instead on input line 40.
+LaTeX Font Info:    Font shape `JY1/gt/m/n' will be
+(Font)              scaled to size 13.83836pt on input line 40.
+LaTeX Font Info:    Font shape `JT1/mc/bx/n' in size <17.28> not available
+(Font)              Font shape `JT1/gt/m/n' tried instead on input line 40.
+LaTeX Font Info:    Font shape `JT1/gt/m/n' will be
+(Font)              scaled to size 16.60605pt on input line 40.
+LaTeX Font Info:    Font shape `JY1/mc/bx/n' in size <17.28> not available
+(Font)              Font shape `JY1/gt/m/n' tried instead on input line 40.
+LaTeX Font Info:    Font shape `JY1/gt/m/n' will be
+(Font)              scaled to size 16.60605pt on input line 40.
+File: logo_u-ryukyu.jpg Graphic file (type bmp)
+<logo_u-ryukyu.jpg>
+ [1
+
+]
+LaTeX Font Info:    Font shape `JT1/mc/m/n' will be
+(Font)              scaled to size 11.53198pt on input line 40.
+LaTeX Font Info:    Font shape `JY1/mc/m/n' will be
+(Font)              scaled to size 11.53198pt on input line 40.
+ (./text/Jabstract.tex) [2] (./text/Eabstract.tex) [3]
+LaTeX Font Info:    Font shape `JT1/mc/m/n' will be
+(Font)              scaled to size 23.90964pt on input line 43.
+LaTeX Font Info:    Font shape `JY1/mc/m/n' will be
+(Font)              scaled to size 23.90964pt on input line 43.
+LaTeX Font Info:    Font shape `JT1/gt/m/n' will be
+(Font)              scaled to size 23.90964pt on input line 43.
+LaTeX Font Info:    Font shape `JY1/gt/m/n' will be
+(Font)              scaled to size 23.90964pt on input line 43.
+ (./thesis.toc [4
+
+])
+\tf@toc=\write3
+\openout3 = `thesis.toc'.
+
+ [5] (./thesis.lof)
+\tf@lof=\write4
+\openout4 = `thesis.lof'.
+
+ [0
+
+]
+\openout2 = `./text/introduction.aux'.
+
+ (./text/introduction.tex
+第1章
+LaTeX Font Info:    Font shape `JT1/mc/m/n' will be
+(Font)              scaled to size 19.9311pt on input line 1.
+LaTeX Font Info:    Font shape `JY1/mc/m/n' will be
+(Font)              scaled to size 19.9311pt on input line 1.
+LaTeX Font Info:    Font shape `JT1/gt/m/n' will be
+(Font)              scaled to size 19.9311pt on input line 1.
+LaTeX Font Info:    Font shape `JY1/gt/m/n' will be
+(Font)              scaled to size 19.9311pt on input line 1.
+LaTeX Font Info:    Font shape `JT1/mc/m/n' will be
+(Font)              scaled to size 13.83836pt on input line 4.
+LaTeX Font Info:    Font shape `JY1/mc/m/n' will be
+(Font)              scaled to size 13.83836pt on input line 4.
+) [1
+
+
+] [2]
+\openout2 = `./text/chapter2.aux'.
+
+ (./text/chapter2.tex
+第2章
+LaTeX Font Info:    Font shape `JT1/gt/m/n' will be
+(Font)              scaled to size 11.53198pt on input line 3.
+LaTeX Font Info:    Font shape `JY1/gt/m/n' will be
+(Font)              scaled to size 11.53198pt on input line 3.
+) [3
+
+
+
+
+]
+\openout2 = `./text/chapter3.aux'.
+
+ (./text/chapter3.tex
+第3章
+[4
+
+
+
+
+] [5]
+
+LaTeX Warning: Citation `Cmake' on page 6 undefined on input line 34.
+
+[6]
+LaTeX Font Info:    Font shape `JT1/mc/m/n' will be
+(Font)              scaled to size 8.64899pt on input line 56.
+LaTeX Font Info:    Font shape `JY1/mc/m/n' will be
+(Font)              scaled to size 8.64899pt on input line 56.
+LaTeX Font Info:    Font shape `JT1/gt/m/n' will be
+(Font)              scaled to size 6.72699pt on input line 56.
+LaTeX Font Info:    Font shape `JY1/gt/m/n' will be
+(Font)              scaled to size 6.72699pt on input line 56.
+ (./code/xv6-aauefi.def
+LaTeX Font Info:    Font shape `JT1/mc/m/n' will be
+(Font)              scaled to size 6.72699pt on input line 1.
+LaTeX Font Info:    Font shape `JT1/gt/m/n' will be
+(Font)              scaled to size 8.64899pt on input line 1.
+LaTeX Font Info:    Font shape `JY1/gt/m/n' will be
+(Font)              scaled to size 8.64899pt on input line 1.
+ [7]) (./code/run.sh) [8]
+LaTeX Font Info:    Trying to load font information for OMS+cmr on input line 1
+06.
+
+(/usr/local/texlive/2023/texmf-dist/tex/latex/base/omscmr.fd
+File: omscmr.fd 2022/07/10 v2.5l Standard LaTeX font definitions
+)
+LaTeX Font Info:    Font shape `OMS/cmr/m/n' in size <10> not available
+(Font)              Font shape `OMS/cmsy/m/n' tried instead on input line 106.
+
+
+LaTeX Warning: Citation `xv6-aarch64' on page 9 undefined on input line 117.
+
+File: ./figs/boot.pdf Graphic file (type pdf)
+<./figs/boot.pdf>
+[9]
+File: ./figs/EL.pdf Graphic file (type pdf)
+<./figs/EL.pdf>
+ [10] (./code/bootloader.c [11] [12] [13] [14] [15]) [16]
+File: ./figs/xv6-aarch64.pdf Graphic file (type pdf)
+<./figs/xv6-aarch64.pdf>
+ [17]
+File: ./figs/gdb.pdf Graphic file (type pdf)
+<./figs/gdb.pdf>
+ [18]
+LaTeX Font Info:    Trying to load font information for TS1+cmtt on input line 
+206.
+
+(/usr/local/texlive/2023/texmf-dist/tex/latex/base/ts1cmtt.fd
+File: ts1cmtt.fd 2022/07/10 v2.5l Standard LaTeX font definitions
+)
+File: ./figs/gdb2.pdf Graphic file (type pdf)
+<./figs/gdb2.pdf>
+ [19] [20]
+File: ./figs/clang-xv6.pdf Graphic file (type pdf)
+<./figs/clang-xv6.pdf>
+
+[21]) [22]
+第4章
+[23
+
+
+
+]
+Overfull \hbox (369.87488pt too wide) in paragraph at lines 81--85
+[][] 
+ []
+
+[24
+
+]
+\openout2 = `./text/reference.aux'.
+
+ (./text/reference.tex
+Underfull \hbox (badness 10000) in paragraph at lines 40--41
+[]\OT1/cmr/m/n/10 Raspberry Pi 3 Model B+ $\OT1/cmtt/m/n/10 https : / / www . r
+aspberrypi . com / products /
+ []
+
+
+Underfull \hbox (badness 3623) in paragraph at lines 43--44
+[]\JY1/mc/m/n/10 コンテナと \OT1/cmr/m/n/10 QEMU \JY1/mc/m/n/10 を用いた \OT1/c
+mr/m/n/10 Gear-sOS \JY1/mc/m/n/10 開発環境\OT1/cmr/m/n/10 , \JY1/mc/m/n/10 徳里
+ 光陽\OT1/cmr/m/n/10 ,$\OT1/cmtt/m/n/10 https :
+ []
+
+
+Underfull \hbox (badness 10000) in paragraph at lines 43--44
+\OT1/cmtt/m/n/10 / / gitlab . ie . u-[]ryukyu . ac . jp / dissertation / 2022 /
+ e195748 / -[] / raw / main /
+ []
+
+[25
+
+
+]) [26] (./thesis.aux (./text/introduction.aux) (./text/chapter2.aux)
+(./text/chapter3.aux) (./text/reference.aux))
+
+LaTeX Warning: There were undefined references.
+
+
+LaTeX Warning: There were multiply-defined labels.
+
+ ) 
+Here is how much of TeX's memory you used:
+ 4407 strings out of 476693
+ 67406 string characters out of 5805373
+ 2262209 words of memory out of 5000000
+ 24768 multiletter control sequences out of 15000+600000
+ 526413 words of font info for 102 fonts, out of 8000000 for 9000
+ 934 hyphenation exceptions out of 8191
+ 70i,12n,76p,668b,1938s stack positions out of 10000i,1000n,20000p,200000b,200000s
+
+Output written on thesis.dvi (32 pages, 123604 bytes).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/thesis.lot	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,4 @@
+\addvspace {10\jsc@mpt }
+\addvspace {10\jsc@mpt }
+\addvspace {10\jsc@mpt }
+\addvspace {10\jsc@mpt }
Binary file final/thesis.pdf has changed
Binary file final/thesis.synctex.gz has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/thesis.tex	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,93 @@
+\documentclass[title,12pt]{jsreport}
+\usepackage{ie-thesis}
+\usepackage{listings}
+\usepackage{here}
+\PassOptionsToPackage{hyphens}{url}
+
+\lstset{
+  basicstyle={\ttfamily\scriptsize},
+  identifierstyle={\small},
+  commentstyle={\smallitshape},
+  keywordstyle={\small\bfseries},
+  ndkeywordstyle={\small},
+  stringstyle={\small\ttfamily},
+  frame={tbrl},
+  framesep=5pt,
+  breaklines=true,
+  columns=[l]{fullflexible},
+  numbers=left,
+  xrightmargin=0zw,
+  xleftmargin=3zw,
+  numberstyle={\scriptsize},
+  stepnumber=1,
+  numbersep=1zw,
+  lineskip=-0.1ex
+}
+
+\jtitle{Gears OSの64bitブートに関する研究}
+\title{Research on 64-bit boot of Gears OS}
+
+\affiliation{琉球大学工学部工学科知能情報コース}
+\studentid{205729J}
+\author{仲吉 菜々子}
+\supervisor{河野 真治}
+
+%\Jabstract{\include{./text/Jabstract}}
+\Jabstract{\input{./text/Jabstract.tex}}
+\Eabstract{\input{./text/Eabstract.tex}}
+   
+\begin{document}
+\maketitle %Don't remove.
+
+% 目次
+\tableofcontents	%Don't remove.
+
+% 図目次,図がある場合のみ
+\listoffigures
+
+% 表も軸,表がある場合のみ
+%\listoftables
+
+% pagecounter settings
+\setcounter{page}{0}	%Don't remove.
+
+% main text
+% introduction
+\include{./text/introduction}
+
+% ... 
+\include{./text/chapter2}
+
+\include{./text/chapter3}
+
+\chapter{まとめと今後の展望}
+
+今回の研究では,UEFIに用意されている機能を組み合わせることで,直接kernelのバイナリからxv6を起動することができた.他にUEFIでOSを起動する手法として,ELF形式のバイナリの起動がある.UEFIはELF形式に対応しているため,a.outを扱うより柔軟にOSをロードできる可能性がある.しかし,OSをELF形式のバイナリで出力するためには,kernelをbuildする際のリンカスクリプトや,OSのソースコードを変更する必要がある.
+
+今後Gears OSをxv6-aarch64に書き換えるにあたって,以下の3点について今後確認する必要がある.
+
+\begin{quote}
+ \begin{itemize}
+   \item Clang + ldd + cmakeを用いて,xv6-aarch64をコンパイルする. 
+   \item CbClangでコンパイルする.
+   \item kernelからCodeGearを読み込んで実行する.
+ \end{itemize}
+\end{quote}
+
+これらの実装を行い、Gears OSで64bitプロセッサのリソースを利用することが可能になれば,Gears OSの実装の幅がさらに広がるのではないかと考える.
+
+
+\chapter*{謝辞}
+本研究の遂行及び本論文の作成にあたり,御多忙にもかかわらず終始懇切丁寧に御指導と御教授を賜りました河野真治准教授に深く感謝します.
+一年間共に研究を行った並列信頼研究室の同期と,修士の先輩方に深く感謝します.
+\rightline{2024年1月}
+\rightline{仲吉菜々子}
+
+% reference
+\include{./text/reference}
+
+%付録がある場合のみ
+%\appendix
+%付録項目ごとに章構成する.章番号は本文とは独立に構成される.
+
+\end{document}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final/thesis.toc	Wed Jan 31 19:17:13 2024 +0900
@@ -0,0 +1,33 @@
+\contentsline {chapter}{\numberline {第1章}序論}{1}{}%
+\contentsline {section}{\numberline {1.1}背景と目的}{1}{}%
+\contentsline {section}{\numberline {1.2}論文の構成}{2}{}%
+\contentsline {chapter}{\numberline {第2章}Gears OSについて}{3}{}%
+\contentsline {subsection}{\numberline {2.0.1}Gears OS}{3}{}%
+\contentsline {subsection}{\numberline {2.0.2}CbC(Continuation based C)}{3}{}%
+\contentsline {chapter}{\numberline {第3章}UEFIを用いたxv6のブート}{4}{}%
+\contentsline {section}{\numberline {3.1}基礎概念}{4}{}%
+\contentsline {subsection}{\numberline {3.1.1}xv6}{4}{}%
+\contentsline {subsection}{\numberline {3.1.2}ARM64/AAsrch64}{4}{}%
+\contentsline {subsection}{\numberline {3.1.3}QEMU(Quick Emulator)}{4}{}%
+\contentsline {subsection}{\numberline {3.1.4}UEFI}{5}{}%
+\contentsline {subsection}{\numberline {3.1.5}singulariy}{5}{}%
+\contentsline {subsection}{\numberline {3.1.6}GCC}{5}{}%
+\contentsline {subsection}{\numberline {3.1.7}gnu-efi}{5}{}%
+\contentsline {subsection}{\numberline {3.1.8}EDK2}{6}{}%
+\contentsline {subsection}{\numberline {3.1.9}clang}{6}{}%
+\contentsline {subsection}{\numberline {3.1.10}CMake}{6}{}%
+\contentsline {subsection}{\numberline {3.1.11}GDB}{6}{}%
+\contentsline {subsection}{\numberline {3.1.12}RaspBerry Pi Model 3B+}{6}{}%
+\contentsline {section}{\numberline {3.2}Geras OSの開発環境について}{7}{}%
+\contentsline {section}{\numberline {3.3}singularityによるコンテナの作成}{7}{}%
+\contentsline {section}{\numberline {3.4}QEMUを用いたUEFIのエミュレート}{8}{}%
+\contentsline {subsection}{\numberline {3.4.1}UEFIのbuild}{8}{}%
+\contentsline {subsection}{\numberline {3.4.2}QEMUでUEFIのエミュレート}{9}{}%
+\contentsline {section}{\numberline {3.5}UEFIアプリケーションとbootloader}{9}{}%
+\contentsline {subsection}{\numberline {3.5.1}UEFIアプリケーションの作成とコンパイル}{9}{}%
+\contentsline {subsection}{\numberline {3.5.2}OSがbootするまでの流れ}{9}{}%
+\contentsline {subsection}{\numberline {3.5.3}bootloaderの実装}{11}{}%
+\contentsline {subsection}{\numberline {3.5.4}GBDを用いたデバッグ}{18}{}%
+\contentsline {subsection}{\numberline {3.5.5}clangでのコンパイル}{20}{}%
+\contentsline {chapter}{\numberline {第4章}まとめと今後の展望}{23}{}%
+\contentsline {chapter}{参考文献}{25}{}%