xv6-simplified 0.1
简化版xv6
Loading...
Searching...
No Matches
Macros
memlayout.h File Reference

记录各个device在内存中的布局、地址位置 More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define KERNBASE   0x80020000L
 
#define PHYSTOP   (KERNBASE + 16*1024*1024)
 
#define UART0   0x10000000L
 
#define UART0_IRQ   10
 
#define VIRTIO0   0x10001000
 
#define VIRTIO0_IRQ   1
 
#define CLINT   0x2000000L
 
#define CLINT_MTIMECMP(hartid)   (CLINT + 0x4000 + 8*(hartid))
 
#define CLINT_MTIME   (CLINT + 0xBFF8)
 
#define PLIC   0x0c000000L
 
#define PLIC_PRIORITY   (PLIC + 0x0)
 
#define PLIC_PENDING   (PLIC + 0X1000)
 
#define PLIC_MENABLE(hart)   (PLIC + 0x2000 + (hart)*0x100)
 
#define PLIC_SENABLE(hart)   (PLIC + 0x2080 + (hart)*0x100)
 
#define PLIC_MPRIORITY(hart)   (PLIC + 0x200000 + (hart)*0x2000)
 
#define PLIC_SPRIORITY(hart)   (PLIC + 0x201000 + (hart)*0x2000)
 
#define PLIC_MCLAIM(hart)   (PLIC + 0x200004 + (hart)*0x2000)
 
#define PLIC_SCLAIM(hart)   (PLIC + 0x201004 + (hart)*0x2000)
 
#define TRAMPOLINE   (MAXVA - PGSIZE)
 
#define KSTACK(p)   (TRAMPOLINE - (p + 1) * 2*PGSIZE)
 
#define TRAPFRAME   (TRAMPOLINE - PGSIZE)
 

Detailed Description

记录各个device在内存中的布局、地址位置

Date
23.05.26
Author
xin
Version
0.2 @status Stable

Macro Definition Documentation

◆ CLINT

#define CLINT   0x2000000L

◆ CLINT_MTIME

#define CLINT_MTIME   (CLINT + 0xBFF8)

◆ CLINT_MTIMECMP

#define CLINT_MTIMECMP (   hartid)    (CLINT + 0x4000 + 8*(hartid))

◆ KERNBASE

#define KERNBASE   0x80020000L

◆ KSTACK

#define KSTACK (   p)    (TRAMPOLINE - (p + 1) * 2*PGSIZE)

◆ PHYSTOP

#define PHYSTOP   (KERNBASE + 16*1024*1024)

◆ PLIC

#define PLIC   0x0c000000L

◆ PLIC_MCLAIM

#define PLIC_MCLAIM (   hart)    (PLIC + 0x200004 + (hart)*0x2000)

◆ PLIC_MENABLE

#define PLIC_MENABLE (   hart)    (PLIC + 0x2000 + (hart)*0x100)

◆ PLIC_MPRIORITY

#define PLIC_MPRIORITY (   hart)    (PLIC + 0x200000 + (hart)*0x2000)

◆ PLIC_PENDING

#define PLIC_PENDING   (PLIC + 0X1000)

◆ PLIC_PRIORITY

#define PLIC_PRIORITY   (PLIC + 0x0)

◆ PLIC_SCLAIM

#define PLIC_SCLAIM (   hart)    (PLIC + 0x201004 + (hart)*0x2000)

◆ PLIC_SENABLE

#define PLIC_SENABLE (   hart)    (PLIC + 0x2080 + (hart)*0x100)

◆ PLIC_SPRIORITY

#define PLIC_SPRIORITY (   hart)    (PLIC + 0x201000 + (hart)*0x2000)

◆ TRAMPOLINE

#define TRAMPOLINE   (MAXVA - PGSIZE)

◆ TRAPFRAME

#define TRAPFRAME   (TRAMPOLINE - PGSIZE)

◆ UART0

#define UART0   0x10000000L

◆ UART0_IRQ

#define UART0_IRQ   10

◆ VIRTIO0

#define VIRTIO0   0x10001000

◆ VIRTIO0_IRQ

#define VIRTIO0_IRQ   1