SlideShare une entreprise Scribd logo
1  sur  38
Télécharger pour lire hors ligne
?
OSC 2016 Nagoya
*BSD
@nullnilaki
sgi Indigo2
MIPS R8000
>> hinv
System: IP26
Processor: 75 Mhz R8000, with FPU
Primary I-cache size: 16 Kbytes
Primary D-cache size: 16 Kbytes
Secondary cache size: 2 Mbytes
Memory size: 512 Mbytes
Graphics: GR5-XZ
SCSI Disk: scsi(0)disk(1)
Audio: Iris Audio Processor: version A2 revision 1.1.0
MIPS R8000
M88k !
http://forums.nekochan.net/viewtopic.php?t=16726745
MIPS R8000
TLB 384 …
MIPS R8000
/*
* Initialize the kernel page table pointer.
* This is a no-op on non-R8000 processors.
*/
LEAF(tlb_set_gbase, 0)
j ra
nop
END(tlb_set_gbase)
/*
* void tlb_set_gbase(vaddr_t, vsize_t);
*/
LEAF(tlb_set_gbase, 0) /* { */
DMTC0 a0, COP_0_GBASE
MTC0_HAZARD
DMTC0 a1, COP_0_WORK1
MTC0_HAZARD
j ra
NOP
END(tlb_set_gbase) /* } */
…
MIPS R8000
…
MIPS R8000
R8000
SGI
Linux/MIPS
R8000
TLB
MIPS
R10000
Silicon Graphics
http://archive.linux.or.jp/JF/JFdocs/MIPS-HOWTO-9.html#ss9.8
R8000( )…
R8000( )…
R8000( )…
R8000( ) ( ´)
http://d.hatena.ne.jp/syuu1228/20090805
…
RAM disk kernel ?
RAM disk kernel ?
OpenBSD sgimips (Fuel )
?
Set name(s)? (or 'abort' or 'done') [done]
Cannot determine prefetch area. Continue without verification? [no] yes
Installing base57.tgz 100% |**************************| 56003 KB 03:49
Extracting etc.tgz 100% |**************************| 110 KB 00:00
Location of sets? (disk http nfs or 'done') [http] done
Are you *SURE* your install is complete without 'bsd.IP26'? [no] yes
Time appears wrong. Set to 'Sun Sep 6 08:56:36 JST 2015'? [yes]
Saving configuration files...done.
Making all device nodes...sh(8003) in realloc(): error: chunk info corrupted
Abort trap
done.
Installing boot loader in volume header.
Writing file /mnt/usr/mdec/boot-IP26
sgivol: stat /mnt/usr/mdec/boot-IP26: No such file or directory
WARNING: Boot install failed. Booting from disk will not be possible
IP26 RAM disk kernel RAM disk kernel netboot
(ftp.jaist.ac.jp ) base57.tgz
OpenBSD IP26
base57.tgz ” ”
?
/src/distrib/sgi/ramdisk/install.md
md_installboot() {
local _disk=$1
echo "Installing boot loader in volume header."
if ! /usr/mdec/sgivol -w boot /mnt/usr/mdec/boot-$IPARCH $_disk; then
echo "nWARNING: Boot install failed. Booting from disk will not be possible"
fi
for _k in /mnt/bsd{,.mp,.rd}; do
[[ -f $_k.$IPARCH ]] && mv $_k.$IPARCH $_k
done
}
Makefile boot-IP26
RAM disk kernel ftp
NetBSD sysinst(install kernel) ?ftp
OpenBSD ftp
anonymous ftp
# /mnt/usr/mdec/sgivol -w boot /mnt/usr/mdec/boot-IP26 sd0
Writing file /mnt/usr/mdec/boot-IP26
File /mnt/usr/mdec/boot-IP26 has 101640 bytes
disklabel shows 17783112 sectors with 512 bytes per sector
checksum: 00000000
root part: 0
swap part: 1
bootfile: /bsd
Volume header files:
boot offset 2 blocks, length 101640 bytes (199 blocks)
SGI partitions:
0:a blocks 17779977 first 3135 type 4 (BSD4.2)
8:i blocks 3135 first 0 type 0 (Volume Header)
10:k blocks 17783112 first 0 type 6 (Volume)
# mv /mnt/usr/mdec/bsd.IP26 /mnt/bsd
ftp …
!
NFS
•
OS
NFS !
( NIC )
•
NFS
NFS
!
?
?
OS panic R8000
R8000
OpenBSD R8000
utlbmod?
>> bootp()bsd.rd.IP26
Obtaining bsd.rd.IP26 from server macbook2006
3577592+722344 entry: 0xa800000008010000
ARCS64 Firmware
Found SGI-IP26, setting up.
...
panic: trap: utlbmod: invalid pte
Stopped at 0xa800000008294424: jr ra
0xa800000008294428: move zero,zero
utlbmod panic !
TLB ?
TLB ?
• OS panic utlbmod
• OS panic …
PTE ?
• ….
?
• C
…
TLB ?
…
C
/sys/arch/mips64/include/pmap.h
/* User virtual address to pte page entry */
#define uvtopte(va) (((va) >> PAGE_SHIFT) & (NPTEPG -1))
”2”
Multi-user
!
OpenBSD
…
…
sgi CPU !
diff
?
• MIPS R8000 CPU …
• MIPS R8000 …
/src/sys/arch/mips64/mips64/cache_tfp.c
/src/sys/arch/mips64/mips64/cache_tfp_subr.S
/src/sys/arch/mips64/mips64/exception_tfp.S
/src/sys/arch/mips64/mips64/tlb_tfp.S
• miod
…
SIGBUS SIGSEGV
…
The 2 in the original code is log2(pte size); k0 >> PAGE_SHIFT will be
the pte number. But in the page table, it is stored as an array of
32-bit words, so we need to shift it to the left by 2. The original
instructions:
PTR_SRL k0, PAGE_SHIFT - 2
andi k0, ((NPTEPG / 2) - 1) << 2
are equivalent to:
PTR_SRL k0, PAGE_SHIFT
andi k0, (NPTEPG / 2) - 1
PTR_SLL k0, 2
and guarantees the address is correctly aligned for the `lwu'
instruction later.
2 !
0 0
1 4
2 8
3 12
…
Page table
index Page tabe
Page fault
Page table index
PTE_LOG
index
PTR_SRL k0, PAGE_SHIFT - PTE_LOG
andi k0, (NPTEPG - 1) << PTE_LOG
Page table
PTR_ADDU k1, k0
PTE_LOAD k0, 0(k1) # get pte
#define PTE_LOG 2
@n_soda
!
mips RISC -R2000/ R3000-
ISBN-10: 4320025989
NIX
ISBN-10: 4320025989
MIPS( )
R8000 User Manual
….
http://nullnilaki.hatenablog.com/entries/2015/12/23
Miod @MiodVallat
twitter
BSD

Contenu connexe

Tendances

移植FreeRTOS 之嵌入式軟體研究與開發
移植FreeRTOS 之嵌入式軟體研究與開發移植FreeRTOS 之嵌入式軟體研究與開發
移植FreeRTOS 之嵌入式軟體研究與開發艾鍗科技
 
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMUSFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMULinaro
 
How To Train Your ARM(SBC)
How To  Train Your ARM(SBC)How To  Train Your ARM(SBC)
How To Train Your ARM(SBC)Naoto MATSUMOTO
 
Translation Cache Policies for Dynamic Binary Translation
Translation Cache Policies for Dynamic Binary TranslationTranslation Cache Policies for Dynamic Binary Translation
Translation Cache Policies for Dynamic Binary TranslationSaber Ferjani
 
Stm32 develop tool introduction
Stm32 develop tool introductionStm32 develop tool introduction
Stm32 develop tool introduction冠宇 陳
 
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法MITSUNARI Shigeo
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionJian-Hong Pan
 
Hackersuli - Linux game hacking with LD_PRELOAD
Hackersuli - Linux game hacking with LD_PRELOADHackersuli - Linux game hacking with LD_PRELOAD
Hackersuli - Linux game hacking with LD_PRELOADhackersuli
 
Cacti安装手册
Cacti安装手册Cacti安装手册
Cacti安装手册Yiwei Ma
 
Ceph OSD Op trace
Ceph OSD Op traceCeph OSD Op trace
Ceph OSD Op trace畅 刘
 
Killing any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureKilling any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureCyber Security Alliance
 
Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Mikhail Belopuhov: OpenBSD: Where is crypto headed?Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Mikhail Belopuhov: OpenBSD: Where is crypto headed?Yandex
 
Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Sam Kim
 

Tendances (17)

移植FreeRTOS 之嵌入式軟體研究與開發
移植FreeRTOS 之嵌入式軟體研究與開發移植FreeRTOS 之嵌入式軟體研究與開發
移植FreeRTOS 之嵌入式軟體研究與開發
 
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMUSFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
 
Ganeti - build your own cloud
Ganeti - build your own cloudGaneti - build your own cloud
Ganeti - build your own cloud
 
How To Train Your ARM(SBC)
How To  Train Your ARM(SBC)How To  Train Your ARM(SBC)
How To Train Your ARM(SBC)
 
Translation Cache Policies for Dynamic Binary Translation
Translation Cache Policies for Dynamic Binary TranslationTranslation Cache Policies for Dynamic Binary Translation
Translation Cache Policies for Dynamic Binary Translation
 
愛のSuperCollider
愛のSuperCollider愛のSuperCollider
愛のSuperCollider
 
Stm32 develop tool introduction
Stm32 develop tool introductionStm32 develop tool introduction
Stm32 develop tool introduction
 
My First BCC
My First BCCMy First BCC
My First BCC
 
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
深層学習フレームワークにおけるIntel CPU/富岳向け最適化法
 
Log
LogLog
Log
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS Distribution
 
Hackersuli - Linux game hacking with LD_PRELOAD
Hackersuli - Linux game hacking with LD_PRELOADHackersuli - Linux game hacking with LD_PRELOAD
Hackersuli - Linux game hacking with LD_PRELOAD
 
Cacti安装手册
Cacti安装手册Cacti安装手册
Cacti安装手册
 
Ceph OSD Op trace
Ceph OSD Op traceCeph OSD Op trace
Ceph OSD Op trace
 
Killing any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureKilling any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented feature
 
Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Mikhail Belopuhov: OpenBSD: Where is crypto headed?Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Mikhail Belopuhov: OpenBSD: Where is crypto headed?
 
Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1
 

Similaire à 最後の楽園の開発をちょこっとだけ手伝った話

Hardware Discovery Commands
Hardware Discovery CommandsHardware Discovery Commands
Hardware Discovery CommandsKevin OBrien
 
SUN主机产品介绍.ppt
SUN主机产品介绍.pptSUN主机产品介绍.ppt
SUN主机产品介绍.pptPencilData
 
Product Roadmap iEi 2017
Product Roadmap iEi 2017Product Roadmap iEi 2017
Product Roadmap iEi 2017Andrei Teleanu
 
Experiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 ServerExperiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 ServerJomaSoft
 
Some analysis of BlueStore and RocksDB
Some analysis of BlueStore and RocksDBSome analysis of BlueStore and RocksDB
Some analysis of BlueStore and RocksDBXiao Yan Li
 
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014EneaSoftware
 
MYS-6ULX Single Board Computer for Industry 4.0 and IoT Applications
MYS-6ULX Single Board Computer for Industry 4.0 and IoT ApplicationsMYS-6ULX Single Board Computer for Industry 4.0 and IoT Applications
MYS-6ULX Single Board Computer for Industry 4.0 and IoT ApplicationsLinda Zhang
 
The n00bs guide to ovs dpdk
The n00bs guide to ovs dpdkThe n00bs guide to ovs dpdk
The n00bs guide to ovs dpdkmarkdgray
 
[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practicalMoabi.com
 
MYC-J1028X CPU Module Overview
MYC-J1028X CPU Module OverviewMYC-J1028X CPU Module Overview
MYC-J1028X CPU Module OverviewLinda Zhang
 

Similaire à 最後の楽園の開発をちょこっとだけ手伝った話 (20)

Hardware Discovery Commands
Hardware Discovery CommandsHardware Discovery Commands
Hardware Discovery Commands
 
Log
LogLog
Log
 
SUN主机产品介绍.ppt
SUN主机产品介绍.pptSUN主机产品介绍.ppt
SUN主机产品介绍.ppt
 
Unix 6 en
Unix 6 enUnix 6 en
Unix 6 en
 
Project1
Project1Project1
Project1
 
Product Roadmap iEi 2017
Product Roadmap iEi 2017Product Roadmap iEi 2017
Product Roadmap iEi 2017
 
Log
LogLog
Log
 
Log
LogLog
Log
 
Log
LogLog
Log
 
Experiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 ServerExperiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 Server
 
Ghosterr
GhosterrGhosterr
Ghosterr
 
Barios crosober
Barios crosoberBarios crosober
Barios crosober
 
Some analysis of BlueStore and RocksDB
Some analysis of BlueStore and RocksDBSome analysis of BlueStore and RocksDB
Some analysis of BlueStore and RocksDB
 
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
 
MYS-6ULX Single Board Computer for Industry 4.0 and IoT Applications
MYS-6ULX Single Board Computer for Industry 4.0 and IoT ApplicationsMYS-6ULX Single Board Computer for Industry 4.0 and IoT Applications
MYS-6ULX Single Board Computer for Industry 4.0 and IoT Applications
 
The n00bs guide to ovs dpdk
The n00bs guide to ovs dpdkThe n00bs guide to ovs dpdk
The n00bs guide to ovs dpdk
 
linux-memory-explained.pdf
linux-memory-explained.pdflinux-memory-explained.pdf
linux-memory-explained.pdf
 
[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical
 
Log
LogLog
Log
 
MYC-J1028X CPU Module Overview
MYC-J1028X CPU Module OverviewMYC-J1028X CPU Module Overview
MYC-J1028X CPU Module Overview
 

Plus de nullnilaki

あるブートローダの話
あるブートローダの話あるブートローダの話
あるブートローダの話nullnilaki
 
あるキャッシュメモリの話
あるキャッシュメモリの話あるキャッシュメモリの話
あるキャッシュメモリの話nullnilaki
 
オープンソース開発と、 あるフレームバッファコンソールの話 ~名古屋応用編~
オープンソース開発と、あるフレームバッファコンソールの話~名古屋応用編~オープンソース開発と、あるフレームバッファコンソールの話~名古屋応用編~
オープンソース開発と、 あるフレームバッファコンソールの話 ~名古屋応用編~nullnilaki
 
あるクリスマスの話
あるクリスマスの話あるクリスマスの話
あるクリスマスの話nullnilaki
 
あるコンテキストスイッチの話
あるコンテキストスイッチの話あるコンテキストスイッチの話
あるコンテキストスイッチの話nullnilaki
 
あるmmapの話
あるmmapの話あるmmapの話
あるmmapの話nullnilaki
 
DEC_6600,DEC_TITAN Implementation of NetBSD(仮)
 DEC_6600,DEC_TITAN Implementation of NetBSD(仮) DEC_6600,DEC_TITAN Implementation of NetBSD(仮)
DEC_6600,DEC_TITAN Implementation of NetBSD(仮)nullnilaki
 

Plus de nullnilaki (7)

あるブートローダの話
あるブートローダの話あるブートローダの話
あるブートローダの話
 
あるキャッシュメモリの話
あるキャッシュメモリの話あるキャッシュメモリの話
あるキャッシュメモリの話
 
オープンソース開発と、 あるフレームバッファコンソールの話 ~名古屋応用編~
オープンソース開発と、あるフレームバッファコンソールの話~名古屋応用編~オープンソース開発と、あるフレームバッファコンソールの話~名古屋応用編~
オープンソース開発と、 あるフレームバッファコンソールの話 ~名古屋応用編~
 
あるクリスマスの話
あるクリスマスの話あるクリスマスの話
あるクリスマスの話
 
あるコンテキストスイッチの話
あるコンテキストスイッチの話あるコンテキストスイッチの話
あるコンテキストスイッチの話
 
あるmmapの話
あるmmapの話あるmmapの話
あるmmapの話
 
DEC_6600,DEC_TITAN Implementation of NetBSD(仮)
 DEC_6600,DEC_TITAN Implementation of NetBSD(仮) DEC_6600,DEC_TITAN Implementation of NetBSD(仮)
DEC_6600,DEC_TITAN Implementation of NetBSD(仮)
 

Dernier

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 

Dernier (20)

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 

最後の楽園の開発をちょこっとだけ手伝った話

  • 3. MIPS R8000 >> hinv System: IP26 Processor: 75 Mhz R8000, with FPU Primary I-cache size: 16 Kbytes Primary D-cache size: 16 Kbytes Secondary cache size: 2 Mbytes Memory size: 512 Mbytes Graphics: GR5-XZ SCSI Disk: scsi(0)disk(1) Audio: Iris Audio Processor: version A2 revision 1.1.0
  • 6. MIPS R8000 /* * Initialize the kernel page table pointer. * This is a no-op on non-R8000 processors. */ LEAF(tlb_set_gbase, 0) j ra nop END(tlb_set_gbase) /* * void tlb_set_gbase(vaddr_t, vsize_t); */ LEAF(tlb_set_gbase, 0) /* { */ DMTC0 a0, COP_0_GBASE MTC0_HAZARD DMTC0 a1, COP_0_WORK1 MTC0_HAZARD j ra NOP END(tlb_set_gbase) /* } */ …
  • 12. R8000( ) ( ´)
  • 14. RAM disk kernel ? RAM disk kernel ? OpenBSD sgimips (Fuel )
  • 15. ? Set name(s)? (or 'abort' or 'done') [done] Cannot determine prefetch area. Continue without verification? [no] yes Installing base57.tgz 100% |**************************| 56003 KB 03:49 Extracting etc.tgz 100% |**************************| 110 KB 00:00 Location of sets? (disk http nfs or 'done') [http] done Are you *SURE* your install is complete without 'bsd.IP26'? [no] yes Time appears wrong. Set to 'Sun Sep 6 08:56:36 JST 2015'? [yes] Saving configuration files...done. Making all device nodes...sh(8003) in realloc(): error: chunk info corrupted Abort trap done. Installing boot loader in volume header. Writing file /mnt/usr/mdec/boot-IP26 sgivol: stat /mnt/usr/mdec/boot-IP26: No such file or directory WARNING: Boot install failed. Booting from disk will not be possible IP26 RAM disk kernel RAM disk kernel netboot (ftp.jaist.ac.jp ) base57.tgz OpenBSD IP26 base57.tgz ” ”
  • 16. ? /src/distrib/sgi/ramdisk/install.md md_installboot() { local _disk=$1 echo "Installing boot loader in volume header." if ! /usr/mdec/sgivol -w boot /mnt/usr/mdec/boot-$IPARCH $_disk; then echo "nWARNING: Boot install failed. Booting from disk will not be possible" fi for _k in /mnt/bsd{,.mp,.rd}; do [[ -f $_k.$IPARCH ]] && mv $_k.$IPARCH $_k done }
  • 18. RAM disk kernel ftp NetBSD sysinst(install kernel) ?ftp OpenBSD ftp anonymous ftp
  • 19. # /mnt/usr/mdec/sgivol -w boot /mnt/usr/mdec/boot-IP26 sd0 Writing file /mnt/usr/mdec/boot-IP26 File /mnt/usr/mdec/boot-IP26 has 101640 bytes disklabel shows 17783112 sectors with 512 bytes per sector checksum: 00000000 root part: 0 swap part: 1 bootfile: /bsd Volume header files: boot offset 2 blocks, length 101640 bytes (199 blocks) SGI partitions: 0:a blocks 17779977 first 3135 type 4 (BSD4.2) 8:i blocks 3135 first 0 type 0 (Volume Header) 10:k blocks 17783112 first 0 type 6 (Volume) # mv /mnt/usr/mdec/bsd.IP26 /mnt/bsd ftp … !
  • 20. NFS • OS NFS ! ( NIC ) • NFS NFS !
  • 21. ?
  • 23. utlbmod? >> bootp()bsd.rd.IP26 Obtaining bsd.rd.IP26 from server macbook2006 3577592+722344 entry: 0xa800000008010000 ARCS64 Firmware Found SGI-IP26, setting up. ... panic: trap: utlbmod: invalid pte Stopped at 0xa800000008294424: jr ra 0xa800000008294428: move zero,zero utlbmod panic !
  • 24. TLB ?
  • 25. TLB ? • OS panic utlbmod • OS panic … PTE ? • …. ? • C …
  • 27. C /sys/arch/mips64/include/pmap.h /* User virtual address to pte page entry */ #define uvtopte(va) (((va) >> PAGE_SHIFT) & (NPTEPG -1)) ”2”
  • 29.
  • 31.
  • 33. diff
  • 34. ? • MIPS R8000 CPU … • MIPS R8000 … /src/sys/arch/mips64/mips64/cache_tfp.c /src/sys/arch/mips64/mips64/cache_tfp_subr.S /src/sys/arch/mips64/mips64/exception_tfp.S /src/sys/arch/mips64/mips64/tlb_tfp.S • miod
  • 36. … The 2 in the original code is log2(pte size); k0 >> PAGE_SHIFT will be the pte number. But in the page table, it is stored as an array of 32-bit words, so we need to shift it to the left by 2. The original instructions: PTR_SRL k0, PAGE_SHIFT - 2 andi k0, ((NPTEPG / 2) - 1) << 2 are equivalent to: PTR_SRL k0, PAGE_SHIFT andi k0, (NPTEPG / 2) - 1 PTR_SLL k0, 2 and guarantees the address is correctly aligned for the `lwu' instruction later.
  • 37. 2 ! 0 0 1 4 2 8 3 12 … Page table index Page tabe Page fault Page table index PTE_LOG index PTR_SRL k0, PAGE_SHIFT - PTE_LOG andi k0, (NPTEPG - 1) << PTE_LOG Page table PTR_ADDU k1, k0 PTE_LOAD k0, 0(k1) # get pte #define PTE_LOG 2 @n_soda !
  • 38. mips RISC -R2000/ R3000- ISBN-10: 4320025989 NIX ISBN-10: 4320025989 MIPS( ) R8000 User Manual …. http://nullnilaki.hatenablog.com/entries/2015/12/23 Miod @MiodVallat twitter BSD