Главная » Просмотр файлов » Volume 3A System Programming Guide_ Part 1

Volume 3A System Programming Guide_ Part 1 (794103), страница 32

Файл №794103 Volume 3A System Programming Guide_ Part 1 (Intel and AMD manuals) 32 страницаVolume 3A System Programming Guide_ Part 1 (794103) страница 322019-04-28СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 32)

The processor generates aspecial bus cycle to indicate that the halt mode has been entered.Hardware may respond to this signal in a number of ways. An indicator light on thefront panel may be turned on. An NMI interrupt for recording diagnostic informationmay be generated. Reset initialization may be invoked (note that the BINIT# pin wasintroduced with the Pentium Pro processor). If any non-wake events are pendingduring shutdown, they will be handled after the wake event from shutdown isprocessed (for example, A20M# interrupts).Vol. 3 2-29SYSTEM ARCHITECTURE OVERVIEWThe LOCK prefix invokes a locked (atomic) read-modify-write operation when modifying a memory operand. This mechanism is used to allow reliable communicationsbetween processors in multiprocessor systems, as described below:•In the Pentium processor and earlier IA-32 processors, the LOCK prefix causesthe processor to assert the LOCK# signal during the instruction.

This alwayscauses an explicit bus lock to occur.•In the Pentium 4, Intel Xeon, and P6 family processors, the locking operation ishandled with either a cache lock or bus lock. If a memory access is cacheable andaffects only a single cache line, a cache lock is invoked and the system bus andthe actual memory location in system memory are not locked during theoperation.

Here, other Pentium 4, Intel Xeon, or P6 family processors on the buswrite-back any modified data and invalidate their caches as necessary tomaintain system memory coherency. If the memory access is not cacheableand/or it crosses a cache line boundary, the processor’s LOCK# signal is assertedand the processor does not respond to requests for bus control during the lockedoperation.The RSM (return from SMM) instruction restores the processor (from a contextdump) to the state it was in prior to an system management mode (SMM) interrupt.2.6.6Reading Performance-Monitoring and Time-Stamp CountersThe RDPMC (read performance-monitoring counter) and RDTSC (read time-stampcounter) instructions allow application programs to read the processor’s performance-monitoring and time-stamp counters, respectively.

Pentium 4 and Intel Xeonprocessors have eighteen 40-bit performance-monitoring counters; P6 familyprocessors have two 40-bit counters.Use these counters to record either the occurrence or duration of events. Events thatcan be monitored are model specific; they may include the number of instructionsdecoded, interrupts received, or the number of cache loads.

Individual counters canbe set up to monitor different events. Use the system instruction WRMSR to set upvalues in the one of the 45 ESCRs and one of the 18 CCCR MSRs (for Pentium 4 andIntel Xeon processors); or in the PerfEvtSel0 or the PerfEvtSel1 MSR (for the P6family processors). The RDPMC instruction loads the current count from the selectedcounter into the EDX:EAX registers.The time-stamp counter is a model-specific 64-bit counter that is reset to zero eachtime the processor is reset. If not reset, the counter will increment ~9.5 x 1016times per year when the processor is operating at a clock rate of 3GHz.

At thisclock frequency, it would take over 190 years for the counter to wrap around. TheRDTSC instruction loads the current count of the time-stamp counter into theEDX:EAX registers.See Section 18.11, “Performance Monitoring Overview,” and Section 18.10, “TimeStamp Counter,” for more information about the performance monitoring and timestamp counters.2-30 Vol. 3SYSTEM ARCHITECTURE OVERVIEWThe RDTSC instruction was introduced into the IA-32 architecture with the Pentiumprocessor.

The RDPMC instruction was introduced into the IA-32 architecture with thePentium Pro processor and the Pentium processor with MMX technology. EarlierPentium processors have two performance-monitoring counters, but they can beread only with the RDMSR instruction, and only at privilege level 0.2.6.6.1Reading Counters in 64-Bit ModeIn 64-bit mode, RDTSC operates the same as in protected mode. The count in thetime-stamp counter is stored in EDX:EAX (or RDX[31:0]:RAX[31:0] withRDX[63:32]:RAX[63:32] cleared).RDPMC requires an index to specify the offset of the performance-monitoringcounter.

In 64-bit mode for Pentium 4 or Intel Xeon processor families, the index isspecified in ECX[30:0]. The current count of the performance-monitoring counter isstored in EDX:EAX (or RDX[31:0]:RAX[31:0] with RDX[63:32]:RAX[63:32]cleared).2.6.7Reading and Writing Model-Specific RegistersThe RDMSR (read model-specific register) and WRMSR (write model-specificregister) instructions allow a processor’s 64-bit model-specific registers (MSRs) to beread and written, respectively. The MSR to be read or written is specified by the valuein the ECX register.RDMSR reads the value from the specified MSR to the EDX:EAX registers; WRMSRwrites the value in the EDX:EAX registers to the specified MSR.

RDMSR and WRMSRwere introduced into the IA-32 architecture with the Pentium processor.See Section 9.4, “Model-Specific Registers (MSRs),” for more information.2.6.7.1Reading and Writing Model-Specific Registers in 64-Bit ModeRDMSR and WRMSR require an index to specify the address of an MSR. In 64-bitmode, the index is 32 bits; it is specified using ECX.Vol. 3 2-31SYSTEM ARCHITECTURE OVERVIEW2-32 Vol. 3CHAPTER 3PROTECTED-MODE MEMORY MANAGEMENTThis chapter describes the Intel 64 and IA-32 architecture’s protected-mode memorymanagement facilities, including the physical memory requirements, segmentationmechanism, and paging mechanism.See also: Chapter 4, “Protection” (for a description of the processor’s protectionmechanism) and Chapter 15, “8086 Emulation” (for a description of memoryaddressing protection in real-address and virtual-8086 modes).3.1MEMORY MANAGEMENT OVERVIEWThe memory management facilities of the IA-32 architecture are divided into twoparts: segmentation and paging.

Segmentation provides a mechanism of isolatingindividual code, data, and stack modules so that multiple programs (or tasks) canrun on the same processor without interfering with one another. Paging provides amechanism for implementing a conventional demand-paged, virtual-memory systemwhere sections of a program’s execution environment are mapped into physicalmemory as needed. Paging can also be used to provide isolation between multipletasks. When operating in protected mode, some form of segmentation must be used.There is no mode bit to disable segmentation. The use of paging, however, isoptional.These two mechanisms (segmentation and paging) can be configured to supportsimple single-program (or single-task) systems, multitasking systems, or multipleprocessor systems that used shared memory.As shown in Figure 3-1, segmentation provides a mechanism for dividing theprocessor’s addressable memory space (called the linear address space) intosmaller protected address spaces called segments.

Segments can be used to holdthe code, data, and stack for a program or to hold system data structures (such as aTSS or LDT). If more than one program (or task) is running on a processor, eachprogram can be assigned its own set of segments. The processor then enforces theboundaries between these segments and insures that one program does not interferewith the execution of another program by writing into the other program’s segments.The segmentation mechanism also allows typing of segments so that the operationsthat may be performed on a particular type of segment can be restricted.All the segments in a system are contained in the processor’s linear address space.To locate a byte in a particular segment, a logical address (also called a far pointer)must be provided. A logical address consists of a segment selector and an offset.

Thesegment selector is a unique identifier for a segment. Among other things it providesan offset into a descriptor table (such as the global descriptor table, GDT) to a datastructure called a segment descriptor. Each segment has a segment descriptor, whichspecifies the size of the segment, the access rights and privilege level for theVol. 3 3-1PROTECTED-MODE MEMORY MANAGEMENTsegment, the segment type, and the location of the first byte of the segment in thelinear address space (called the base address of the segment). The offset part of thelogical address is added to the base address for the segment to locate a byte withinthe segment.

Характеристики

Тип файла
PDF-файл
Размер
3,12 Mb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6384
Авторов
на СтудИзбе
308
Средний доход
с одного платного файла
Обучение Подробнее