← Back to list

Memory address in ram,rom,ssd , GDT , what is Root access?( from high level )

25–4–2026=what is memory address in every chip ram,rom,ssd ,who made memory address and why its so important in c and how cpu and memory…

fiveTech · 2026-04-28 09:01 · 0 claps · 5.6 min read
#rams #rom #linux #memory-address #gdt
Open on Medium ↗
Wiki topics: 🔓 · Open Source

Memory address in ram,rom,ssd , GDT , what is Root access?( from high level )

25–4–2026=what is memory address in every chip ram,rom,ssd ,who made memory address and why its so important in c and how cpu and memory address is corelated ?

Ans ==>> in any system cpu has just 1 job cpu go to eitheir ram,rom,ssd memory address and excute the code written in code for eg. Starting a laptop when power on happened cpu go to a rom address which has uefi code in uefi code a code is written where it goes to do POST go to all hardware chip bus traces and see if they are active and doing ping response so in uefi code it is written to go on some other address and exceute that code over ther in that address same thing happened

Who made memory address ==> memory address is devepled by motherboad guys in case of laptop hp hp take ram,rom,ssd from samsung see their datasheet in datasheet of all of them size of all 3 is written they see the size and make address range separtly for each 3 of them then making address ranges like (1–100,100–200) ram address is 1,2,3,4,5,..100, rom address is 101,102,103,104,…200 this separate memory address range is called memory map . Using this memory map they write driver tree in driver tree they write all 3 ram,rom,ssd memory address,intrrupt number which ssd chip company and all hardware like isp,wifi,audio chip company has given them and finally they put all 3 memory address ram,rom,ssd into device tree so device TREE has address range of all 3 ,

BUT why C is so important for memory address management :- bcoz c is the only language that can modify the memory address eg. If in some memory address os code is written like 0001sd200= os; then int *ptr = 123 …

C code like literally alter the code inside memory address with some gibris or you own code and when cpu goes to that address to execute that code then it will execute your code rather than execute those code that it meant to be .

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

26–4–2026==what is GDT and why its necessary for mainting diffrence between ring 0 software code (kernel , device driver ) and ring 3 software code ( 10 layers of distro, all insatlled apps like yt ,ig,davinci resolve ,vscode ) ??? ans=>so after grub or bootloadar when grub copy the kernal code in ram and cpu execute the kernel code and kernel code create a table of software ( that will have ring 3 and ring 0 llike kernal / device drive +hal have ring 0 and initSystem/audio / packege manger /file sys rules(lower ring 3 ) and all apps yt,ig,vs (upper ring 3 ) they they are dependent 2 times on distro layers and device driver but distro layer is dependent onyl 1 time to kernal /device driver ) that table is called gdt . so each time if i double click the yt icon so yt code from ssd copy and come to ram and cpu then go to yt code and cpu now became the ring 3 means he cant go to directly to the ring 0 code i.e kernel and device driver it has to go via syscall and 10 distro layer so if in yt code a code written to direcltty go address to the kernel/driver ring 0 it cpu will see gdt and block but if yt code was written go to device driver and start vdo audio recording ring 3 right ??? so cpu has one harsh rule i guess i.e whenever any code in any memory address ramrom say to go to any memory address of any one ramrom then 1st check its address which is saying traveller memoryy address ( in this case it yt i,e ring 3 ) and then check the destination memory address ( in this case in yt if bad then audio recoeder device driver ring 0 and here cpu blocks him ) but (in this case in yt if good then go to audio server ring 3 and here cpu go un-interrupted ) -so upper layer ring 3 app like yt ,ig,vs never goes to ring 0 but lower layer (ring 3 ) sofware like any distro can go to ring 0 only to kernel but lower layer ring 3 never never go to device driver its always kernel that goes to device driver

ring 3(yt)==syscall===ring 3 (audio server)==syscall====ring 0 kernel===audio chip device driver===audio firmware

-each time in any code in any address it memory address traveling is written then cpu will check 2 things 1st who is traveller upper ring 3,lower ring 3 , ring 0 to know thier permission range and whats thier destination memory addrress is

CPU checks 2 things on every memory access:

1.JJ Who is travelling

Which ring is current code

CS register tells CPU this

JJWhere are they going

Which address is destination

GDT tells CPU if allowed

Ring 3 → Ring 3 same app = allowed ✅

Ring 3 → Ring 3 different app = blocked ❌

Ring 3 → Ring 0 = blocked ❌

Ring 0 → anywhere = allowed ✅

2.ring 3(yt)==ring 3 (audio server)==ring 0 kernel===audio chip device driver i was aware of the system call but in flow i had just forget to write the system call so have ring 3(yt)==sysCall===ring 3 (audio server)==sysCall====ring 0 kernel==audio device driver ==audio chip frimware==actaul physicall hardwar

3.upper layer ring 3 sofware yt ,ig,vs code ,

low layer ring 3 soafware 10 layer of distro ,

ring 0 kernel /device drivers

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —-

27–4–26== what is root access ? How when someone get the access the root access then it can change the uefi code, device tree code basically once cpu gets the root access then it can go to any memory address of any ram,rom,ssd and read and write the code ??

Ans:- who creates root,why they create and when its root id createsAfter we install ubuntu via usb and rufus in laptop then ubunutu ask to create a login pin.This one pin when we open our laptop login pin when we 1st created this pin let say name rahul and login in rahul123 but in actual we create 2 pin 1 pin is for simple user login and in a way this same pin is used when we tried to get the rootaccess of a system (god mode )But how can any body get a root access you go to terminals and type ‘sudo apt ‘ then kernel will ask you your pin you enter your pin same pin you created during login pin and used daily after just starting your laptop that same pin after you have done now cpu which earlier had ring 3 means he cant got to rom ,ssd memory address and do READ , WRITE now after terminals and type ‘sudo apt ‘+ login pin can became ring 0 means now it can go rom,ssd and READ+ WRITE .

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

27–4–26==methods to change the uefi (firmware) and device tree inside the rom? How to READ & WRITE in the rom bcoz it’s hardcoded and burned in the chip ans :- Method 1 :- manual physical way : open the back of laptop see the rom chip buy a soic clip attach on the rom chip then plug the usb to another laptop cpu now the victim laptop is dead and laptop 2 now using the soic you can READ the rom memory address of victim laptop into the laptop 2 and also WRITE the any code in the memory address inside the rom but for that you need +1 laptop and phyical availibility of victim laptop

Method 2:- root access read previuos one

— — — — — — — — — — — — — — — — — — — — — — — — — -


메타데이터
post_id
d0c64a90c1e2
slug
memory-address-in-ram-rom-ssd-gdt-what-is-root-access-from-high-level-d0c64a90c1e2
url
https://medium.com/@anuragdnd456/memory-address-in-ram-rom-ssd-gdt-what-is-root-access-from-high-level-d0c64a90c1e2
canonical_url
https://medium.com/@anuragdnd456/memory-address-in-ram-rom-ssd-gdt-what-is-root-access-from-high-level-d0c64a90c1e2
author_url
https://medium.com/@anuragdnd456
status
ok
fetched_at
2026-06-13 07:35:29